8208074: [TESTBUG] vmTestbase/nsk/jvmti/RedefineClasses/StressRedefineWithoutBytecodeCorruption/TestDescription.java failed with NullPointerException
Summary: fixed refactoring caused by JDK-8203820
Reviewed-by: dholmes, sspitsyn, cjplummer
--- a/test/hotspot/jtreg/ProblemList.txt Tue Jul 31 14:24:10 2018 -0400
+++ b/test/hotspot/jtreg/ProblemList.txt Tue Jul 31 15:57:52 2018 -0400
@@ -156,7 +156,6 @@
vmTestbase/nsk/jvmti/ClearBreakpoint/clrbrk001/TestDescription.java 8016181 generic-all
vmTestbase/nsk/jvmti/FieldModification/fieldmod001/TestDescription.java 8016181 generic-all
-vmTestbase/nsk/jvmti/RedefineClasses/StressRedefineWithoutBytecodeCorruption/TestDescription.java 8202896,8206076,8208074 generic-all
vmTestbase/nsk/jvmti/ResourceExhausted/resexhausted001/TestDescription.java 7013634 generic-all
vmTestbase/nsk/jvmti/ResourceExhausted/resexhausted003/TestDescription.java 6606767 generic-all
vmTestbase/nsk/jvmti/ResourceExhausted/resexhausted004/TestDescription.java 7013634,6606767 generic-all
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RedefineClasses/StressRedefine.java Tue Jul 31 14:24:10 2018 -0400
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RedefineClasses/StressRedefine.java Tue Jul 31 15:57:52 2018 -0400
@@ -114,8 +114,8 @@
try {
// Just for fun we transfer parameters to method
Object res = myClass.getMethod(name, double.class, int.class, Object.class)
- .invoke(null, random.nextDouble(), random.nextInt(), new Object());
- } catch (IllegalArgumentException | InvocationTargetException
+ .invoke(myClass.newInstance(), random.nextDouble(), random.nextInt(), new Object());
+ } catch (IllegalArgumentException | InvocationTargetException | InstantiationException
| IllegalAccessException | NoSuchMethodException e) {
// It's okay to get exception here since we are corrupting bytecode and can't expect
// class to work properly.