#2 Bad jode output (from a 1.1 class set)

open
nobody
None
5
2002-06-24
2002-06-24
Anonymous
No

I am using Jode 1.1.1 to convert an app's libraries
from Java 1.1 to a more modern platform (1.4.0).

The jar file in question is attacted.
Note these are version Java 1.1 class files

The command I executed was
java jode.decompiler.Main -d c:\tmp\source
\tmp\KLG.jar

successfully executed but in several classes
produced code (see jclass.table.JCCellRange) like

((UNCONSTRUCTED)
jccellrange_14_).JCCellRange(i_16_, i_17_, i_18_,

i < i_15_ ? i : i_15_);

which, on human examination, should have been

jccellrange_14_ = new JCCellRange(i_16_,
i_17_, i_18_, // clr fix

i < i_15_ ? i : i_15_);

BTW fixing and compiling this jar set and the trying
to run Jode on the result (I was trying to see if the
problem was reproducable over versions) produced
the odd result of
C:\jode>java jode.decompiler.Main -d
c:\tmp\source2 \tmp\KLG2.jar
Jode (c) 1998-2001 Jochen Hoenicke
<jochen@gnu.org>
jclass.base.BaseComponent
jode.AssertError: ExceptionHandler order failed: not
14 < 17 <= 14
at
jode.flow.TransformExceptionHandlers.checkTryCat
chOrder(TransformExce
ptionHandlers.java:904)
at
jode.flow.TransformExceptionHandlers.analyze
(TransformExceptionHandle
rs.java:928)
at
jode.decompiler.MethodAnalyzer.analyzeCode
(MethodAnalyzer.java:577)
at jode.decompiler.MethodAnalyzer.analyze
(MethodAnalyzer.java:652)
at jode.decompiler.ClassAnalyzer.analyze
(ClassAnalyzer.java:359)
at jode.decompiler.ClassAnalyzer.dumpJavaFile
(ClassAnalyzer.java:624)
at jode.decompiler.ClassAnalyzer.dumpJavaFile
(ClassAnalyzer.java:613)
at jode.decompiler.Main.decompileClass
(Main.java:184)
at jode.decompiler.Main.decompile
(Main.java:370)
at jode.decompiler.Main.main(Main.java:203)

BTW. I should thank you. Other than the above,
Jode worked just as advertised and, with its help,
we were able to upgrade a major in house system.
This is the only mystery that we ran into.

Discussion