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 160713 - java.net.URISyntaxException from issue panel
Summary: java.net.URISyntaxException from issue panel
Status: VERIFIED FIXED
Alias: None
Product: connecteddeveloper
Classification: Unclassified
Component: Bugzilla (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jan Stola
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-20 10:54 UTC by Jaromir Uhrik
Modified: 2009-07-27 09:20 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Screenshot from Vista... (39.13 KB, image/png)
2009-03-26 11:12 UTC, Jaromir Uhrik
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jaromir Uhrik 2009-03-20 10:54:13 UTC
Product Version: NetBeans IDE Dev (Build cdev-407-on-090320)
Java: 1.5.0_16; Java HotSpot(TM) Client VM 1.5.0_16-133
System: Mac OS X version 10.5.6 running on i386; MacRoman; en_US (nb)

java.net.URISyntaxException appears when clicking on attachment in issue panel. To reproduce just add an attachment
(Picture.png) to an issue and then click on the Picture.png link in the attachments list. The following exception appears:

java.net.URISyntaxException: Illegal character in path at index 17: file:/tmp/Picture 8133226.png
        at java.net.URI$Parser.fail(URI.java:2816)
        at java.net.URI$Parser.checkChars(URI.java:2989)
        at java.net.URI$Parser.parseHierarchical(URI.java:3073)
        at java.net.URI$Parser.parse(URI.java:3021)
        at java.net.URI.(URI.java:578)
        at java.net.URL.toURI(URL.java:916)
        at org.netbeans.modules.extbrowser.SimpleExtBrowserImpl.setURL(SimpleExtBrowserImpl.java:80)
        at org.openide.awt.HtmlBrowser$1URLSetter.run(HtmlBrowser.java:493)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
        at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:104)
        at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Comment 1 Jan Stola 2009-03-20 14:08:19 UTC
I am sorry, I am not able to reproduce this issue. Could you, please, provide more details? Does it happen for any 
attachment or for some special one? The exception says that there is some illegal character in the URL. The only 
suspicious character I can see is an empty space, but I can successfully attach and open an attachment with space in 
its name. Is there a different special character in the name of the (original or downloaded) file?
Comment 2 Jaromir Uhrik 2009-03-26 10:00:57 UTC
The problem is in space-character in the name of attached file. I tried to attach both (the same .png with and without
space in its name) and the exception appears when I click on the link of attachment containing space. Maybe another
circumstance is there - I am on Mac OS X. I will try on Vista and let you know soon.
Comment 3 Jaromir Uhrik 2009-03-26 11:08:50 UTC
On Vista there doesn't appear the exception. The IDE opens the link in browser but it appears as File Not Found.
See the attached screenshot where I tried to open linked 'Picture 99.png' (the browser ignores then suffix
'${number}.png' because the space is not translated to %20 in the file name).
Comment 4 Jaromir Uhrik 2009-03-26 11:12:20 UTC
Created attachment 78893 [details]
Screenshot from Vista...
Comment 5 Jan Stola 2009-03-26 11:22:26 UTC
> The IDE opens the link in browser but it appears as File Not Found.

I was able to reproduce this exception when I set Firefox as the default browser. It works correctly when I use IE as 
the default browser (which is my usual setting and the reason why I wasn't able to reproduce this problem sooner).
Comment 6 Jan Stola 2009-03-26 11:24:12 UTC
> I was able to reproduce this exception ...

Ups, I meant 'I was able to reproduce this _problem_ ...', I am still not able to reproduce the exception on Windows, 
of course.
Comment 7 Jan Stola 2009-03-26 11:47:31 UTC
I have fixed the problem that occurs on Windows. I believe that it should fix the problem on Mac as well.

Modified file: http://hg.netbeans.org/cdev/rev/7215e52cc9b5
Comment 8 Jaromir Uhrik 2009-03-26 17:03:17 UTC
Verified in own build of cdev repository:
Product Version: NetBeans IDE Dev (Build 090326)
Java: 1.5.0_16; Java HotSpot(TM) Client VM 1.5.0_16-133
System: Mac OS X version 10.5.6 running on i386; MacRoman; en_US (nb)