You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2019/01/22 06:09:28 UTC

[GitHub] arusinha commented on a change in pull request #1071: [NETBEANS-1728] fix for Exception encountered when break returns value

arusinha commented on a change in pull request #1071: [NETBEANS-1728] fix for Exception encountered when break returns value
URL: https://github.com/apache/incubator-netbeans/pull/1071#discussion_r249650714
 
 

 ##########
 File path: java/java.source.base/src/org/netbeans/api/java/source/TreeUtilities.java
 ##########
 @@ -1335,6 +1335,54 @@ public Void visitMethod(MethodTree node, Boolean p) {
         return null;
     }
     
+    /**Find the target of <code>break</code> or <code>continue</code>. The given
+     * {@link CompilationInfo} has to be at least in the {@link Phase#RESOLVED} phase.
+     * 
+     * @param breakOrContinue {@link TreePath} to the tree that should be inspected.
+     *                        The <code>breakOrContinue.getLeaf().getKind()</code>
+     *                        has to be either {@link Kind#BREAK} or {@link Kind#CONTINUE}, or
+     *                        an IllegalArgumentException is thrown
+     * @return the tree that is the "target" for the given break or continue statement, or null if there is none. Tree can be of type StatementTree or ExpressionTree
+     * @throws IllegalArgumentException if the given tree is not a break or continue tree or if the given {@link CompilationInfo}
+     *         is not in the {@link Phase#RESOLVED} phase.
+     * @since 0.16
+     */
+    public Tree getBreakContinueTargetTree(TreePath breakOrContinue) throws IllegalArgumentException {
 
 Review comment:
   getBreakContinueTargetTree is a new API, it should have an entry in apichanges.xml and also version needs to be incremented

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists