Storyyeller / Krakatau

Java decompiler, assembler, and disassembler
GNU General Public License v3.0
1.95k stars 219 forks source link

Formatting error when implementing/extending descriptor #131

Closed samczsun closed 6 years ago

samczsun commented 6 years ago

The following class runs with default verification, but the decompiled output is formatted incorrectly. I believe I reported a similar issue regarding Lfoobar; vs foobar format for checkcast.

.version 45 0 
.class public a
.super java/lang/Object
.implements Ljava/util/List;

.method public static main : ([Ljava/lang/String;)V
    .code stack 10 locals 10
        return
    .end code
.end method 

.end class 
public class a implements Ljava.util.List; {
    public static void main(String[] a) {
    }
}
Storyyeller commented 6 years ago

I get a linkage error when I try to run the example. Could this be dependent on the JVM version?

java version "9.0.1"
Java(TM) SE Runtime Environment (build 9.0.1+11)
Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode)

Edit: I just remembered that Java 9 also broke the weird class literal test. So I think this was a change where the JVM stopped accepting these class descriptors in Java 9. Given that, I'm not sure it's worth fixing.