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 195587 - Incorrect error badges about type assignability and throws-clauses after restoring binary classpath entries
Summary: Incorrect error badges about type assignability and throws-clauses after rest...
Status: RESOLVED WONTFIX
Alias: None
Product: editor
Classification: Unclassified
Component: Parsing & Indexing (show other bugs)
Version: 7.0
Hardware: PC Linux
: P3 normal (vote)
Assignee: Tomas Zezula
URL:
Keywords:
Depends on:
Blocks: 121950
  Show dependency tree
 
Reported: 2011-02-16 21:49 UTC by Jesse Glick
Modified: 2016-07-07 07:28 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2011-02-16 21:49:23 UTC
Using a dev build, I opened (File > Open) maven.indexer/src/org/netbeans/modules/maven/indexer/NexusRepositoryIndexerImpl.java from a clean checkout of release70_beta. This had a bunch of error marks, as expected - all the Maven libraries were not yet unpacked. I then did ant -f maven.indexer/build.xml to make sure all binary dependencies were in place; when that finished, the IDE rescanned the file. Now it had just two error marks, both anomalous:

1. Type hierarchy problem.

  iur.setResourceFetcher(new WagonFetcher(listener));

constructor WagonFetcher in class org.netbeans.modules.maven.indexer.NexusRepositoryIndexerImpl.WagonFetcher cannot be applied to given types;
  required: org.apache.maven.wagon.events.TransferListener
  found: org.netbeans.modules.maven.indexer.RemoteIndexTransferListener
  reason: actual argument org.netbeans.modules.maven.indexer.RemoteIndexTransferListener cannot be converted to org.apache.maven.wagon.events.TransferListener by method invocation conversion

If you navigate to the constructor in the same file

  WagonFetcher(TransferListener listener)

you can jump to TransferListener in cache source; and you can jump to RemoteIndexTransferListener in project sources, which implements TransferListener.

2. Throws-clause problem.

                ProjectBuildingResult res = getEmbedder().buildProject(projectArtifact, dpbr);
                if (res.getProject() != null) {
                    return res.getProject();
                }
            } catch (ProjectBuildingException ex) {

"ProjectBuildingException not thrown in body of corresponding try statement." or a similar message. "getEmbedder().buildProject" also produces no code completion. After jumping to MavenEmbedder, the file is marked with an error badge, though there is no line in error; then some scanning happens, and the badge disappears from MavenEmbedder; then I jump back to NexusRepositoryIndexerImpl and all error marks disappear from it, after

WARNING [org.netbeans.modules.java.source.tasklist.IncorrectErrorBadges]: Incorrect error badges detected, file=maven.indexer/src/org/netbeans/modules/maven/indexer/NexusRepositoryIndexerImpl.java.
WARNING [org.netbeans.modules.java.source.tasklist.IncorrectErrorBadges]: Going to recompute root=maven.indexer/src, files in error=[file:maven.indexer/src/org/netbeans/modules/maven/indexer/NexusRepositoryIndexerImpl.java].
WARNING [org.openide.util.WeakListenerImpl]: Can't remove java.beans.PropertyChangeListener using method removePropertyChangeListener from org.netbeans.modules.editor.NbEditorDocument@16bd9ec, mimeType='text/x-java', kitClass=null, length=6247, version=1, file=org.netbeans.modules.java.JavaDataObject@8d8199[MasterFileObject[maven.indexer/src/org/netbeans/modules/maven/indexer/RemoteIndexTransferListener.java@d5a5cd:1f0c26a,valid=true]]
Comment 1 Jan Lahoda 2011-02-18 16:52:13 UTC
Tomas promised to have a look.
Comment 2 Martin Balin 2016-07-07 07:28:58 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