diff options
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/reflect/runtime/JavaToScala.scala | 6 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/Global.scala | 6 |
2 files changed, 8 insertions, 4 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? diff --git a/src/compiler/scala/tools/nsc/Global.scala b/src/compiler/scala/tools/nsc/Global.scala index f14474eda8..90b4da8c9a 100644 --- a/src/compiler/scala/tools/nsc/Global.scala +++ b/src/compiler/scala/tools/nsc/Global.scala @@ -1201,8 +1201,10 @@ class Global(var currentSettings: Settings, var reporter: Reporter) extends Symb perRunCaches.clearAll() // Reset project - atPhase(namerPhase) { - resetProjectClasses(definitions.RootClass) + if (!stopPhase("namer")) { + atPhase(namerPhase) { + resetProjectClasses(definitions.RootClass) + } } } |