diff --git a/src/main/java/org/spongepowered/asm/mixin/injection/struct/MemberInfo.java b/src/main/java/org/spongepowered/asm/mixin/injection/struct/MemberInfo.java index 5d4bf62c..4f904c93 100644 --- a/src/main/java/org/spongepowered/asm/mixin/injection/struct/MemberInfo.java +++ b/src/main/java/org/spongepowered/asm/mixin/injection/struct/MemberInfo.java @@ -282,8 +282,17 @@ public class MemberInfo { */ public MemberInfo validate() throws InvalidMemberDescriptorException { // Extremely naive class name validation, just to spot really egregious errors - if (this.owner != null && !this.owner.matches("(?i)^[\\w\\p{Sc}/]+$")) { - throw new InvalidMemberDescriptorException("Invalid owner: " + this.owner); + if (this.owner != null) { + 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); + } } // Also naive validation, we're looking for stupid errors here