Author: struberg
Date: Mon Sep 19 10:16:35 2016
New Revision: 1761415

URL: http://svn.apache.org/viewvc?rev=1761415&view=rev
Log:
OPENJPA-2666 jdk.internal.* are classes generated by Java9

we need to delegate through for them as well.

Modified:
    
openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/TemporaryClassLoader.java

Modified: 
openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/TemporaryClassLoader.java
URL: 
http://svn.apache.org/viewvc/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/TemporaryClassLoader.java?rev=1761415&r1=1761414&r2=1761415&view=diff
==============================================================================
--- 
openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/TemporaryClassLoader.java
 (original)
+++ 
openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/TemporaryClassLoader.java
 Mon Sep 19 10:16:35 2016
@@ -53,13 +53,15 @@ public class TemporaryClassLoader extend
         // "sun." is required for JDK 1.4, which has an access check for
         // sun.reflect.GeneratedSerializationConstructorAccessor1
         if (name.startsWith("java.") || name.startsWith("javax.")
-            || name.startsWith("sun."))
+            || name.startsWith("sun.") || name.startsWith("jdk.")) {
             return Class.forName(name, resolve, getClass().getClassLoader());
+        }
 
         String resourceName = name.replace('.', '/') + ".class";
         InputStream resource = getResourceAsStream(resourceName);
-        if (resource == null)
+        if (resource == null) {
             throw new ClassNotFoundException(name);
+        }
 
         ByteArrayOutputStream bout = new ByteArrayOutputStream();
         byte[] b = new byte[1024];


Reply via email to