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 57794 - ProjectXmlSavedHook must be called later if UserQuestionException thrown
Summary: ProjectXmlSavedHook must be called later if UserQuestionException thrown
Status: CLOSED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Ant Project (show other bugs)
Version: 4.x
Hardware: All All
: P2 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on: 57748
Blocks:
  Show dependency tree
 
Reported: 2005-04-12 21:25 UTC by Jesse Glick
Modified: 2006-03-24 13:16 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2005-04-12 21:25:13 UTC
Detected while trying to fix issue #57480. If a UQE is thrown while trying to
write out a new project.xml, the ProjectXmlSavedHook must be called *after* the
user agrees to edit project.xml and new content is written, rather than within
the dynamic scope of ProjectManager.saveProject. Otherwise, an impl (such as
using GeneratedFilesHelper) will see the old project.xml, which can cause it to
behave incorrectly, e.g. not regenerating build-impl.xml with new content.
Comment 1 Jesse Glick 2005-04-12 22:16:53 UTC
Have patch. Ugly but seems to work.
Comment 2 Jesse Glick 2005-04-13 00:24:14 UTC
See commit log in #57791.
Comment 3 Jesse Glick 2005-04-13 00:31:00 UTC
Need QA assistance.
Comment 4 Milan Kubec 2005-04-13 09:17:36 UTC
Jesse, what is the manifestation of this bug for user? In other words how can I
reproduce it?
Comment 5 Jiri Kovalsky 2005-04-13 10:40:30 UTC
I am going to verify this together with issue #57480.
Comment 6 Jiri Kovalsky 2005-04-13 12:58:59 UTC
I have tried hard but couldn't reproduce the deadlock in continuous trunk build
#20050413-0713 of NetBeans 4.2. I agree with integration to release41 branch.
Comment 7 Jesse Glick 2005-04-13 14:02:57 UTC
"I have tried hard but couldn't reproduce the deadlock" - this isn't a deadlock!
Typo?

User effect: well if the fix for #57480 goes in, it will still not make
build-impl.xml be modified after e.g. adding a new subproject, so the build will
fail. It is because build-impl.xml is regenerated - but *before* the modified
project.xml is written to disk (since the user might not yet have agreed to
issue the edit command for project.xml).
Comment 8 Jiri Kovalsky 2005-04-14 14:04:34 UTC
Yes, sorry. Copy&paste error in a hurry. What I meant is that *.xml files were
correctly updated i.e. project could be run without problems.
Comment 9 Jesse Glick 2005-04-14 15:49:11 UTC
I guess I'll consider that verified.
Comment 10 Jesse Glick 2005-04-15 19:43:32 UTC
Merged w/ issue #57791.