aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDawid Pakuła2014-01-15 11:18:29 (EST)
committerDawid Pakuła2014-01-15 11:18:29 (EST)
commit86f883030602e497641592f2655111bc27ba0dc4 (patch)
tree593a12e113a8b32e275276dc5aef3f85787a8e8d
parentd656cada763f9de950ba872a711035c4c70ee412 (diff)
downloadorg.eclipse.pdt-86f883030602e497641592f2655111bc27ba0dc4.zip
org.eclipse.pdt-86f883030602e497641592f2655111bc27ba0dc4.tar.gz
org.eclipse.pdt-86f883030602e497641592f2655111bc27ba0dc4.tar.bz2
Bug 425781 - Exception while using try catch finallyrefs/changes/61/20661/1
Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=425781 Change-Id: Ie1474d930af1f5a6684cc5f8a37feb79d61f97cd Signed-off-by: Dawid Pakuła <zulus@w3des.net>
-rw-r--r--plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/ast/nodes/TryStatement.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/ast/nodes/TryStatement.java b/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/ast/nodes/TryStatement.java
index f507320..812f894 100644
--- a/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/ast/nodes/TryStatement.java
+++ b/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/ast/nodes/TryStatement.java
@@ -290,8 +290,10 @@ public class TryStatement extends Statement {
ASTNode clone0(AST target) {
Block body = ASTNode.copySubtree(target, getBody());
final List catchs = ASTNode.copySubtrees(target, this.catchClauses);
+ final FinallyClause finallyClause = ASTNode.copySubtree(target,
+ this.finallyClause);
final TryStatement result = new TryStatement(this.getStart(),
- this.getEnd(), target, body, catchs);
+ this.getEnd(), target, body, catchs, finallyClause);
return result;
}
@@ -313,6 +315,13 @@ public class TryStatement extends Statement {
setBody((Block) child);
return null;
}
+ } else if (property == FINALLY_CLAUSE_PROPERTY) {
+ if (get) {
+ return finallyClause();
+ } else {
+ setFinallyClause((FinallyClause) child);
+ return null;
+ }
}
// allow default implementation to flag the error
return super.internalGetSetChildProperty(property, get, child);