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 48621 - AssertionError after opening New File wizard
Summary: AssertionError after opening New File wizard
Status: CLOSED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Classpath (show other bugs)
Version: 4.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@java
URL:
Keywords: REGRESSION
: 48615 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-09-07 23:00 UTC by Marian Mirilovic
Modified: 2006-03-24 10:08 UTC (History)
3 users (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 Marian Mirilovic 2004-09-07 23:00:57 UTC
[nb_dev](200409071800), [jdk1.5.0](rc)

If you open New File wizard, AssertionError is
logged to console :


Exception in thread "Default RequestProcessor"
java.lang.AssertionError: Should have found an
EXTERNAL URL matching
MultiFileObject@1062d8b[nbfs://nbhost/SystemFileSystem/Templates/Classes/]
        at
org.netbeans.spi.java.classpath.support.ClassPathSupport.createClassPath(ClassPathSupport.java:103)
        at
org.netbeans.modules.java.j2seplatform.platformdefinition.DefaultClassPathProvider.findClassPath(DefaultClassPathProvider.java:117)
        at
org.netbeans.api.java.classpath.ClassPath.getClassPath(ClassPath.java:396)
        at
org.netbeans.modules.javacore.JMManager.getResource(JMManager.java:416)
        at
org.netbeans.modules.javacore.JMManager.getResource(JMManager.java:401)
        at
org.netbeans.modules.java.bridge.SrcElementImpl.getDelegate(SrcElementImpl.java:72)
        at
org.netbeans.modules.java.bridge.SrcElementImpl.addPropertyChangeListener(SrcElementImpl.java:283)
        at
org.openide.src.Element.addPropertyChangeListener(Element.java:62)
        at
org.netbeans.modules.java.JavaParserGlue.<init>(JavaParserGlue.java:102)
        at
org.netbeans.modules.java.JavaDataObject.initializeParsingSupport(JavaDataObject.java:191)
        at
org.netbeans.modules.java.JavaDataObject.createCookie(JavaDataObject.java:841)
        at
org.openide.nodes.CookieSet$CookieEntry.getCookie(CookieSet.java:335)
        at
org.openide.nodes.CookieSet.getCookie(CookieSet.java:93)
        at
org.openide.loaders.MultiDataObject.getCookie(MultiDataObject.java:687)
        at
org.netbeans.modules.java.JavaDataObject.getCookie(JavaDataObject.java:816)
        at
org.netbeans.modules.java.JavaNode$4.run(JavaNode.java:770)
        at org.openide.util.Task.run(Task.java:136)
        at
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:330)
        at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:686)
Comment 1 Jan Becicka 2004-09-08 12:35:21 UTC
This regression was caused by this commit. Pavle, can you fix it?
Modified:    src/org/netbeans/modules/java JavaNode.java
  Log:
  #48548: First opening java file performance improved.
  
  Revision  Changes    Path
  1.118     +2 -0      java/src/org/netbeans/modules/java/JavaNode.java

Comment 2 Jan Becicka 2004-09-08 16:08:47 UTC
*** Issue 48615 has been marked as a duplicate of this issue. ***
Comment 3 Jesse Glick 2004-09-08 16:40:38 UTC
IMHO this is a bug in ClassPathSupport. It should not reject internal
URLs; there is nothing in the Classpath API that specifically forbids
internal URLs. Just use FileObject.getURL and use the result, whatever
it is. Some other code in the IDE (i.e. javacore) will presumably need
to be made more robust than it probably is now - will need to
explicitly check the incoming URLs it receives, and just pass over
URLs which it cannot handle (i.e. which are not file: or jar:file: URLs).
Comment 4 Pavel Flaska 2004-10-15 13:53:11 UTC
The code in JavaNode which is on stack was removed in revision 1.121,
reassigning back to evaluate problem which Jesse described.
Comment 5 Tomas Zezula 2004-10-26 16:04:41 UTC
Checking in
src/org/netbeans/spi/java/classpath/support/ClassPathSupport.java;
/cvs/java/api/src/org/netbeans/spi/java/classpath/support/ClassPathSupport.java,v
 <--  ClassPathSupport.java
new revision: 1.7; previous revision: 1.6
done
Comment 6 Jesse Glick 2004-10-26 18:21:07 UTC
Tomas: What effect will a nbfs URL now have on FileScanner when it
tries to do new File(URI)? It will throw an IllegalArgumentException
in its constructor (which BTW it does not declare - bad!); who catches
that and how is it handled?
Comment 7 Tomas Zezula 2004-10-27 09:51:41 UTC
Thanks Jesse, this is my mistake. I've forgot to commit javacore
module, where I do test that url is either file or jar with file.
I am going to commit it.
Comment 8 Marian Mirilovic 2004-12-06 16:27:06 UTC
verified in NB4.1