diff options
| author | 2017-03-07 21:24:39 +0100 | |
|---|---|---|
| committer | 2017-03-07 21:30:02 +0100 | |
| commit | b4aaff683d78ab92b83f3a7257c33b8e27d1affa (patch) | |
| tree | f23c9bb0927d83cc7302881266b7df8fd37959c7 /src/main/java/cuchaz/enigma/mapping/MethodMapping.java | |
| parent | Avoid crash of the matcher when the obf name is invalid (set a deob it using ... (diff) | |
| download | enigma-fork-b4aaff683d78ab92b83f3a7257c33b8e27d1affa.tar.gz enigma-fork-b4aaff683d78ab92b83f3a7257c33b8e27d1affa.tar.xz enigma-fork-b4aaff683d78ab92b83f3a7257c33b8e27d1affa.zip | |
Drop unix case style and implement hashCode when equals is overrided
Also update Guava to version 21
Diffstat (limited to 'src/main/java/cuchaz/enigma/mapping/MethodMapping.java')
| -rw-r--r-- | src/main/java/cuchaz/enigma/mapping/MethodMapping.java | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/main/java/cuchaz/enigma/mapping/MethodMapping.java b/src/main/java/cuchaz/enigma/mapping/MethodMapping.java index f973d6b..e0aeea2 100644 --- a/src/main/java/cuchaz/enigma/mapping/MethodMapping.java +++ b/src/main/java/cuchaz/enigma/mapping/MethodMapping.java | |||
| @@ -178,14 +178,12 @@ public class MethodMapping implements Comparable<MethodMapping>, MemberMapping<B | |||
| 178 | 178 | ||
| 179 | public boolean renameObfClass(final String oldObfClassName, final String newObfClassName) { | 179 | public boolean renameObfClass(final String oldObfClassName, final String newObfClassName) { |
| 180 | // rename obf classes in the signature | 180 | // rename obf classes in the signature |
| 181 | Signature newSignature = new Signature(this.obfSignature, new ClassNameReplacer() { | 181 | Signature newSignature = new Signature(this.obfSignature, className -> |
| 182 | @Override | 182 | { |
| 183 | public String replace(String className) { | 183 | if (className.equals(oldObfClassName)) { |
| 184 | if (className.equals(oldObfClassName)) { | 184 | return newObfClassName; |
| 185 | return newObfClassName; | ||
| 186 | } | ||
| 187 | return null; | ||
| 188 | } | 185 | } |
| 186 | return null; | ||
| 189 | }); | 187 | }); |
| 190 | 188 | ||
| 191 | if (!newSignature.equals(this.obfSignature)) { | 189 | if (!newSignature.equals(this.obfSignature)) { |