\r
import java.lang.annotation.Annotation;\r
import java.lang.reflect.Field;\r
+import java.util.Collection;\r
import java.util.Collections;\r
\r
import org.simantics.db.ReadGraph;\r
return new MappedElementsRule(\r
new RelatedObjectsAccessor(g.getResource(annotation.value()),\r
annotation.composition()),\r
- new FieldAccessorWithDefault(field, Collections.emptyList())\r
+ new FieldAccessorWithDefault<Collection<Object>>(field, Collections.emptyList())\r
);\r
}\r
\r
@Override\r
public T get(Object element) throws MappingException {\r
try {\r
- T result = (T)field.get(element);\r
+ @SuppressWarnings("unchecked")\r
+ T result = (T)field.get(element);\r
\r
if(LOGGER.isInfoEnabled())\r
LOGGER.info(" FieldAccessor.get " +\r