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 189914 - IllegalArgumentException: /
Summary: IllegalArgumentException: /
Status: RESOLVED FIXED
Alias: None
Product: javacard
Classification: Unclassified
Component: Java Card (show other bugs)
Version: 6.x
Hardware: All All
: P4 normal (vote)
Assignee: issues@mobility
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-26 13:30 UTC by Oleg Khokhlov
Modified: 2011-05-29 12:08 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 172179


Attachments
stacktrace (4.06 KB, text/plain)
2010-08-26 13:30 UTC, Oleg Khokhlov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Oleg Khokhlov 2010-08-26 13:30:42 UTC
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)
Comment 1 Oleg Khokhlov 2010-08-26 13:30:47 UTC
Created attachment 101692 [details]
stacktrace
Comment 2 Jaroslav Tulach 2010-08-30 05:49:33 UTC
User error? "/" is not valid name for a file.

core-main#6786f5a2830e
Comment 3 Quality Engineering 2010-08-31 03:23:14 UTC
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?
Comment 4 Jesse Glick 2010-09-17 15:04:17 UTC
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.
Comment 5 Jaroslav Tulach 2010-09-17 17:43:13 UTC
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.
Comment 6 Jesse Glick 2010-09-17 18:07:44 UTC
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.
Comment 7 _ tboudreau 2011-05-26 01:59:42 UTC
Reassigning a bunch of bugs still assigned to me - I haven't worked for Oracle in almost a year.
Comment 8 _ tboudreau 2011-05-26 02:44:57 UTC
Uy... I *am* the default assignee for javacard...
Comment 9 _ tboudreau 2011-05-26 19:42:58 UTC
Fixed in a1380b2a9bb7
Comment 10 Quality Engineering 2011-05-29 12:08:50 UTC
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)