Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Synchronize ScalaReflection.mirror method.
  • Loading branch information
ueshin committed Mar 3, 2016
commit 389d644f776504ee335cd26c121dc84c1902cf32
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ object ScalaReflection extends ScalaReflection {
// Since we are creating a runtime mirror usign the class loader of current thread,
// we need to use def at here. So, every time we call mirror, it is using the
// class loader of the current thread.
override def mirror: universe.Mirror =
override def mirror: universe.Mirror = ScalaReflectionLock.synchronized {
universe.runtimeMirror(Thread.currentThread().getContextClassLoader)
}

import universe._

Expand Down