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 20127

Summary: Creating project with the name ending with space fires FileStateInvalidException
Product: projects Reporter: Jaromir Uhrik <juhrik>
Component: Generic InfrastructureAssignee: Vitezslav Stejskal <vstejskal>
Status: VERIFIED FIXED    
Severity: blocker CC: rmatous, ttran
Priority: P3 Keywords: SPACE_IN_PATH
Version: -FFJ-   
Hardware: PC   
OS: Windows ME/2000   
Issue Type: DEFECT Exception Reporter:

Description Jaromir Uhrik 2002-02-04 17:15:51 UTC
[FFJ3.0, build #010817; last jdk1.4]
1. Create new project (menu Project|Project Manager, button New).
2. Fill in the name of the project ending with space character
3. Exception (below) will pop up

Mon Feb 04 18:05:48 CET 2002: 
org.openide.filesystems.FileStateInvalidException: File NewProject  cannot be 
found in folder Projects.
org.openide.filesystems.FileStateInvalidException: File NewProject  cannot be 
found in folder Projects.
        at org.openide.filesystems.AbstractFileObject.createFolder
(AbstractFileObject.java:316)
        at org.openide.filesystems.FileUtil.createFolder(FileUtil.java:161)
        at org.openide.filesystems.MultiFileObject.createFolder
(MultiFileObject.java:737)
        at org.openide.filesystems.FileUtil.createFolder(FileUtil.java:161)
        at org.openide.filesystems.MultiFileObject.createFolder
(MultiFileObject.java:737)
        at org.openide.filesystems.FileUtil.createFolder(FileUtil.java:161)
        at org.netbeans.modules.projects.ProjectDataObject$1.run
(ProjectDataObject.java:67)
        at org.openide.filesystems.EventControl.runAtomicAction
(EventControl.java:69)
        at org.openide.filesystems.FileSystem.runAtomicAction
(FileSystem.java:366)
        at org.netbeans.modules.projects.ProjectDataObject.createProject
(ProjectDataObject.java:60)
        at org.netbeans.modules.projects.NewProjectAction.createProject
(NewProjectAction.java:99)
        at org.netbeans.modules.projects.ProjectManagerPanel.newProject
(ProjectManagerPanel.java:304)
        at org.netbeans.modules.projects.ProjectManagerPanel.access$1200
(ProjectManagerPanel.java:38)
        at org.netbeans.modules.projects.ProjectManagerPanel$11.run
(ProjectManagerPanel.java:267)
        at org.openide.util.Task.run(Task.java:124)
[catch] at org.openide.util.RequestProcessor$ProcessorThread.run
(RequestProcessor.java:626)
Comment 1 rmatous 2002-02-15 10:22:50 UTC
Problem is that name="abcde   " is created in OS filesystem as
"abcde". Then in LocalFileSystem after refresh is name also "abcde"
which doesn`t correspond to "abcde   " then exception is fired. 

From my point of view is result: wontfix.Perhaps the best place for
fixing is Project-name-dialog that could trim given name. 
Comment 2 _ ttran 2002-07-19 12:57:57 UTC
reopen and move to projects module.  We should trim (from both ends)
the project name the user types in the input dialog
Comment 3 Vitezslav Stejskal 2002-07-19 14:34:37 UTC
fixed in main trunk
Comment 4 Jaromir Uhrik 2002-10-14 13:47:22 UTC
Verified in dev build #200210140100