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 83840 - IllegalArgumentException creating New Folder if invalid parent folder is specified.
Summary: IllegalArgumentException creating New Folder if invalid parent folder is spec...
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Projects UI (show other bugs)
Version: 5.x
Hardware: All All
: P4 blocker (vote)
Assignee: Jan Lahoda
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-30 20:47 UTC by ssoong
Modified: 2007-01-03 09:33 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
NewFolderIllegalArgumentException (4.94 KB, text/plain)
2006-08-30 20:48 UTC, ssoong
Details
screenshot (32.11 KB, image/png)
2007-01-03 09:33 UTC, Milan Kubec
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ssoong 2006-08-30 20:47:01 UTC
NetBeans IDE Dev (Build 200608261800)
1.5.0_05; Java HotSpot(TM) Client VM 1.5.0_05-b05
Windows XP version 5.1 running on x86
==================================================

At project or file explorer,
right click on any folder -> new folder

Let the name of new folder to be created is zebra.
Specify the parent folder to have invalid XP filename characters like "z:\zoo",
so that the full path of new folder is something like,
"C:\Crappy Projects\Example\WebRoot\z:\zoo\zebra".

Clicking on finish would result in Exception window.
I think it is emotionally less traumatic to the programmer to encounter
a window that says,
"Illegal parent folder specified" or
"Illegal file name specified"

rather than a frightening exception window like this.
(Exception windows are always frightening and traumatic - 
"exception encountered traumatic syndrome"):

java.lang.IllegalArgumentException: Called DataObject.find on null
	at org.openide.loaders.DataObject.find(DataObject.java:445)
	at org.openide.loaders.DataFolder.findFolder(DataFolder.java:485)
	at 
org.netbeans.spi.project.ui.templates.support.Templates.setTargetFolder
(Templates.java:133)
	at 
org.netbeans.modules.project.ui.SimpleTargetChooserPanel.storeSettings
(SimpleTargetChooserPanel.java:168)
	at org.openide.WizardDescriptor.setValue(WizardDescriptor.java:1128)
	at 
org.netbeans.core.windows.services.NbPresenter$ButtonListener.actionPerformed
(NbPresenter.java:1026)
Comment 1 ssoong 2006-08-30 20:48:53 UTC
Created attachment 33431 [details]
NewFolderIllegalArgumentException
Comment 2 mslama 2006-09-05 16:43:55 UTC
Probably projects/ui could catch it and present it in some more user friendly way.
Comment 3 Milan Kubec 2007-01-03 09:32:51 UTC
There is error message in the wizard now, see attached image. Closing as fixed.
Comment 4 Milan Kubec 2007-01-03 09:33:49 UTC
Created attachment 36995 [details]
screenshot