Closed eclipse-ocl-bot closed 1 month ago
By Christian Damus on Mar 15, 2007 17:55
Updated the kind literals to use initial capitals.
It turns out that they were originally lower-case because in the grammar they clash with the "keyword" tokens defined for recognition of collection type declarations, e.g., Set(String). I fixed the grammar to additionally recognize these words in enumeration literals.
By Ed Willink on Mar 18, 2007 07:04
Unfortunately this is a breaking change.
Models were previously serialised as kind="orderedSet" so an Ecore reload fails.
Perhaps the old (or case-independent) spellings need to be retained for use by readers (in ExpressionsFactoryImpl.createCollectionKindFromString).
[The corresponding change for 176110 is in the updated CVS for GMT/UMLX]
[The OCL project has 13 possible null warnings -some of which are genuine.]
By Christian Damus on Mar 19, 2007 09:53
Yes, this is a breaking change, but this schema was only introduced in the 1.1 stream (in M5), so that should be OK. Note that the org.eclipse.emf.ocl (1.0) API is unaffected; that version of the schema isn't changed. A search-and-replace in existing documents created with 1.1 M5 should fix them up easily; I'll add a note on that in the M6 new & noteworthy.
What do you mean by "possible null warnings"?
By Ed Willink on Mar 19, 2007 17:12
Following from 'my' CVS fetch of the ocl plug-in compiled with warnings\ for 'Null Referednce' 'Potential Programming Problems'
Severity and Description Path Resource Location Creation Time Id\ The variable args may be null my.org.eclipse.ocl/src/org/eclipse/ocl/util TypeUtil.java line 307 1174338546890 480184\ The variable argVal may be null my.org.eclipse.ocl/src/org/eclipse/ocl/internal/evaluation EvaluationVisitorImpl.java line 1047 1174338547968 480200\ The variable bodyVal cannot be null; it was either set to a non-null value or assumed to be non-null when last used my.org.eclipse.ocl/src/org/eclipse/ocl/internal/evaluation IterationTemplateReject.java line 65 1174338547796 480198\ The variable bodyVal cannot be null; it was either set to a non-null value or assumed to be non-null when last used my.org.eclipse.ocl/src/org/eclipse/ocl/internal/evaluation IterationTemplateSelect.java line 65 1174338547796 480197\ The variable cstNode may be null my.org.eclipse.ocl/src/org/eclipse/ocl/internal/parser OCLParser.java line 815 1174338547437 480190\ The variable cstNode may be null my.org.eclipse.ocl/src/org/eclipse/ocl/internal/parser OCLParser.java line 840 1174338547437 480191\ The variable elseexp may be null my.org.eclipse.ocl/src/org/eclipse/ocl/internal/parser ValidationVisitor.java line 583 1174338547328 480189\ The variable enumType cannot be null; it was either set to a non-null value or assumed to be non-null when last used my.org.eclipse.ocl/src/org/eclipse/ocl/internal/parser OCLParser.java line 3103 1174338547437 480193\ The variable implicitSource may be null my.org.eclipse.ocl/src/org/eclipse/ocl/internal/parser OCLParser.java line 3761 1174338547437 480195\ The variable literal cannot be null; it was either set to a non-null value or assumed to be non-null when last used my.org.eclipse.ocl/src/org/eclipse/ocl/internal/parser OCLParser.java line 3103 1174338547437 480194\ The variable source cannot be null; it was either set to a non-null value or assumed to be non-null when last used my.org.eclipse.ocl/src/org/eclipse/ocl/internal/parser OCLParser.java line 2213 1174338547437 480192\ The variable sourceVal cannot be null; it was either set to a non-null value or assumed to be non-null when last used my.org.eclipse.ocl/src/org/eclipse/ocl/internal/evaluation EvaluationVisitorImpl.java line 887 1174338547953 480199\ The variable thenexp may be null my.org.eclipse.ocl/src/org/eclipse/ocl/internal/parser ValidationVisitor.java line 582 1174338547328 480188
By Nick Boldt on Jan 28, 2008 16:37
Move to verified as per bug 206558.
By Nick Boldt on Jan 28, 2008 16:41
Move to verified as per bug 206558.
By Ed Willink on May 27, 2011 02:37
Closing after over a year in verified state.
By Ed Willink on May 27, 2011 02:40
Closing after over a year in verified state.
| --- | --- | | Bugzilla Link | 176308 | | Status | CLOSED FIXED | | Importance | P3 normal | | Reported | Mar 04, 2007 08:07 EDT | | Modified | May 27, 2011 02:40 EDT | | Version | 1.1.0 | | Reporter | Ed Willink |
Description
The official spellings of the CollectionKinds are Bag, OrderedSet, Sequence and Set.
Shouldn't these be at least one, if not both, of CollectionKind.name/literal values.
This would eliminate the need for e.g. ToStringVisitor to disencapsulate the content.