| Summary: | [Net] NPE when hostname part of a URL contains underscore and using a proxy | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Julien HENRY <julien.henry> | ||||||
| Component: | Team | Assignee: | Platform Team Inbox <platform-team-inbox> | ||||||
| Status: | CLOSED WONTFIX | QA Contact: | |||||||
| Severity: | major | ||||||||
| Priority: | P3 | CC: | a.gurov, michael, tomasz.zarna, wojciech.galanciak | ||||||
| Version: | 3.6 | ||||||||
| Target Milestone: | --- | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows Vista | ||||||||
| Whiteboard: | stalebug | ||||||||
| Attachments: |
|
||||||||
|
Description
Julien HENRY
Created attachment 176972 [details]
Stacktrace
After more investigation, the error occurs even with NATIVE connexion mode. So only the DIRECT mode is working. Created attachment 179313 [details]
Stacktrace 2
With Helios I get a different stacktrace:
java.lang.NullPointerException
at org.eclipse.core.internal.net.StringMatcher.match(StringMatcher.java:223)
at org.eclipse.core.internal.net.ProxyManager.matchesFilter(ProxyManager.java:352)
at org.eclipse.core.internal.net.ProxyManager.isHostFiltered(ProxyManager.java:344)
at org.eclipse.core.internal.net.ProxyManager.getProxyDataForHost(ProxyManager.java:315)
at org.eclipse.core.internal.net.ProxyManager.getProxyDataForHost(ProxyManager.java:372)
at org.eclipse.team.svn.core.utility.SVNUtility.configureProxy(SVNUtility.java:809)
I finally managed to narrow down the issue. This is caused by an issue in the implementation of URI when there is a underscore in hostname. See http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5083594 and http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6587184 In org.eclipse.core.internal.net.ProxyManager.tryGetUri("http://my_svnhost") will return a not null URI object but calling getHost() on the URI will return null. The workaround mentioned in 6587184: FYI, to work around this problem with java.net.URI use org.apache.commons.httpclient.URI instead; it doesn't suffer from this bug. Test program to reproduce the bug: import java.net.URI; import java.net.URISyntaxException; public class Test { public static URI tryGetURI(String host) { try { int i = host.indexOf(":"); if (i == -1) { return new URI("//" + host); } return new URI(host.substring(i + 1)); } catch (URISyntaxException e) { return null; } } public static void main(String[] args) { System.out.println(tryGetURI("http://mysvnserver").getHost());// display mysvnserver System.out.println(tryGetURI("http://my_svnserver").getHost());// display null } } This bug should be moved to Platform Team (it is responsible for proxy). *** Bug 293078 has been marked as a duplicate of this bug. *** Hi! Thank you guys for your help! We will move this issue to the "Platform" as proposed. This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. |