]> gerrit.simantics Code Review - simantics/sysdyn.git/commitdiff
Fix cast to correct type
authorhoharri <hoharri@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Wed, 6 Apr 2011 08:58:04 +0000 (08:58 +0000)
committerhoharri <hoharri@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Wed, 6 Apr 2011 08:58:04 +0000 (08:58 +0000)
git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@20355 ac1ea38d-2e2b-0410-8846-a27921b304fc

org.simantics.objmap/src/org/simantics/objmap/annotations/factories/OptionalRelatedElementsRuleFactory.java

index a3384486e13b0284e52114242d57fea5dee0f75d..0c68cd8767009b989f1fee18ec4cd8ec26a94f95 100644 (file)
@@ -21,6 +21,7 @@ import org.simantics.db.exception.ResourceNotFoundException;
 import org.simantics.db.exception.ServiceException;\r
 import org.simantics.db.exception.ValidationException;\r
 import org.simantics.objmap.IMappingRule;\r
+import org.simantics.objmap.annotations.OptionalRelatedElements;\r
 import org.simantics.objmap.annotations.RelatedElements;\r
 import org.simantics.objmap.rules.MappedElementsRule;\r
 import org.simantics.objmap.rules.domain.RelatedObjectsAccessor;\r
@@ -32,7 +33,7 @@ public class OptionalRelatedElementsRuleFactory implements IFieldRuleFactory {
 \r
     @Override\r
     public IMappingRule create(ReadGraph g, Annotation _annotation, Field field) throws ResourceNotFoundException, ValidationException, ServiceException {\r
-        RelatedElements annotation = (RelatedElements)_annotation;\r
+        OptionalRelatedElements annotation = (OptionalRelatedElements)_annotation;\r
         return new MappedElementsRule(\r
                 new RelatedObjectsAccessor(g.getResource(annotation.value()),\r
                         annotation.composition()),\r