diff options
| -rw-r--r-- | enigma/src/main/java/cuchaz/enigma/EnigmaProject.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/enigma/src/main/java/cuchaz/enigma/EnigmaProject.java b/enigma/src/main/java/cuchaz/enigma/EnigmaProject.java index 15d5e980..48d67368 100644 --- a/enigma/src/main/java/cuchaz/enigma/EnigmaProject.java +++ b/enigma/src/main/java/cuchaz/enigma/EnigmaProject.java | |||
| @@ -38,6 +38,7 @@ import cuchaz.enigma.translation.mapping.EntryRemapper; | |||
| 38 | import cuchaz.enigma.translation.mapping.MappingsChecker; | 38 | import cuchaz.enigma.translation.mapping.MappingsChecker; |
| 39 | import cuchaz.enigma.translation.mapping.tree.DeltaTrackingTree; | 39 | import cuchaz.enigma.translation.mapping.tree.DeltaTrackingTree; |
| 40 | import cuchaz.enigma.translation.mapping.tree.EntryTree; | 40 | import cuchaz.enigma.translation.mapping.tree.EntryTree; |
| 41 | import cuchaz.enigma.translation.representation.entry.ClassDefEntry; | ||
| 41 | import cuchaz.enigma.translation.representation.entry.ClassEntry; | 42 | import cuchaz.enigma.translation.representation.entry.ClassEntry; |
| 42 | import cuchaz.enigma.translation.representation.entry.Entry; | 43 | import cuchaz.enigma.translation.representation.entry.Entry; |
| 43 | import cuchaz.enigma.translation.representation.entry.LocalVariableEntry; | 44 | import cuchaz.enigma.translation.representation.entry.LocalVariableEntry; |
| @@ -150,6 +151,16 @@ public class EnigmaProject { | |||
| 150 | return false; | 151 | return false; |
| 151 | } else if (name.equals("wait") && sig.equals("(JI)V")) { | 152 | } else if (name.equals("wait") && sig.equals("(JI)V")) { |
| 152 | return false; | 153 | return false; |
| 154 | } else { | ||
| 155 | ClassDefEntry parent = jarIndex.getEntryIndex().getDefinition(obfMethodEntry.getParent()); | ||
| 156 | |||
| 157 | if (parent != null && parent.getSuperClass() != null && parent.getSuperClass().getFullName().equals("java/lang/Enum")) { | ||
| 158 | if (name.equals("values") && sig.equals("()[L" + parent.getFullName() + ";")) { | ||
| 159 | return false; | ||
| 160 | } else if (name.equals("valueOf") && sig.equals("(Ljava/lang/String;)L" + parent.getFullName() + ";")) { | ||
| 161 | return false; | ||
| 162 | } | ||
| 163 | } | ||
| 153 | } | 164 | } |
| 154 | } else if (obfEntry instanceof LocalVariableEntry && !((LocalVariableEntry) obfEntry).isArgument()) { | 165 | } else if (obfEntry instanceof LocalVariableEntry && !((LocalVariableEntry) obfEntry).isArgument()) { |
| 155 | return false; | 166 | return false; |