Issue #332

Provided/Required Interfaces links appear in double when using the same Interface in different opened diagrams.

Added by Christophe Demeulemeester 7 months ago. Updated 6 months ago.

Status:ResolvedStart date:16 January 2018
Priority:MediumDue date:
Assignee:Cédric Marin% Done:

50%

Category:-
Target version:Modelio 3.7.1

Description

Provided/Required Interfaces links appear in double when using the same Interface in different opened diagrams.

Steps to reproduce:

  1. Create a Class Diagram CD1.
  2. In CD1 create 2 Components C1 and C2.
  3. Add some Ports P1 and P2 on C1 and C2.
  4. Add a Provided Interface on P1 and a Required Interface on P2.
  5. Create 2 Interfaces I1 and I2 in the model.
  6. In CD1, set I1 as Provided Interface and I2 as Required Interface.
  7. Without closing CD1, create another Class Diagram CD2.
  8. In CD2 create 2 Components C3 and C4.
  9. Add some Ports P3 and P4 on C3 and C4.
  10. Add a Provided Interface on P3 and a Required Interface on P4.
  11. Set I1 as Provided Interface and I2 as Required Interface.
  12. Check CD1 diagram –> The Provided/Required Interfaces links appear in double and “org.modelio.diagram.persistence.PersistenceException” appears in the log.

Log extract:

org.modelio.diagram.persistence.PersistenceException: Index: 5, Size: 3
    at org.modelio.diagram.persistence.XmlDiagramReader.readDiagram(XmlDiagramReader.java:551)
    at org.modelio.diagram.elements.common.abstractdiagram.DiagramPersistence.load(DiagramPersistence.java:86)
    at org.modelio.diagram.elements.common.abstractdiagram.GmAbstractDiagram.loadFromPersistence(GmAbstractDiagram.java:852)
    at org.modelio.diagram.elements.common.abstractdiagram.GmAbstractDiagram$VisibleDiagramRefresher.visibilityChanged(GmAbstractDiagram.java:1254)
    at org.modelio.diagram.elements.common.abstractdiagram.GmAbstractDiagram.enableRefresh(GmAbstractDiagram.java:401)
    at org.modelio.diagram.editor.AbstractDiagramEditor$1.partVisible(AbstractDiagramEditor.java:506)
    ...
Caused by: java.lang.IndexOutOfBoundsException: Index: 5, Size: 3
    at java.util.ArrayList.rangeCheckForAdd(ArrayList.java:661)
    ...
    at org.modelio.diagram.elements.core.model.GmAbstractObject.firePropertyChange(GmAbstractObject.java:262)
    ...
    at org.modelio.diagram.persistence.XmlDiagramReader.readDiagram(XmlDiagramReader.java:548)
    ... 93 more

Subtasks

Issue #333: Internal error while moving position of an interface afte...ResolvedCédric Marin

History

#1 Updated by Christophe Demeulemeester 7 months ago

  • Description updated (diff)

#2 Updated by Cédric Marin 6 months ago

  • Status changed from New to Resolved
  • Assignee set to Cédric Marin
  • Target version set to Modelio 3.7.1
  • % Done changed from 0 to 50

Fixed for Modelio 3.7.1

Also available in: Atom PDF