The JVM ignores access flags for <clinit>, and assumes it to only have ACC_STATIC (or ACC_STATIC | ACC_STRICT for Java 8+)
.version 49 0
.class public final a
.super java/lang/Object
.method native abstract <clinit> : ()V
.code stack 10 locals 10
return
.end code
.end method
.end class
Traceback (most recent call last):
File "decompile.py", line 158, in <module>
decompileClass(path, targets, args.out, args.skip, magic_throw=args.xmagicthrow)
File "decompile.py", line 101, in decompileClass
c = e.getClass(target.decode('utf8'))
File "C:\Users\Sam\IdeaProjects\Krakatau\Krakatau\environment.py", line 26, in getClass
result.loadElements()
File "C:\Users\Sam\IdeaProjects\Krakatau\Krakatau\classfile.py", line 101, in loadElements
self.methods = [method.Method(m, self, keepRaw) for m in self.methods_raw]
File "C:\Users\Sam\IdeaProjects\Krakatau\Krakatau\method.py", line 86, in __init__
self._checkFlags()
File "C:\Users\Sam\IdeaProjects\Krakatau\Krakatau\method.py", line 104, in _checkFlags
assert not self.flags & set(['SYNCHRONIZED', 'PRIVATE', 'FINAL', 'STRICT', 'STATIC', 'NATIVE'])
AssertionError
Edit: Just noticed you already wrote code to handle this JVM quirk. I guess you just forgot to clear the flags
The JVM ignores access flags for
<clinit>
, and assumes it to only haveACC_STATIC
(orACC_STATIC | ACC_STRICT
for Java 8+)Edit: Just noticed you already wrote code to handle this JVM quirk. I guess you just forgot to clear the flags