Skip to content
This repository has been archived by the owner on Sep 19, 2023. It is now read-only.
/ jdk21 Public archive

Commit

Permalink
8308499: Test vmTestbase/nsk/jdi/MethodExitRequest/addClassExclusionF…
Browse files Browse the repository at this point in the history
…ilter/filter001/TestDescription.java failed: VMDisconnectedException

Reviewed-by: kevinw, sspitsyn
Backport-of: 79ff72a7762deb6010b57e5ac0ccede3d035ab4c
  • Loading branch information
plummercj committed Jun 21, 2023
1 parent a4159dd commit 722b512
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -74,6 +74,7 @@ public static int run (String argv[], PrintStream out) {

private String classExclName1 = "java";
private String classExclName2 = "sun";
private String classExclName3 = "jdk";
private boolean methodExitReceived = false;

protected void testRun() {
Expand Down Expand Up @@ -103,6 +104,7 @@ protected void testRun() {

eventRequest1.addClassExclusionFilter(classExclName1 + "*");
eventRequest1.addClassExclusionFilter(classExclName2 + "*");
eventRequest1.addClassExclusionFilter(classExclName3 + "*");
eventRequest1.enable();

eventHandler.addListener(
Expand All @@ -111,7 +113,10 @@ public boolean eventReceived(Event event) {
if (event instanceof MethodExitEvent) {
methodExitReceived = true;
String str = ((MethodExitEvent)event).location().declaringType().name();
if (str.indexOf(classExclName1) == 0 || str.indexOf(classExclName2) == 0) {
if (str.indexOf(classExclName1) == 0 ||
str.indexOf(classExclName2) == 0 ||
str.indexOf(classExclName3) == 0)
{
setFailedStatus("Received unexpected MethodExitEvent for excluded class:" + str);
} else {
display("Received expected MethodExitEvent for " + str);
Expand Down

3 comments on commit 722b512

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JesperIRL
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/tag jdk-21+28

@openjdk
Copy link

@openjdk openjdk bot commented on 722b512 Jun 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JesperIRL The tag jdk-21+28 was successfully created.

Please sign in to comment.