summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2017-05-14 12:00:00 +1000
committermd_5 <git@md-5.net>2017-05-14 12:00:00 +1000
commit20ea719b7479a7ed66979f6f1766575bfc6fecab (patch)
tree54d16aa89006d38ec2a60477b0eeb5eb41a84b29 /src
parentdd62950521daa2e30b1b398081c6b78d226dd2c2 (diff)
downloadfernflower-20ea719b7479a7ed66979f6f1766575bfc6fecab.tar
fernflower-20ea719b7479a7ed66979f6f1766575bfc6fecab.tar.gz
fernflower-20ea719b7479a7ed66979f6f1766575bfc6fecab.tar.lz
fernflower-20ea719b7479a7ed66979f6f1766575bfc6fecab.tar.xz
fernflower-20ea719b7479a7ed66979f6f1766575bfc6fecab.zip
Some decompilation fixes regarding lambdas
Diffstat (limited to 'src')
-rw-r--r--src/org/jetbrains/java/decompiler/main/rels/NestedClassProcessor.java5
-rw-r--r--src/org/jetbrains/java/decompiler/modules/decompiler/exps/InvocationExprent.java1
2 files changed, 5 insertions, 1 deletions
diff --git a/src/org/jetbrains/java/decompiler/main/rels/NestedClassProcessor.java b/src/org/jetbrains/java/decompiler/main/rels/NestedClassProcessor.java
index 1882346..6e40fcb 100644
--- a/src/org/jetbrains/java/decompiler/main/rels/NestedClassProcessor.java
+++ b/src/org/jetbrains/java/decompiler/main/rels/NestedClassProcessor.java
@@ -124,6 +124,9 @@ public class NestedClassProcessor {
* But they add the field to the END of the fields list.
*/
private void gatherEnumSwitchMaps(ClassNode node) {
+ if (node.wrapper == null) {
+ return;
+ }
for (ClassNode child : node.nested) {
gatherEnumSwitchMaps(child);
}
@@ -231,7 +234,7 @@ public class NestedClassProcessor {
private static void setLambdaVars(ClassNode parent, ClassNode child) {
- if (child.lambda_information.is_method_reference) { // method reference, no code and no parameters
+ if (parent.wrapper == null || child.lambda_information.is_method_reference) { // method reference, no code and no parameters
return;
}
diff --git a/src/org/jetbrains/java/decompiler/modules/decompiler/exps/InvocationExprent.java b/src/org/jetbrains/java/decompiler/modules/decompiler/exps/InvocationExprent.java
index 320cc73..d2b717c 100644
--- a/src/org/jetbrains/java/decompiler/modules/decompiler/exps/InvocationExprent.java
+++ b/src/org/jetbrains/java/decompiler/modules/decompiler/exps/InvocationExprent.java
@@ -124,6 +124,7 @@ public class InvocationExprent extends Exprent {
isStatic = true;
}
else {
+ if (!lstParameters.isEmpty())
instance = lstParameters
.get(0); // FIXME: remove the first parameter completely from the list. It's the object type for a virtual lambda method.
}