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.
Summary: | Illegal character (probably underscore) in hostname | ||
---|---|---|---|
Product: | platform | Reporter: | krauth |
Component: | Filesystems | Assignee: | Jaroslav Havlin <jhavlin> |
Status: | RESOLVED WONTFIX | ||
Severity: | normal | CC: | exceptions_reporter, jtulach, mkleint |
Priority: | P3 | ||
Version: | 7.3 | ||
Hardware: | PC | ||
OS: | Windows 7 | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: | Messages log |
reassigning to filesystems. we have a valid FileObject and calling toUrl throws exception that is not mentioned in toUrl javadoc. please evaluate 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); + } } *** Bug 229026 has been marked as a duplicate of this bug. *** (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. 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? I've tried replacing "_" with "%5F", just in case it works, but it didn't help. 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. Нужно убрать нижнее подчёркивание( _ ) в пути имени файла -"It is necessary to remove the underscore in the file name path"... |
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.