diff options
| author | 2020-10-02 14:56:22 +0200 | |
|---|---|---|
| committer | 2020-10-02 14:56:22 +0200 | |
| commit | bb300792007577680e50dbd8a08ae255e68fc03b (patch) | |
| tree | e31f80b92c5d85ce7ca8f117d8aec06cfdef6d13 | |
| parent | Merge pull request #299 from thiakil/validation-changes (diff) | |
| download | enigma-bb300792007577680e50dbd8a08ae255e68fc03b.tar.gz enigma-bb300792007577680e50dbd8a08ae255e68fc03b.tar.xz enigma-bb300792007577680e50dbd8a08ae255e68fc03b.zip | |
Only conflict when both methods are not synthetic
| -rw-r--r-- | build.gradle | 2 | ||||
| -rw-r--r-- | enigma/src/main/java/cuchaz/enigma/translation/mapping/MappingValidator.java | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/build.gradle b/build.gradle index e341c616..cea13a1d 100644 --- a/build.gradle +++ b/build.gradle | |||
| @@ -24,7 +24,7 @@ subprojects { | |||
| 24 | } | 24 | } |
| 25 | 25 | ||
| 26 | group = 'cuchaz' | 26 | group = 'cuchaz' |
| 27 | version = '0.21.1' | 27 | version = '0.21.2' |
| 28 | 28 | ||
| 29 | def buildNumber = System.getenv("BUILD_NUMBER") | 29 | def buildNumber = System.getenv("BUILD_NUMBER") |
| 30 | version = version + "+" + (buildNumber ? "build.$buildNumber" : "local") | 30 | version = version + "+" + (buildNumber ? "build.$buildNumber" : "local") |
diff --git a/enigma/src/main/java/cuchaz/enigma/translation/mapping/MappingValidator.java b/enigma/src/main/java/cuchaz/enigma/translation/mapping/MappingValidator.java index 134c05ce..a84b0fb3 100644 --- a/enigma/src/main/java/cuchaz/enigma/translation/mapping/MappingValidator.java +++ b/enigma/src/main/java/cuchaz/enigma/translation/mapping/MappingValidator.java | |||
| @@ -46,7 +46,7 @@ public class MappingValidator { | |||
| 46 | .map(deobfuscator::translate) | 46 | .map(deobfuscator::translate) |
| 47 | .collect(Collectors.toList()); | 47 | .collect(Collectors.toList()); |
| 48 | for (Entry<?> sibling : directTranslatedSiblings) { | 48 | for (Entry<?> sibling : directTranslatedSiblings) { |
| 49 | if (entry.canConflictWith(sibling) && sibling.getName().equals(name) && isSynthetic(entry) == isSynthetic(sibling)) { | 49 | if (entry.canConflictWith(sibling) && sibling.getName().equals(name) && !isSynthetic(entry) && !isSynthetic(sibling)) { |
| 50 | // allow clash if one is synthetic and the other is not | 50 | // allow clash if one is synthetic and the other is not |
| 51 | Entry<?> parent = entry.getParent(); | 51 | Entry<?> parent = entry.getParent(); |
| 52 | if (parent != null) { | 52 | if (parent != null) { |