diff options
author | Lukas Rytz <lukas.rytz@gmail.com> | 2015-06-30 22:09:39 +0200 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@gmail.com> | 2015-07-23 14:49:01 +0200 |
commit | 1b5772316911e68ac0fb15a17390277f520e823a (patch) | |
tree | 476b3fe10618594b150045ba8d8325320faefbe8 /src/partest-javaagent | |
parent | 8bafa8ed88da0d522425c120daf7e0a4e09f88d9 (diff) | |
download | scala-1b5772316911e68ac0fb15a17390277f520e823a.tar.gz scala-1b5772316911e68ac0fb15a17390277f520e823a.tar.bz2 scala-1b5772316911e68ac0fb15a17390277f520e823a.zip |
[backport] `deserializeLambda` should not use encoded class name
`javaBinaryName` returns the internal name of a class.
Also used in BTypesFromsymbols.classBTypeFromSymbol.
Weirdly, this was discovered due to a bizarre osgi bnd error:
```
[bnd] # addAll '/Users/luc/scala/scala/build/pack/lib/scala-library.jar' with :,
[bnd] # addAll '/Users/luc/scala/scala/build/osgi/scala-library.bnd' with ,
[bnd] 1 ERRORS
[bnd] The default package '.' is not permitted by the Import-Package syntax.
[bnd] This can be caused by compile errors in Eclipse because Eclipse creates
[bnd] valid class files regardless of compile errors.
[bnd] The following package(s) import from the default package [scala.collection.generic, scala.sys.process, scala.collection.parallel.mutable, scala.util, scala.collection.parallel.immutable, scala.reflect, scala.concurrent.impl, scala.util.hashing, scala.collection.parallel, scala.collection.convert, scala.io, scala, scala.collection.concurrent, scala.util.control, scala.beans, scala.concurrent.duration, scala.collection, scala.runtime, scala.math, scala.collection.mutable, scala.concurrent, scala.sys, scala.collection.immutable, scala.ref, scala.util.matching]
[bnd] /Users/luc/scala/scala/build/osgi/scala-library.bnd: bnd failed
```
Lukas diagnosed it as a problem of the generated `$deserializeLambda$` function:
One example is `scala/App$class`. Its bytecode contains this:
```
private static synthetic $deserializeLambda$(Ljava/lang/invoke/SerializedLambda;)Ljava/lang/Object;
GETSTATIC scala$divApp$class.$deserializeLambdaCache$ : Ljava/util/Map;
[...]
```
so it's a static field read of a top-level class.
`$div` should obviously be `/` (which this commit rectifies)
Diffstat (limited to 'src/partest-javaagent')
0 files changed, 0 insertions, 0 deletions