Bug 227750 - Illegal character (probably underscore) in hostname
Illegal character (probably underscore) in hostname
Status: RESOLVED WONTFIX
Product: platform
Classification: Unclassified
Component: Filesystems
7.3
PC Windows 7
: P3 (vote)
: TBD
Assigned To: Jaroslav Havlin
issues@platform
:
: 229026 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-03-20 23:25 UTC by krauth
Modified: 2013-08-19 13:40 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
Messages log (444.60 KB, application/octet-stream)
2013-03-20 23:25 UTC, krauth
Details

Note You need to log in before you can comment on or make changes to this bug.
Description krauth 2013-03-20 23:25:47 UTC
Created attachment 132880 [details]
Messages log

Opening a project created with a previous version of NetBeans. The project sits in the list of projects, but a right click does not pup up the context menu. So it can't be deleted from the interface.
Comment 1 Milos Kleint 2013-03-21 07:30:26 UTC
reassigning to filesystems. we have a valid FileObject and calling toUrl throws exception that is not mentioned in toUrl javadoc. please evaluate
Comment 2 Jaroslav Tulach 2013-07-09 09:47:05 UTC
The following test seems to pass OK (on Linux with UTF-8 encoding, the reporter uses Cp1252 encoding):

diff -r da0c3769e51d masterfs/test/unit/src/org/netbeans/modules/masterfs/filebasedfs/FileBasedURLMapperTest.java
--- a/masterfs/test/unit/src/org/netbeans/modules/masterfs/filebasedfs/FileBasedURLMapperTest.java      Tue Jul 09 06:29:38 2013 +0000
+++ b/masterfs/test/unit/src/org/netbeans/modules/masterfs/filebasedfs/FileBasedURLMapperTest.java      Tue Jul 09 11:46:14 2013 +0200
@@ -91,5 +91,9 @@
         assertEquals("192.168.0.201", uri.getHost());
         assertEquals("/data/services/web/com_resource/", uri.getPath());
     }
-    
+
+    public void testUnderscore() throws Exception {
+        URI uri = FileBasedURLMapper.toURI("/db_server/db-scripts/", true, '/');
+        assertNotNull(uri);
+    }
 }
Comment 3 Jaroslav Tulach 2013-07-09 09:51:48 UTC
*** Bug 229026 has been marked as a duplicate of this bug. ***
Comment 4 Jaroslav Havlin 2013-07-10 13:53:16 UTC
(In reply to comment #2)
> The following test seems to pass OK (on Linux with UTF-8 encoding, 
> the reporter uses Cp1252 encoding):
The test passes also on Windows with encoding Cp1252.
Comment 5 Jaroslav Havlin 2013-07-11 12:32:24 UTC
The following test (added to FileBasedURLMapperTest) fails:

public void testUnderscore2() throws Exception {
    URI uri = FileBasedURLMapper.toURI("//db_server/a/", true, '/');
    assertNotNull(uri);
}

In URI "//db_server/a/", host name is "db_server", which contains an underscore, which is not allowed. (Although some services support it.)

This probably cannot be fixed in NetBeans, because we need to work with URLs of files.
Workaround would be renaming of the host, or creating an alias for it.

Jarda, please, any ideas?
Comment 6 Jaroslav Havlin 2013-07-26 08:09:20 UTC
I've tried replacing "_" with "%5F", just in case it works, but it didn't help.
Comment 7 Jaroslav Havlin 2013-08-19 13:40:36 UTC
I'm sorry, I don't know how to fix this in NetBeans.
Underscore characters are not allowed in host names,
although it's possible to have such hosts in OS Windows.

Please, use IP addresses or create some underscore-free aliases
for the hosts that contain underscores.

Thank you.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo