From: hoharri Date: Wed, 6 Apr 2011 08:58:04 +0000 (+0000) Subject: Fix cast to correct type X-Git-Tag: simantics-1.4RC1~48 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=0216219331dc02be82864213ed5dba0ed11e67c2;p=simantics%2Fsysdyn.git Fix cast to correct type git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@20355 ac1ea38d-2e2b-0410-8846-a27921b304fc --- diff --git a/org.simantics.objmap/src/org/simantics/objmap/annotations/factories/OptionalRelatedElementsRuleFactory.java b/org.simantics.objmap/src/org/simantics/objmap/annotations/factories/OptionalRelatedElementsRuleFactory.java index a3384486..0c68cd87 100644 --- a/org.simantics.objmap/src/org/simantics/objmap/annotations/factories/OptionalRelatedElementsRuleFactory.java +++ b/org.simantics.objmap/src/org/simantics/objmap/annotations/factories/OptionalRelatedElementsRuleFactory.java @@ -21,6 +21,7 @@ import org.simantics.db.exception.ResourceNotFoundException; import org.simantics.db.exception.ServiceException; import org.simantics.db.exception.ValidationException; import org.simantics.objmap.IMappingRule; +import org.simantics.objmap.annotations.OptionalRelatedElements; import org.simantics.objmap.annotations.RelatedElements; import org.simantics.objmap.rules.MappedElementsRule; import org.simantics.objmap.rules.domain.RelatedObjectsAccessor; @@ -32,7 +33,7 @@ public class OptionalRelatedElementsRuleFactory implements IFieldRuleFactory { @Override public IMappingRule create(ReadGraph g, Annotation _annotation, Field field) throws ResourceNotFoundException, ValidationException, ServiceException { - RelatedElements annotation = (RelatedElements)_annotation; + OptionalRelatedElements annotation = (OptionalRelatedElements)_annotation; return new MappedElementsRule( new RelatedObjectsAccessor(g.getResource(annotation.value()), annotation.composition()),