From 0216219331dc02be82864213ed5dba0ed11e67c2 Mon Sep 17 00:00:00 2001 From: hoharri Date: Wed, 6 Apr 2011 08:58:04 +0000 Subject: [PATCH] Fix cast to correct type git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@20355 ac1ea38d-2e2b-0410-8846-a27921b304fc --- .../factories/OptionalRelatedElementsRuleFactory.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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()), -- 2.47.1