diff options
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/reflect/runtime/JavaToScala.scala | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/compiler/scala/reflect/runtime/JavaToScala.scala b/src/compiler/scala/reflect/runtime/JavaToScala.scala index 5297ea6db4..afd623b833 100644 --- a/src/compiler/scala/reflect/runtime/JavaToScala.scala +++ b/src/compiler/scala/reflect/runtime/JavaToScala.scala @@ -34,8 +34,10 @@ trait JavaToScala extends ConversionUtil { self: SymbolTable => val global: JavaToScala.this.type = self } - protected def defaultReflectiveClassLoader(): JClassLoader = - Thread.currentThread.getContextClassLoader + protected def defaultReflectiveClassLoader(): JClassLoader = { + val cl = Thread.currentThread.getContextClassLoader + if (cl == null) getClass.getClassLoader else cl + } /** Paul: It seems the default class loader does not pick up root classes, whereas the system classloader does. * Can you check with your newly acquired classloader fu whether this implementation makes sense? |