mirror of
https://github.com/morluto/awesome-reverse-engineering.git
synced 2026-12-02 13:11:19 -05:00
7c17a14706
Adds a CFR 0.152 example next to Vineflower: a synthetic Java 17 fixture with a sealed interface, records, instanceof patterns, switch yield and a text block is decompiled by the pinned release JAR (SHA-256 checked) and rebuilt, and prints the same line. A reflection probe shows that by default the rebuilt interface is no longer sealed, and --sealed true restores it, matching CFR's option defaults for Java 17 class files. The CFR entry now names the flag. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019S6gW1R7hWkvBKbBYnSYgK
8 lines
313 B
Java
8 lines
313 B
Java
public class SealedProbe {
|
|
public static void main(String[] args) throws Exception {
|
|
Class<?> shape = Class.forName("Shapes$Shape");
|
|
Class<?>[] permitted = shape.getPermittedSubclasses();
|
|
System.out.println(shape.isSealed() + ":" + (permitted == null ? 0 : permitted.length));
|
|
}
|
|
}
|