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 14702 - Illegal use of FileSystem.get{Display,System}Name
Summary: Illegal use of FileSystem.get{Display,System}Name
Status: VERIFIED FIXED
Alias: None
Product: ide
Classification: Unclassified
Component: Internal Server (show other bugs)
Version: 3.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: _ rkubacki
URL:
Keywords:
Depends on:
Blocks: 18589
  Show dependency tree
 
Reported: 2001-08-22 21:46 UTC by Jesse Glick
Modified: 2003-02-26 12:22 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2001-08-22 21:46:49 UTC
Use of FileSystem.getDisplayName in HttpServerSettings and use of
FileSystem.getSystemName in JavadocServlet to produce URLs are both
wrong. A filesystem display name can be any localized string, maybe
with explanatory Japanese text in front. And a filesystem system name
is completely arbitrary; it could be a hash code for all you know. To
determine the disk directory, if any, corresponding to a filesystem
root or file object, use the proper methods in NbClassPath or
preferably now FileUtil (declaring dep on APIs 1.29).
Comment 1 _ rkubacki 2001-08-28 15:40:35 UTC
assigned
Comment 2 _ rkubacki 2001-10-23 14:04:19 UTC
getDisplayName in HttpServerSettings is definitely wrong (should be
getSystemName to work with JavadocServlet). 

OTOH getSystemName is not so bad IMO as the servlet need to encode
filesystem of given fileobject somehow without regard to
implementation of FS. Maybe that it is worth to be rewritten to use
URLEncoder and URLDecoder instead of its own mangling and solve
multibyte characters.
Comment 3 Jan Chalupa 2001-11-27 12:40:27 UTC
Target milestone 3.3.1.
Comment 4 Marek Grummich 2002-07-22 09:14:53 UTC
Set target milestone to TBD
Comment 5 Marek Grummich 2002-07-22 09:17:14 UTC
Set target milestone to TBD
Comment 6 _ rkubacki 2003-02-18 14:40:16 UTC
I guess that current usages are OK.
getDisplayName for page that lists all javadoc mount points
(http://localhost:8082/javadoc/) similar to View | Documentation indices. 

getSystemName is properly encoded before it is returned. It could be
problem if it changed during session but it is not currently the case.
Comment 7 Jesse Glick 2003-02-19 16:59:55 UTC
I think it is OK now.

BTW fs.getDisplayName() is added to HTML without any character
escaping. This is probably wrong; see XMLUtil Javadoc for hints how to
fix it.
Comment 8 Petr Jiricka 2003-02-26 12:22:02 UTC
Verified in 20030225.