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 41548

Summary: normalize all created java.io.File
Product: platform Reporter: David Konecny <dkonecny>
Component: NB JUnitAssignee: issues@platform <issues>
Status: RESOLVED FIXED    
Severity: blocker    
Priority: P1    
Version: 4.x   
Hardware: All   
OS: All   
Issue Type: TASK Exception Reporter:
Bug Depends on:    
Bug Blocks: 41448    

Description David Konecny 2004-03-31 15:13:29 UTC
Please check your code and whenever you are
creating instance of java.io.File from a String
entered by user or from some other external source
you have to normalize it, i.e. call
FileUtil.normalizeFile() method. Otherwise lot of
nasty problems will appear. 

For example I know that File returned from
getWorkingDir() is not normalized and on Windows
it can be old 8.3 path like "C:\PROGRA~1\..."
which can result in lot of nasty problems when
clients start converting path to URL/FileObject.

Thanx.
Comment 1 Jiri Skrivanek 2004-04-26 17:57:08 UTC
*** Issue 42469 has been marked as a duplicate of this issue. ***
Comment 2 Jiri Skrivanek 2004-04-26 19:32:42 UTC
Fixed as suggested.

/cvs/xtest/nbjunit/src/org/netbeans/junit/Manager.java,v  <-- 
Manager.java
new revision: 1.8; previous revision: 1.7
/cvs/xtest/nbjunit/src/org/netbeans/junit/NbTestCase.java,v  <-- 
NbTestCase.java
new revision: 1.23; previous revision: 1.22
Comment 3 David Konecny 2004-04-27 12:42:24 UTC
Thanx. I forgot that I already filed that. :-)
Comment 4 Marian Mirilovic 2009-10-01 14:34:05 UTC
fix status