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 25082 - The IDE is not robust against .settings files (SAXParseException)
Summary: The IDE is not robust against .settings files (SAXParseException)
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 3.x
Hardware: Sun SunOS
: P2 blocker (vote)
Assignee: Jan Pokorsky
URL:
Keywords:
: 25089 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-06-24 13:39 UTC by Jan Lahoda
Modified: 2008-12-22 21:45 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
The exception thrown for empty .settings file. (6.54 KB, text/plain)
2002-06-24 13:40 UTC, Jan Lahoda
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Lahoda 2002-06-24 13:39:45 UTC
200206240100, JDK1.4fcs, MDI.
Consider you have some .settings file on some of
your filesystems. But this file is NOT IDE
settings file (XML), it is just another's
application setting (for example, DT settings).
The IDE is not able to cope with this situation,
it just throws an exception (SAXParseException).
This situation may occur on NetBeans platform very
easily, as the home directory is mounted by
default, and the DT's .settings files are there.
The exception thrown by empty .settings file is
attached.
Comment 1 Jan Lahoda 2002-06-24 13:40:42 UTC
Created attachment 6390 [details]
The exception thrown for empty .settings file.
Comment 2 _ ttran 2002-06-25 07:14:30 UTC
I remember something similiar happened in the past: the IDE initiate
an object even for .settings file in user data directories.  We should
 completely ignore *.settings outside of SystemFileSystem.
Comment 3 _ ttran 2002-06-25 07:16:05 UTC
*** Issue 25089 has been marked as a duplicate of this issue. ***
Comment 4 _ ttran 2002-06-25 07:18:06 UTC
embarassing defect, more people are running into this problem =>
raised prio to P2
Comment 5 Jan Pokorsky 2002-06-25 13:58:40 UTC
It is NOT possible to completely ignore *.settings outside of 
SystemFileSystem. E.g. new projects use own filesystem to persit 
settings. Module writers can register own loader handling .settings 
file located on other filesystems than SFS and the loader takes 
precedence.

To check files to be well-formed or valid xml document I see as 
a performance issue.

So, I would propose to introduce FileSystemCapability.SYSTEM in order 
to distinguish filesystems that can contain just IDE .settings files. 
The settings loader would recognize files coming just from that 
filesystems.
Comment 6 Jesse Glick 2002-06-26 20:03:16 UTC
FSCap.SYSTEM is an interesting idea. Could be used also for issue
#22628 and other things. Seems too late in the 3.4 cycle to be
introducing a new API like that however. Would not recommend trying to
solve this for 3.4. The parse error should at least be marked
INFORMATIONAL so it does not greatly disturb average users.
Comment 7 Jan Pokorsky 2002-06-27 20:22:49 UTC
Jesse, I would refine a bit your suggestion for 3.4 release. 
Exceptions related to file objects placed in non-system filesystems 
could be ignored at all. All others can be notified with the default 
severity as so far.

To FSCap.SYSTEM, in my private talk to Jarda, he strongly refused 
using FSCap because it can be deprecated soon. But he did not suggest 
other alternative.
Comment 8 Jesse Glick 2002-06-27 21:09:44 UTC
Agreed on both points.
Comment 9 Jan Pokorsky 2002-06-28 11:50:52 UTC
fixed in

org/netbeans/core/xml/FileEntityResolver.java,v 1.17
Comment 10 Jan Lahoda 2002-10-17 17:04:49 UTC
No exceptions thrown on 200210160100. Verified.
Comment 11 Quality Engineering 2003-07-01 16:21:09 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.