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 43997 - SourceForBinaryQuery returns empty array
Summary: SourceForBinaryQuery returns empty array
Status: CLOSED FIXED
Alias: None
Product: apisupport
Classification: Unclassified
Component: Project (show other bugs)
Version: 4.x
Hardware: PC Linux
: P2 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-28 15:29 UTC by Pavel Flaska
Modified: 2006-03-24 09:58 UTC (History)
1 user (show)

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 Pavel Flaska 2004-05-28 15:29:20 UTC
Steps to reproduce:
1. Open source file from project which depends on
another project (e.g. with imported ErrorManager),
2. clean 'Open API' project,
3. after error annotations are refreshed, you will
get error annotation 'cannot resolve symbol'.

We experienced this problem in our refactoring
build, but we thought that it is the same in trunk
build. We get empty array from
SourceForBinaryQuery.findSourceRoot(entry) where
entry represents original classpath element which
was cleaned.
Comment 1 Jesse Glick 2004-05-28 16:01:10 UTC
Strange, the current code should not care if the JAR exists or not.

Perhaps you are missing some entries in nbbuild/templates/modules.xml?
That would cause this problem.
Comment 2 Martin Matula 2004-05-28 17:04:40 UTC
We have tried this even with openide (cleaned openide module) and we
get the same result - source for openide was not returned.
Comment 3 Martin Matula 2004-05-28 19:53:31 UTC
Seems to be fixed by:

 User: tzezula 
  Date: 04/05/28 10:41:23

  Modified:    api/src/org/netbeans/api/java/queries
                        SourceForBinaryQuery.java
  Log:
  Fixing the case when the SPI implementor returns an empty array.
  
  Revision  Changes    Path
  1.5       +1 -1     
java/api/src/org/netbeans/api/java/queries/SourceForBinaryQuery.java
  
 
http://java.netbeans.org/source/browse/java/api/src/org/netbeans/api/java/queries/SourceForBinaryQuery.java.diff?r1=1.4&r2=1.5
 
Comment 4 pzajac 2005-08-02 10:09:44 UTC
verified