Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 190904 - method()method() watch evaluated incorrectly
method()method() watch evaluated incorrectly
Product: java
Classification: Unclassified
Component: Source
All All
: P3 (vote)
: 7.4
Assigned To: Svata Dedic
Depends on:
Blocks: 192493 237805
  Show dependency treegraph
Reported: 2010-10-11 13:14 UTC by Jan Stola
Modified: 2016-07-07 07:17 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT

Proposed API change. (8.63 KB, patch)
2010-11-18 16:41 UTC, Jan Lahoda
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Stola 2010-10-11 13:14:25 UTC
I tried to create a watch that would show the second parent of my Swing component, i.e., I tried to create watch 'getParent().getParent()'. Unfortunately, I made a typo and entered 'getParent()getParent()'. Surprisingly, the debugger didn't complain about invalid syntax of this watch. It evaluated the watch as if it was just 'getParent()' which was confusing.
Comment 1 Martin Entlicher 2010-10-26 06:49:21 UTC
Not a bug of debugger.

                    "{\n getParent()getParent();\n}",

returns following Tree:


There are two statements trees and no error.


returns following Tree:
(JCTree$JCMethodInvocation) "getParent()"

There is only one method invocation and no error.
Comment 2 Jan Lahoda 2010-10-26 14:39:38 UTC
Two possible solutions:
1. parse* could return ErrorTree if the content was parsed with error.
2. parse* methods could be extended to also return list of errors found during parsing, so the user could get better feedback that simply "parse error".

What would be better for the debugger?
Comment 3 Martin Entlicher 2010-10-26 14:49:19 UTC
We currently check for Tree.Kind.ERRONEOUS so the (1) would fix it.
(2) Would be certainly valuable, if it's feasible to implement, we can provide such more detailed message to the user.
Comment 4 Quality Engineering 2010-11-17 07:10:08 UTC
Integrated into 'main-golden', will be available in build *201011170001* on (upload may still be in progress)
User: Jan Lahoda <>
Log: Updating the nb-javac library (for bugs #191963, #190904)
Comment 5 Jan Lahoda 2010-11-18 16:41:38 UTC
Created attachment 103075 [details]
Proposed API change.
Comment 6 Jan Lahoda 2010-11-18 16:44:23 UTC
I would like to add new variants of the parse{Statement,Expression,StaticBlock,VariableInitializer} which can return parse errors - please see the attached text. Please review, thanks.
Comment 7 Martin Entlicher 2010-11-25 17:02:07 UTC
For me the change is fine. Thanks.

Javadoc says that methods return:
"@return parsed {@link StatementTree} or null?"
Do they return null iff there's an error (errors.size() > 0)?
Comment 8 Marian Mirilovic 2012-10-22 20:11:25 UTC
what is the status of this issue ? 

It looks like you were waiting for FAST API review initiated 2 years ago ...
Comment 9 Svata Dedic 2013-08-08 09:15:30 UTC
Seems still valid in 7.4
Comment 10 Jaroslav Tulach 2014-11-05 12:20:59 UTC
This is an open API review. Can you finish it or close it?
Comment 11 Martin Balin 2016-07-07 07:17:03 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo