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 67465 - AssertionError when changing NB platform
Summary: AssertionError when changing NB platform
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Ant Project (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jan Lahoda
URL:
Keywords:
: 69329 (view as bug list)
Depends on: 57748
Blocks:
  Show dependency tree
 
Reported: 2005-10-25 02:06 UTC by Rich Unger
Modified: 2005-12-07 15:38 UTC (History)
0 users

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 Rich Unger 2005-10-25 02:06:52 UTC
I changed from the default platform to my source tree's nbbuild/netbeans
directory, and got:

java.lang.AssertionError
	at
org.netbeans.spi.project.support.ant.AntProjectHelper.needPendingHook(AntProjectHelper.java:596)
	at
org.netbeans.spi.project.support.ant.ProjectProperties$1.run(ProjectProperties.java:224)
	at org.openide.filesystems.EventControl.runAtomicAction(EventControl.java:96)
	at org.openide.filesystems.FileSystem.runAtomicAction(FileSystem.java:450)
	at
org.netbeans.spi.project.support.ant.ProjectProperties$PP.write(ProjectProperties.java:203)
	at
org.netbeans.spi.project.support.ant.ProjectProperties.write(ProjectProperties.java:109)
	at
org.netbeans.spi.project.support.ant.AntProjectHelper.save(AntProjectHelper.java:536)
	at
org.netbeans.spi.project.support.ant.AntProjectHelper.access$100(AntProjectHelper.java:64)
	at
org.netbeans.spi.project.support.ant.AntProjectHelper$1.save(AntProjectHelper.java:102)
	at
org.netbeans.modules.project.ant.AntBasedProjectFactorySingleton.saveProject(AntBasedProjectFactorySingleton.java:189)
	at org.netbeans.api.project.ProjectManager$8.run(ProjectManager.java:535)
	at org.openide.util.Mutex.writeAccess(Mutex.java:324)
	at org.netbeans.api.project.ProjectManager.saveProject(ProjectManager.java:528)
	at
org.netbeans.modules.apisupport.project.ui.customizer.BasicCustomizer.save(BasicCustomizer.java:174)
	at
org.netbeans.modules.apisupport.project.ui.customizer.BasicCustomizer$OptionListener.actionPerformed(BasicCustomizer.java:231)
	at
org.netbeans.modules.project.uiapi.CustomizerDialog$OptionListener.actionPerformed(CustomizerDialog.java:134)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
Comment 1 Rich Unger 2005-10-25 02:20:00 UTC
OK, chalk this one up to ClearCase as well.  My suite's
nbproject/project.properties was read-only.  When I chmod it to rw, it works fine.
Comment 2 Jan Lahoda 2005-11-27 10:36:38 UTC
*** Issue 69329 has been marked as a duplicate of this issue. ***
Comment 3 Jan Lahoda 2005-11-27 12:05:31 UTC
Reproduced with old CVS support, when nbproject directory is checked-out read
only and added a GUI form into a source package.
Comment 4 Jan Lahoda 2005-12-07 14:11:10 UTC
The problem is (AFAIK) as follows:
1. Imagine a project that has only project.properties modified. Let the project
is being saved.
2. Let (during saving project.properties), a UserQuestionException is thrown:
the AntProjectHelper.needPendingHook is called. But, it enforces "pendingHook !=
null", which is not fullfilled, as the pendingHook variable is being filled if
project.xml is to be written.

The same applies to APH.cancelPendingHook and APH.maybeCallPendingHook.

I think that the assertions are not correct, I have deleted them for
needPendingHook and cancelPendingHook and replaced with "if" for
maybeCallPendingHook.

The user level scenario should be as follows:
0. Use old CVS support.
1. Have a J2SE project in the CVS.
2. Checkout the J2SE project read-only.
3. Open the project, go to some package.
4. Create a GUI form in the package.
5. =>the exception similar to this one appears.

Unfortunatelly, I will not be able to create a test for this.

Checking in AntProjectHelper.java;
/cvs/ant/project/src/org/netbeans/spi/project/support/ant/AntProjectHelper.java,v
 <--  AntProjectHelper.java
new revision: 1.34; previous revision: 1.33
done
Comment 5 Jesse Glick 2005-12-07 15:22:07 UTC
Hmm, I'll be happy when old VCS modules are gone and we can finally deprecate
UQE... (see issue #57748)
Comment 6 Jan Lahoda 2005-12-07 15:38:57 UTC
I absolutelly agree.