diff options
author | Thinkofdeath <thinkofdeath@spigotmc.org> | 2015-02-24 14:06:59 +0000 |
---|---|---|
committer | Thinkofdeath <thinkofdeath@spigotmc.org> | 2015-02-24 14:06:59 +0000 |
commit | 7cfb48c2ed554f1cbf9693b2ff957d984c8e0f91 (patch) | |
tree | 2d5ee5168ced0884abc52b771a7ba91ba1da0048 /src/org/jetbrains/java | |
parent | 1f6417624639de346ffa74351d30b58d30f9e80b (diff) | |
download | fernflower-7cfb48c2ed554f1cbf9693b2ff957d984c8e0f91.tar fernflower-7cfb48c2ed554f1cbf9693b2ff957d984c8e0f91.tar.gz fernflower-7cfb48c2ed554f1cbf9693b2ff957d984c8e0f91.tar.lz fernflower-7cfb48c2ed554f1cbf9693b2ff957d984c8e0f91.tar.xz fernflower-7cfb48c2ed554f1cbf9693b2ff957d984c8e0f91.zip |
Fix innerclass and generics breaking variable names
Diffstat (limited to 'src/org/jetbrains/java')
-rw-r--r-- | src/org/jetbrains/java/decompiler/util/VarHelper.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/org/jetbrains/java/decompiler/util/VarHelper.java b/src/org/jetbrains/java/decompiler/util/VarHelper.java index 5001cb0..3828159 100644 --- a/src/org/jetbrains/java/decompiler/util/VarHelper.java +++ b/src/org/jetbrains/java/decompiler/util/VarHelper.java @@ -66,6 +66,11 @@ public class VarHelper { return name; } + while (type.contains( "<" )) { + type = type.substring(0, type.indexOf('<')) + type.substring(type.indexOf('>') + 1); + } + type = type.replace( '.', '_' ); + if (type.endsWith("]")) { type = "a" + type.substring(0, type.indexOf('[')); } else if (varArgs) { |