summaryrefslogtreecommitdiff
path: root/src/reflect
diff options
context:
space:
mode:
authorEugene Burmako <xeno.by@gmail.com>2013-01-29 20:36:55 +0100
committerEugene Burmako <xeno.by@gmail.com>2013-10-18 17:48:52 +0200
commit61cfb8c2080c8b1aba70647e9f7a837ef37e8c0d (patch)
tree419091400f4ac461a120b081fcdeff710ebf3c99 /src/reflect
parent000c18a8fac60065747652368dadcd7850532f3f (diff)
downloadscala-61cfb8c2080c8b1aba70647e9f7a837ef37e8c0d.tar.gz
scala-61cfb8c2080c8b1aba70647e9f7a837ef37e8c0d.tar.bz2
scala-61cfb8c2080c8b1aba70647e9f7a837ef37e8c0d.zip
removes the assertion in missingHook
In the current synchronization scheme multiple threads can enter the missingHook trying to materialize a package, which hasn't been created. That's fine, because makeScalaPackage, which creates and enters package symbols is synchronized and checks whether the creation is necessary before commencing. Therefore even if makeScalaPackage is called multiple times in rapid succession, the calls will be serialized and all calls except the first one won't do anything.
Diffstat (limited to 'src/reflect')
-rw-r--r--src/reflect/scala/reflect/runtime/JavaMirrors.scala2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/reflect/scala/reflect/runtime/JavaMirrors.scala b/src/reflect/scala/reflect/runtime/JavaMirrors.scala
index 7ca73505b7..1e2dd6b7d3 100644
--- a/src/reflect/scala/reflect/runtime/JavaMirrors.scala
+++ b/src/reflect/scala/reflect/runtime/JavaMirrors.scala
@@ -1281,8 +1281,6 @@ private[reflect] trait JavaMirrors extends internal.SymbolTable with api.JavaUni
override def missingHook(owner: Symbol, name: Name): Symbol = {
if (owner.hasPackageFlag) {
val mirror = mirrorThatLoaded(owner)
- // todo. this makes toolbox tests pass, but it's a mere workaround for SI-5865
-// assert((owner.info decl name) == NoSymbol, s"already exists: $owner . $name")
if (owner.isRootSymbol && mirror.tryJavaClass(name.toString).isDefined)
return mirror.EmptyPackageClass.info decl name
if (name.isTermName && !owner.isEmptyPackageClass)