Re: jad gibt Fehlermeldung aus
- From: Patrick Roemer <sangamon@xxxxxxxxxxxxx>
- Date: Fri, 13 Jun 2008 15:02:06 +0200
Responding to Thomas Weiler:
wenn ich versuche, eine Klasse mit Jad zu dekompilieren, bekomme ich
mehrfach folgende Fehlermeldung:
Overlapped try statements detected. Not all exception handlers will be
resolved
in the method helloworld
Der Code ist auch nur sehr schwer zu gebrauchen. Hat hier der Entwickler
Fallen eingebaut, dass das Dekompilieren nicht geht oder muss man Jad
hier umstellen?
Die Falle hat gegebenenfalls schon javac eingebaut.
<snip>
patrick@judgefang:/tmp/jad> cat Hello.java
public class Hello {
public static void main(String[] args) {
Object lock = new Object();
synchronized(lock) {
System.out.println("Hello");
}
}
}
patrick@judgefang:/tmp/jad> javac -target 1.3 -source 1.3 Hello.java
patrick@judgefang:/tmp/jad> javap -c Hello
Compiled from "Hello.java"
public class Hello extends java.lang.Object{
public Hello();
Code:
0: aload_0
1: invokespecial #1; //Method java/lang/Object."<init>":()V
4: return
public static void main(java.lang.String[]);
Code:
0: new #2; //class java/lang/Object
3: dup
4: invokespecial #1; //Method java/lang/Object."<init>":()V
7: astore_1
8: aload_1
9: dup
10: astore_2
11: monitorenter
12: getstatic #3; //Field
java/lang/System.out:Ljava/io/PrintStream;
15: ldc #4; //String Hello
17: invokevirtual #5; //Method
java/io/PrintStream.println:(Ljava/lang/String;)V
20: aload_2
21: monitorexit
22: goto 30
25: astore_3
26: aload_2
27: monitorexit
28: aload_3
29: athrow
30: return
Exception table:
from to target type
12 22 25 any
25 28 25 any
}
patrick@judgefang:/tmp/jad> ./jad Hello.class
Parsing Hello.class... Generating Hello.jad
Overlapped try statements detected. Not all exception handlers will be
resolved in the method main
</snip>
Das Problem hier ist der zweite, "rekursive" Exceptionhandler: from und
to sind identisch, der try-Block ist gleich dem catch-Block. Das laesst
sich schlecht in Source nachbilden. IIRC hat Sun dieses Muster seit
JDK1.4 eingebaut. Keine Ahnung, ob man jad das explizit beibiegen kann,
per Default scheint es das Muster aber schlicht zu ignorieren, der
generierte Code ist ok. Alleine daran sollte es also nicht liegen, wenn
der Code "schwer zu gebrauchen ist".
Viele Gruesse,
Patrick
.
- References:
- jad gibt Fehlermeldung aus
- From: Thomas Weiler
- jad gibt Fehlermeldung aus
- Prev by Date: Re: String aus Datei auslesen
- Next by Date: Liferay Journal CMS
- Previous by thread: jad gibt Fehlermeldung aus
- Next by thread: Liferay Journal CMS
- Index(es):
Relevant Pages
|