Reviewers: scottb,

Description:
GenerateJavaAST can crash when trying to convert code the JDT compiler
considers dead, because in such a case the JDT will leave ill-formed
code in the tree.

This patch covers one such case: if a block of code contains an if(true)
that contains a throw, the JDT will consider unreachable any statements
in the block after the if(true).  Doubtless there are more, but on the
good side, these seem to not pop up very often in practice.

Please review this at http://gwt-code-reviews.appspot.com/34835

Affected files:
   dev/core/src/com/google/gwt/dev/jjs/ast/JIfStatement.java
   dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaAST.java
   user/test/com/google/gwt/dev/jjs/test/CompilerTest.java



--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---

Reply via email to