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.
build 20080915 while verifying issue 143108, the following exception popped up during pasting of a composite state element to an activity diagram unintentionally. see attached ide log file for complete exception. - create a state diagram and add a composite state - copy the composite state - create an activity diagram - paste the composite to the activity diagram java.lang.AssertionError at org.netbeans.modules.uml.diagrams.nodes.CompositeNodeWidget.duplicate(CompositeNodeWidget.java:118) at org.netbeans.modules.uml.drawingarea.actions.SceneAcceptProvider.accept(SceneAcceptProvider.java:296) at org.netbeans.modules.uml.drawingarea.actions.SceneAcceptProvider.accept(SceneAcceptProvider.java:205) at org.netbeans.modules.uml.drawingarea.actions.DiagramSceneAcceptAction.mouseClicked(DiagramSceneAcceptAction.java:78) at org.netbeans.api.visual.action.WidgetAction$Chain.mouseClicked(WidgetAction.java:752) at org.netbeans.api.visual.widget.SceneComponent$Operator$1.operate(SceneComponent.java:541) ...
Created attachment 69909 [details] ide log file
The same error below also occurred if I pasted a copied partition to the state diagram. Note that is says "CompositeNodeWidget.duplicate" instead of partition even though I copied and pasted the partition. java.lang.AssertionError at org.netbeans.modules.uml.diagrams.nodes.CompositeNodeWidget.duplicate(CompositeNodeWidget.java:118) at org.netbeans.modules.uml.drawingarea.actions.SceneAcceptProvider.accept(SceneAcceptProvider.java:296) at org.netbeans.modules.uml.drawingarea.actions.SceneAcceptProvider.accept(SceneAcceptProvider.java:205) at org.netbeans.modules.uml.drawingarea.actions.DiagramSceneAcceptAction.mouseClicked(DiagramSceneAcceptAction.java:78) at org.netbeans.api.visual.action.WidgetAction$Chain.mouseClicked(WidgetAction.java:752)
The element that was being copied into the activity diagram is not valid for the activity diagram. Therefore a widget is not created to represent the model element. However the copy logic was not handling the case of an invalid model element and therefore tried to duplicate the a null widget. The duplicate method was then throwing an exception because the passed in widget was null. http://hg.netbeans.org/uml-main?cmd=changeset;node=119c2af4b2ad
Reviewed
verified in build 20080917. Now if I pasted a partition to the state diagram, it doesn't work and no exception - that's good. I then went back to the activity diagram and do a paste there, the following exception popped up. See attached ide log file for complete exception. java.lang.NullPointerException at org.netbeans.modules.uml.core.metamodel.infrastructure.RelationFactory$RelationRetriever.addToElementMap(RelationFactory.java:1043) at org.netbeans.modules.uml.core.metamodel.infrastructure.RelationFactory$RelationRetriever.<init>(RelationFactory.java:1021) at org.netbeans.modules.uml.core.metamodel.infrastructure.RelationFactory.determineCommonRelations3(RelationFactory.java:568) at org.netbeans.modules.uml.diagrams.UMLRelationshipDiscovery.createCommonRelations(UMLRelationshipDiscovery.java:257) ...
Created attachment 70070 [details] ide log file
I also got this same exception if I copied a composite state and pasted it to the activity diagram which doesn't work. Then, going back to the state diagram and do paste there. The exception popped up.
Fixed http://hg.netbeans.org/uml-main/rev/60848149959c
verified in build 20080919.