changeset 35572:c864053d0405

8147444: compiler/jsr292/NonInlinedCall/RedefineTest.java fails with NullPointerException in ClassFileInstaller Summary: Removed installing of unused class. Added error output to ClassFileInstaller. Reviewed-by: vlivanov, zmajo
author thartmann
date Mon, 18 Jan 2016 08:25:26 +0100
parents 584ae5cfe100
children e6c6e7a3b036
files hotspot/test/compiler/jsr292/NonInlinedCall/RedefineTest.java hotspot/test/testlibrary/ClassFileInstaller.java
diffstat 2 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/hotspot/test/compiler/jsr292/NonInlinedCall/RedefineTest.java	Fri Jan 15 13:08:40 2016 -1000
+++ b/hotspot/test/compiler/jsr292/NonInlinedCall/RedefineTest.java	Mon Jan 18 08:25:26 2016 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 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
@@ -30,7 +30,6 @@
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  *                              java.lang.invoke.RedefineTest
  *                              Agent
- *                              jdk.test.lib.Asserts
  * @run main Agent agent.jar java.lang.invoke.RedefineTest
  * @run main/othervm -Xbootclasspath/a:. -javaagent:agent.jar
  *                   -XX:+IgnoreUnrecognizedVMOptions
--- a/hotspot/test/testlibrary/ClassFileInstaller.java	Fri Jan 15 13:08:40 2016 -1000
+++ b/hotspot/test/testlibrary/ClassFileInstaller.java	Mon Jan 18 08:25:26 2016 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 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
@@ -21,6 +21,7 @@
  * questions.
  */
 
+import java.io.FileNotFoundException;
 import java.io.InputStream;
 import java.nio.file.Files;
 import java.nio.file.Path;
@@ -42,6 +43,9 @@
             // Convert dotted class name to a path to a class file
             String pathName = arg.replace('.', '/').concat(".class");
             InputStream is = cl.getResourceAsStream(pathName);
+            if (is == null) {
+                throw new FileNotFoundException(pathName);
+            }
 
             // Create the class file's package directory
             Path p = Paths.get(pathName);