This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
In the following code snippet the function Utils.IsTextNode(tNode) returns true, but the program counter jumps to step 2. for (TagNode tNode:tagList) { if (!Utils.IsTextNode(tNode)) { <-- step 1 if (Utils.IsVNode(tNode)) { numVNodes++; <-- step 2 } } } Adding the line "boolean qq = Utils.IsTextNode(tNode);" between the for and first if statement 'solves' this behaviour: for (TagNode tNode:tagList) { boolean qq = Utils.IsTextNode(tNode); if (!Utils.IsTextNode(tNode)) { <-- step 1 if (Utils.IsVNode(tNode)) { numVNodes++; } } } <-- step 2 Leaving the line with the qq variable assignment, but uncommenting it, makes the debugger behave wrongly again: for (TagNode tNode:tagList) { // boolean qq = Utils.IsTextNode(tNode); if (!Utils.IsTextNode(tNode)) { <-- step 1 if (Utils.IsVNode(tNode)) { numVNodes++; <-- step 2 } } }
This problem is caused by a defect in Java compiler and cannot be fixed in NetBeans. It has been already reported against JDK, see issue 168365 for more details. *** This issue has been marked as a duplicate of 168365 ***
verified duplicate