Hi Andreas,

I tryed in ArgoUML V0.24, and the current subversion version, but I can not reproduce this problem. Can you tell me exactly what you did step by step, or attach a small project that shows the issue?

Regards,
Michiel



----- Original Message ----- From: "Andreas Behnke" <[EMAIL PROTECTED]>
To: "ArgoUML Developer List" <[email protected]>
Sent: Thursday, April 24, 2008 11:44 AM
Subject: [argouml-dev] Exception adding "in State" / Activity Diagram


Hi,

if you add a State in the "in State" list of the ObjectFlowState,
an Exception is thrown:

Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: org.omg.uml.behavioralelements.statemachines.SimpleState$Impl cannot be cast to java.lang.Comparable
    at java.util.Arrays.mergeSort(Arrays.java:1144)
    at java.util.Arrays.sort(Arrays.java:1079)
    at java.util.Collections.sort(Collections.java:117)
    at org.argouml.util.SortedListModel.addAll(SortedListModel.java:153)
at org.argouml.uml.ui.UMLAddDialog.constructListModel(UMLAddDialog.java:298)
    [...]

The problem is that SortedListModel uses Collection.sort to sort the elements of a collection. The collection contains elements of type SimpleState$Impl, which in turn does not implement "Comparable".

How could this be fixed? org.omg.uml.behavioralelements.statemachines.SimpleState is a generated class, so how could this class implement another interface (Comparable)?

My workaround is to comment "Collection.sort" in SortedListModel, but this is no solution.

Andreas

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



--
No virus found in this incoming message.
Checked by AVG. Version: 7.5.524 / Virus Database: 269.23.3/1393 - Release Date: 23/04/2008 8:12




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to