Skip to content

Commit

Permalink
removes the assertion in missingHook
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
xeno-by committed Feb 11, 2013
1 parent f4dd56c commit 73d079f
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/reflect/scala/reflect/runtime/JavaMirrors.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1264,8 +1264,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)
Expand Down

1 comment on commit 73d079f

@scala-jenkins
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Job pr-rangepos-per-commit failed for 73d079f (results):


Took 29 s.
sad kitty
to rebuild, comment "PLS REBUILD/pr-rangepos-per-commit@73d079fb383f82e825c2a40b397b64288e218fe9"on PR #2083

Please sign in to comment.