#442 Servlet doPost() contains only an exception


Not sure if the category is Obfuscation/Optimization/Shrinking.

After obfuscation with proguard4.7 the servlet doPost() sometimes
contains only an exception.

The problem happens inside a try-catch statement, when a function call
and if-statement can cause an early return, but more statements follow
in the try block. (Which gets translated to a do-loop with breaks,
though the Java code has no loop.)

Please see sample source and decompiled class:

FooServlet.doPost() contains just an exception.
GoodServlet.doPost() contains more statments which seems OK.

FooVariantServlet contains more comments and test statements that I added to pinpoint the problem.

Running on Windows XP SP3.
Tested different betas but saw no difference. (proguard4.7beta1 up to beta3)
Tested different Java versions but saw with no difference.
JDK: javac 1.6.0_11 and javac 1.5.0_17
JRE: java version "1.6.0_31"


  • Lars

    Lars - 2012-03-08

    Java sample, pro file, decompiled classes

  • Lars

    Lars - 2012-03-08
    • status: open --> closed-invalid
  • Lars

    Lars - 2012-03-08

    Sorry, no need to bother.
    It was the JODE decompiler that was not able to decompile Java 6 code


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks