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 66573 - premature end of xml settings file after confirming no change in new OD
Summary: premature end of xml settings file after confirming no change in new OD
Status: RESOLVED WORKSFORME
Alias: None
Product: editor
Classification: Unclassified
Component: Settings (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: Martin Roskanin
URL:
Keywords: RANDOM
Depends on:
Blocks:
 
Reported: 2005-10-12 10:02 UTC by Martin Roskanin
Modified: 2007-11-05 13:42 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
premature EOF exc (4.49 KB, text/plain)
2005-10-12 10:06 UTC, Martin Roskanin
Details
write error causes empty macros.xml file (2.03 KB, text/plain)
2005-10-12 10:34 UTC, Martin Roskanin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Roskanin 2005-10-12 10:02:08 UTC
after confirming no change in OD empty macros.xml files created. They are
causing premature end of file exception later...

1. start IDE with empty user dir
2. invoke new OD
3. click on Editor and wait until settings are loaded
4. click OK

- several (attached) premature end of file errors occured
Comment 1 Martin Roskanin 2005-10-12 10:06:53 UTC
Created attachment 25842 [details]
premature EOF exc
Comment 2 Martin Roskanin 2005-10-12 10:34:34 UTC
Created attachment 25847 [details]
write error causes empty macros.xml file
Comment 3 Martin Roskanin 2005-10-12 12:14:57 UTC
probably more general issue. The similar problem was reproduced also in cvs
module - issue #65297
Comment 4 Jesse Glick 2005-10-12 16:21:43 UTC
I was able to reproduce for a while (JDK 1.5.0_05) but no more.

I cannot actually find any empty macros.xml files even when the error message is
printed. Where are they?

Could be caused by the most recent fix of issue #62006 (indentation handling for
XMLUtil.write in the presence of DOCTYPE and/or top-level comments), but
difficult to confirm because I cannot consistently reproduce.

MIMEOptionFile and MIMEOptionFolder seem to be flushing the OutputStream they
use, which is good. But is it also close()d?

Issue #66507 might be a dupe, perhaps.
Comment 5 Martin Roskanin 2005-10-14 15:36:19 UTC
I am not able to reproduce the problem in the latest dev build...
- macros.xml are are successfully created (under Editors/<mime-type>/ folder)
MIMEOptionFile and MIMEOptionFolder close()s the stream in finally block.
I am closing the issue for now. It seems it was fixed by some other commit. (I
was able to easily reproduce problem before...)