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.
040908 custom. Open platform manager. For default platform, click Sources, then Add Folder/JAR. Type in some nonexistent dir name, e.g. by just using the file chooser wrong (e.g. double-clicking a folder rather than single-clicking before selecting Add). Exception is thrown. 1. Someone forgot to add '/' to the folder URL. 2. Probably the file chooser dialog should not let you select the Add button to begin with unless you have entered a valid, existing JAR or folder. Check whether file.isDirectory() || (file.isFile() && FileUtil.isArchiveFile(file.toURI().toURL())). Otherwise disable the Add button.
The 2nd point is not too easy. To be correct there is no nice way how to force JFileChooser to do this. Ugly ways are Container.getComponents () ore use the JFileChooser as Component and create dialog with custom buttons. This causes problems with button placement.
I've talked about the JFileChooser with Radek, and he already solved this. He does the following: If the file does not exist and 2 last name components are the same he removes the last one from file name. Should I do the same?
Checking in j2seplatform/src/org/netbeans/modules/java/j2seplatform/libraries/J2SEVolumeCustomizer.java; /cvs/java/j2seplatform/src/org/netbeans/modules/java/j2seplatform/libraries/J2SEVolumeCustomizer.java,v <-- J2SEVolumeCustomizer.java new revision: 1.17; previous revision: 1.16 done Checking in j2seplatform/src/org/netbeans/modules/java/j2seplatform/libraries/VolumeContentModel.java; /cvs/java/j2seplatform/src/org/netbeans/modules/java/j2seplatform/libraries/VolumeContentModel.java,v <-- VolumeContentModel.java new revision: 1.5; previous revision: 1.4 done Processing log script arguments... More commits to come... Checking in j2seplatform/src/org/netbeans/modules/java/j2seplatform/platformdefinition/J2SEPlatformCustomizer.java; /cvs/java/j2seplatform/src/org/netbeans/modules/java/j2seplatform/platformdefinition/J2SEPlatformCustomizer.java,v <-- J2SEPlatformCustomizer.java new revision: 1.16; previous revision: 1.15 done
Close enough I guess.