3805 result = tree; |
3805 result = tree; |
3806 } |
3806 } |
3807 |
3807 |
3808 @Override |
3808 @Override |
3809 public void visitTry(JCTry tree) { |
3809 public void visitTry(JCTry tree) { |
|
3810 /* special case of try without catchers and with finally emtpy. |
|
3811 * Don't give it a try, translate only the body. |
|
3812 */ |
3810 if (tree.resources.isEmpty()) { |
3813 if (tree.resources.isEmpty()) { |
3811 super.visitTry(tree); |
3814 if (tree.catchers.isEmpty() && |
|
3815 tree.finalizer.getStatements().isEmpty()) { |
|
3816 result = translate(tree.body); |
|
3817 } else { |
|
3818 super.visitTry(tree); |
|
3819 } |
3812 } else { |
3820 } else { |
3813 result = makeTwrTry(tree); |
3821 result = makeTwrTry(tree); |
3814 } |
3822 } |
3815 } |
3823 } |
3816 |
3824 |