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.

Bug 229902 - Parsing ignores Code Change
Summary: Parsing ignores Code Change
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Parsing & Indexing (show other bugs)
Version: 7.3
Hardware: PC Windows XP
: P2 normal (vote)
Assignee: Tomas Zezula
URL:
Keywords:
: 225268 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-05-17 07:46 UTC by bht
Modified: 2013-07-03 02:29 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Ant project test case in zip file (25.43 KB, application/zip)
2013-05-17 07:46 UTC, bht
Details

Note You need to log in before you can comment on or make changes to this bug.
Description bht 2013-05-17 07:46:24 UTC
Created attachment 134555 [details]
Ant project test case in zip file

Product Version: NetBeans IDE 7.3 (Build 201302132200)
Java: 1.7.0_15; Java HotSpot(TM) Client VM 23.7-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_15-b03
System: Windows XP version 5.1 running on x86; Cp1252; en_NZ (nb)

I change the method signature of a method in an interface, then subsequently change the implementation to match. Classes using this method that did not have the calls changed to match are not flagged as erroneous.

Normally one would expect parsing errors to highlight the classes in red.

But here this fails for some strange reason.

Only if I open the classes that call the changed method in the editor, then the IDE starts scanning once more and the errors are detected.


How to reproduce:

- Open the attached project
- In the editor, open files Offer.java, SessionLocal.java, Session.java, no more
- In Offer.java, disable comment block 1 between "Alternate block  1 start" and "Alternate block  1 end" with "//"
- In Offer.java, enable uncomment block 2 between "Alternate block  2 start" and "Alternate block  2 end"
- Save Offer.java
- In SessionLocal.java, disable comment line with "// Alternate 1"
- In SessionLocal.java, enaable uncomment line with "// Alternate 2"
- Save SessionLocal.java
- In Session.java, disable comment block 1 between "Alternate block  1 start" and "Alternate block  1 end" with "//"
- In Session.java, enable uncomment block 2 between "Alternate block  2 start" and "Alternate block  2 end"
- Save Session.java
- Press [Ctrl+1] to switch to the Projects window and watch SessionTest.java

Expected behavior: The SessionTest.java tree node should have a red error icon.

Actual behavior: The SessionTest.java tree node has the normal icon

- Open SessionTest.java in the editor

In the editor, the line List<Offer> resultList = instance.getFavoriteOffers(memberId);
shows an error. After a while scanning starts, and in the Projects window, the SessionTest.java tree node changes to the red error icon.

This reproduces always on my computer, and I have seen this also with a different recent dev build.
Comment 1 bht 2013-05-17 08:15:06 UTC
The missing eclipselink library reference can be deleted. This reproduces with NB started with an empty userdir.
Comment 2 bht 2013-05-17 23:12:01 UTC
Interesting that opening SessionTest.java in the editor without making changes to it starts scanning.
Comment 3 Tomas Zezula 2013-07-01 15:55:55 UTC
Fixed jet-main 4a800d6edcf7.
Thanks for sample project and perfect steps to reproduce!
Comment 4 Tomas Zezula 2013-07-02 12:48:27 UTC
*** Bug 225268 has been marked as a duplicate of this bug. ***
Comment 5 Quality Engineering 2013-07-03 02:29:41 UTC
Integrated into 'main-silver', will be available in build *201307022300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/4a800d6edcf7
User: Tomas Zezula <tzezula@netbeans.org>
Log: #229902:Parsing ignores Code Change