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 7059 - Java does not allow to set an extension list.
Summary: Java does not allow to set an extension list.
Status: CLOSED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 3.x
Hardware: PC Linux
: P2 critical (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2000-07-14 10:05 UTC by _ pkuzel
Modified: 2007-09-26 09:14 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IllegalArgumentException (3.42 KB, text/plain)
2000-09-07 15:19 UTC, Jan Becicka
Details
java.lang.ClassCastException (2.48 KB, text/plain)
2000-09-07 15:19 UTC, Jan Becicka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ pkuzel 2000-07-14 10:05:11 UTC
I'd like to have my fjscripts(*.scr) file recognized as JavaDataObjects because
the script is almost java. Other DataObject allow to specify extension but
JavaDO do not.
Comment 1 Svata Dedic 2000-08-02 16:56:59 UTC
Implemented in 2012, waiting for approval for 107*
Comment 2 Svata Dedic 2000-08-03 09:47:59 UTC
*** Bug 4446 has been marked as a duplicate of this bug. ***
Comment 3 Svata Dedic 2000-08-08 13:13:59 UTC
Integrated for 1074
Comment 4 Jan Becicka 2000-08-15 10:33:59 UTC
This feature is still not integrated in [1077].
Comment 5 Jan Becicka 2000-09-07 15:17:59 UTC
[1094]
Feature is working now, but there is a new bug:
It is possible to set Tools | Global Options | Object Types | Java source object
| Extensions to <Empty> (Simply by clicking Add button).

IDE can't now correctly recognize DataObjects and becomes unusable. There is no
way back!

java.lang.IllegalArgumentException and java.lang.ClassCastException are thrown.
Comment 6 Jan Becicka 2000-09-07 15:19:59 UTC
Created attachment 137 [details]
IllegalArgumentException
Comment 7 Svata Dedic 2000-09-07 15:41:59 UTC
ExtensionListEditor in the core accepts empty strings as valid extensions. Is it
correct ? It seems that enabling JavaDataObject handling empty extensions will
clash fith DataFolder representation object.
The behaviour of ExtensionList PE and the custom PE is incosistent. in-place PE
prohibits entering empty extensions while the custom one allows it.
Comment 8 Jan Chalupa 2000-11-27 10:38:59 UTC
IMO, the problem is in the JavaDataLoader.findPrimaryFile() method, which
allows folders to be recognized as JavaDataObject's primary files.

Adding the following line:

  if (fo.isFolder()) return null;

at the very beginning of the findPrimaryFile() method fixed the problem for me.
Please note that UniFileLoader.findPrimaryFile() does the same thing.
Comment 9 Jesse Glick 2000-11-27 16:22:59 UTC
Changing assignee.

Please note: yes, ExtensionListEditor does not permit empty extensions in
setAsText, while it does in the custom editor. But many propeds provide more
options in the custom editor where it is possible to make the GUI reasonable (I
doubt any user would understand the correct way to enter an empty extension as
text). So I don't consider this a bug in core. I think there was some other bug
report along these lines, please search for it if you disagree.

Please specify Version on this bug, it is not clear what it applies to.
Comment 10 Svata Dedic 2000-11-28 13:50:59 UTC
Fixed in trunk-79, rel31-17/
Comment 11 Jan Becicka 2000-12-11 15:20:59 UTC
BUG also appears in version : FFJ20
In FFJ20: some Exceptions are thrown, if add button is pressed (due to <Empty>)
Comment 12 Jan Becicka 2000-12-11 15:22:59 UTC
BUG also appears in version : FFJ20
In FFJ20: some Exceptions are thrown, if add button is pressed (due to <Empty>)
Comment 13 Quality Engineering 2003-07-01 13:18:19 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.