mirror of
https://github.com/i-net-software/JWebAssembly.git
synced 2025-03-25 07:27:52 +01:00
fix NPE
This commit is contained in:
parent
dab750f3b6
commit
735aadbab4
@ -285,12 +285,14 @@ public class ClassFile {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the type of class.
|
* Get the type of class.
|
||||||
|
*
|
||||||
|
* @return the type of the class
|
||||||
*/
|
*/
|
||||||
public Type getType() {
|
public Type getType() {
|
||||||
if( (accessFlags & 0x0200) > 0 ) {
|
if( (accessFlags & 0x0200) > 0 ) {
|
||||||
return Type.Interface;
|
return Type.Interface;
|
||||||
}
|
}
|
||||||
if( superClass.getName().equals( "java/lang/Enum" ) ) {
|
if( superClass != null && superClass.getName().equals( "java/lang/Enum" ) ) {
|
||||||
return Type.Enum;
|
return Type.Enum;
|
||||||
}
|
}
|
||||||
return Type.Class;
|
return Type.Class;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user