8000 Fix lambda deserialization in classes with 252+ lambdas by retronym · Pull Request #5857 · scala/scala · GitHub
[go: up one dir, main page]

Skip to content

Fix lambda deserialization in classes with 252+ lambdas #5857

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 24, 2017
Merged
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
Next Next commit
Remove dead code catch in LambdaDeserializer
I should have removed the try/catch when I removed the code path that
could throw that exception in 131402f.
  • Loading branch information
retronym committed Apr 20, 2017
commit d9343a7f10f0fbe648495060509dfa88c3af2b9c
12 changes: 4 additions & 8 deletions src/library/scala/runtime/LambdaDeserializer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,10 @@ object LambdaDeserializer {
}

// Lookup the implementation method
val implMethod: MethodHandle = try {
if (targetMethodMap.containsKey(key)) {
targetMethodMap.get(key)
} else {
throw new IllegalArgumentException("Illegal lambda deserialization")
}
} catch {
case e: ReflectiveOperationException => throw new IllegalArgumentException("Illegal lambda deserialization", e)
val implMethod: MethodHandle = if (targetMethodMap.containsKey(key)) {
targetMethodMap.get(key)
} else {
throw new IllegalArgumentException("Illegal lambda deserialization")
}

val flags: Int = LambdaMetafactory.FLAG_SERIALIZABLE | LambdaMetafactory.FLAG_MARKERS
Expand Down
0