mirror of
https://github.com/LegacyModdingMC/UniMix.git
synced 2026-11-19 16:29:45 +00:00
Fix derp-check in MemberInfo which was using nonsense logic - fixes #242
This commit is contained in:
1 parent
aece829c4e
commit
086a706ec8
1 file changed
+6
-6
@@ -443,12 +443,12 @@ public final class MemberInfo {
|
||||
if (!this.owner.matches("(?i)^[\\w\\p{Sc}/]+$")) {
|
||||
throw new InvalidMemberDescriptorException("Invalid owner: " + this.owner);
|
||||
}
|
||||
try {
|
||||
if (!this.owner.equals(Type.getType(this.owner).getDescriptor())) {
|
||||
throw new InvalidMemberDescriptorException("Invalid owner type specified: " + this.owner);
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
throw new InvalidMemberDescriptorException("Invalid owner type specified: " + this.owner);
|
||||
// We can't detect this situation 100% reliably, but we can take a
|
||||
// decent stab at it in order to detect really obvious cases where
|
||||
// the user types a dot instead of a semicolon
|
||||
if (this.unparsed != null && this.unparsed.lastIndexOf('.') > 0 && this.owner.startsWith("L")) {
|
||||
throw new InvalidMemberDescriptorException("Malformed owner: " + this.owner + " If you are seeing this message unexpectedly and the"
|
||||
+ " owner appears to be correct, replace the owner descriptor with formal type L" + this.owner + "; to suppress this error");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user