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.
This bug was originally marked as duplicate of bug 165043, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related. Build: NetBeans IDE Dev (Build 201008260001) VM: Java HotSpot(TM) Client VM, 16.3-b01, Java(TM) SE Runtime Environment, 1.6.0_20-b02 OS: Windows XP User Comments: ovk: entered / as a name for a new APDU Script Stacktrace: java.lang.IllegalArgumentException: / at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FolderObj.createDataImpl(FolderObj.java:244) at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FolderObj$1.call(FolderObj.java:226) at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FolderObj$1.call(FolderObj.java:224) at org.netbeans.modules.masterfs.filebasedfs.FileBasedFileSystem.runAsInconsistent(FileBasedFileSystem.java:115) at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FolderObj.createData(FolderObj.java:229) at org.openide.filesystems.FileUtil.copyFileImpl(FileUtil.java:713)
Created attachment 101692 [details] stacktrace
User error? "/" is not valid name for a file. core-main#6786f5a2830e
Integrated into 'main-golden', will be available in build *201008310001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/6786f5a2830e User: Jaroslav Tulach <jtulach@netbeans.org> Log: #189914: Is IOException better than IllegalStateArgument one?
I think the fix is wrong and should be reverted. The Javadoc for createData specifically prohibits slashes; attempts to call methods with invalid arguments should be rejected with IllegalArgumentException. The real bug is probably in the JavaCard template wizard, which should reject such illegal file names using a localized error message; the current fix will just let the wizard be finished and then display a different kind of exception later.
Define "wrong"! Throwing IOException instead of not documented ISE is imho better, although not 100% compatible change. I want to keep it. If you believe the JavaCard module shall be fixed, reopen and reassign.
IAE is more appropriate than IOE for arguments passed to a method which directly contradict its stated prerequisites, when no actual I/O has even been performed. Note that the IOE is documented to be thrown for other reasons. The correct behavior is to throw IAE as before, and also document it. Anyway there is still a bug open in JC.
Reassigning a bunch of bugs still assigned to me - I haven't worked for Oracle in almost a year.
Uy... I *am* the default assignee for javacard...
Fixed in a1380b2a9bb7
Integrated into 'main-golden', will be available in build *201105290401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/2ac04bfd680d User: tboudreau@netbeans.org Log: #189906, #189914 - minor low hanging fruit in javacard; added friend module (soon to be added to contrib)