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 135454

Summary: java.net.URISyntaxException: Illegal character in query at index 190: http://www.netbeans.info/appl2/?mod=satisfaction&action=start&userid=NB_JAVA_WEBEE_CND_RUBY_SOA_GLASSFISH_TOMCAT0201671f1-d3a7-44b
Product: ide Reporter: byteme <byteme>
Component: WelcomeAssignee: Stanislav Aubrecht <saubrecht>
Status: VERIFIED FIXED    
Severity: blocker CC: sustaining
Priority: P2    
Version: 6.x   
Hardware: All   
OS: All   
URL: http://statistics.netbeans.org/exceptions/detail.do?id=4615
Issue Type: DEFECT Exception Reporter: 4615
Attachments: stacktrace
stacktrace

Description byteme 2008-05-20 21:37:10 UTC
Build: NetBeans IDE 6.1 (Build 200804211638)
VM: Java HotSpot(TM) 64-Bit Server VM, 1.6.0_05-b13-52, Java(TM) SE Runtime Environment, 1.6.0_05-b13-120
OS: Mac OS X, 10.5.2, x86_64

User Comments: 
Just relaunched the ide after installing OpenOffice plugin.
Comment 1 byteme 2008-05-20 21:37:17 UTC
Created attachment 61645 [details]
stacktrace
Comment 2 henadiy 2008-05-21 13:37:54 UTC
Created attachment 61677 [details]
stacktrace
Comment 3 Exceptions Reporter 2008-06-14 09:33:43 UTC
This issue has already 50 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=4615
Comment 4 Peter Zavadsky 2008-06-18 22:20:09 UTC
Problem of this issue is that the client code which created the URL, didn't encode it to be compliant to RFC 2396.
Converting such URL to URI leads to URISyntaxException. According to the javadoc, it is up to the caller of URL
(creator) to encode it appropriately. See (http://java.sun.com/j2se/1.5.0/docs/api/java/net/URL.html).

The extbrowser module doesn't have any means to find out whether the URL is encoded or not and provide the encoding,
also it could be dangerous since it could break already encoded URL's. Therefore this issue should be correctly fixed
outside of extbrowser module, i.e. by the client code passing the URL to the URLDisplayer API.

Note: However there is one potential issue. I just checked the extbrowser code, and there is already some code which
tries to decode the URL inside the extbrowser. 
That is some fix from the past, and is clearly wrong, as it should be at the client side code. However, it is probably
too late to remove it at this moment (and find which client side actually needs it), as it could cause even more issues.

Also note that those 50 duplicates exceptions don't have to do anything with the extbrowser module (so they shouldn't be
linked here). However they are about the same problem, the client code, which creates the URL's, doesn't encode them
properly.
Comment 5 Peter Zavadsky 2008-06-18 22:59:49 UTC
This issue belongs to module, which creates the URL, and calls the URLDisplayer API.

I am not sure which module runs the URL, the URL points to NB survey (couldn't find suitable component/subcomponent). 
Please, pass it to responsible component/subcomponent.
Comment 6 Stanislav Aubrecht 2008-06-19 16:11:27 UTC
fixed in release61 clone: 29adbaf09b78
Comment 7 Stanislav Aubrecht 2008-06-19 16:23:48 UTC
hmm, just found out i don't have commit rights to release61 clone, so here's the patch instead:

diff -r 6fe58b5a9833 -r 29adbaf09b78 welcome/src/org/netbeans/modules/welcome/Bundle.properties
--- a/welcome/src/org/netbeans/modules/welcome/Bundle.properties	Thu Apr 17 23:17:17 2008 +0530
+++ b/welcome/src/org/netbeans/modules/welcome/Bundle.properties	Thu Jun 19 17:07:13 2008 +0200
@@ -56,7 +56,7 @@
 
 # {0} id of the user
 # {1} memory info
-MSG_FeedbackSurvey_URL=http://www.netbeans.info/appl2/?mod=satisfaction&action=start&userid={0}&memory={1}&version=NB61&build={2}
+MSG_FeedbackSurvey_URL=http://www.netbeans.info/appl2/?mod=satisfaction&action=start&userid={0}&memory={1}&version=NB61
 MSG_FeedbackSurvey_MinimalStartups=4
 MSG_FeedbackSurvey_AskTimes=3
 # 3 weeks = 168 * 3 * 3600 * 1000
Comment 8 pgebauer 2008-06-20 16:30:06 UTC
The fix has been ported into the release61_fixes branch:

http://hg.netbeans.org/release61_fixes/rev/dd8c1b605721
Comment 9 rbalada 2008-06-22 13:29:16 UTC
The fix has been integrated into "release61_fixes/l10n" repository

http://hg.netbeans.org/release61_fixes/l10n/rev/cdf360527fe5

Note: Japanese and Brazilian Portuguese translations had the affected key commented-out, thus English key was in effect.
Simplified Chinese had the affected key enabled, so I did commented-out appropriate section to keep translations of this
part synchronized. See changeset for more details.