diff options
Diffstat (limited to 'src/cuchaz/enigma/mapping/ClassEntry.java')
| -rw-r--r-- | src/cuchaz/enigma/mapping/ClassEntry.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/cuchaz/enigma/mapping/ClassEntry.java b/src/cuchaz/enigma/mapping/ClassEntry.java index fdb7c2c..f87ddc1 100644 --- a/src/cuchaz/enigma/mapping/ClassEntry.java +++ b/src/cuchaz/enigma/mapping/ClassEntry.java | |||
| @@ -25,12 +25,17 @@ public class ClassEntry implements Entry, Serializable | |||
| 25 | { | 25 | { |
| 26 | throw new IllegalArgumentException( "Class name cannot be null!" ); | 26 | throw new IllegalArgumentException( "Class name cannot be null!" ); |
| 27 | } | 27 | } |
| 28 | if( className.contains( "." ) ) | 28 | if( className.indexOf( '.' ) >= 0 ) |
| 29 | { | 29 | { |
| 30 | throw new IllegalArgumentException( "Class name must be in JVM format. ie, path/to/package/class$inner" ); | 30 | throw new IllegalArgumentException( "Class name must be in JVM format. ie, path/to/package/class$inner" ); |
| 31 | } | 31 | } |
| 32 | 32 | ||
| 33 | m_name = className; | 33 | m_name = className; |
| 34 | |||
| 35 | if( isInnerClass() && getInnerClassName().indexOf( '/' ) >= 0 ) | ||
| 36 | { | ||
| 37 | throw new IllegalArgumentException( "Inner cast must not have a package: " + getInnerClassName() ); | ||
| 38 | } | ||
| 34 | } | 39 | } |
| 35 | 40 | ||
| 36 | public ClassEntry( ClassEntry other ) | 41 | public ClassEntry( ClassEntry other ) |