X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=org.simantics.g3d%2Fsrc%2Forg%2Fsimantics%2Fg3d%2Fproperty%2FMethodWithMapValueProvider.java;h=eeae0dc89499dab28966d6083af0b74f977cfb5d;hb=488e24d71d14e60c7da3272e2428a0b23b57c87c;hp=256de3acc4bc0f31bae759f98831b10cda89f826;hpb=87b3241ec277ba3d8e414b26186a032c9cdcaeed;p=simantics%2F3d.git diff --git a/org.simantics.g3d/src/org/simantics/g3d/property/MethodWithMapValueProvider.java b/org.simantics.g3d/src/org/simantics/g3d/property/MethodWithMapValueProvider.java index 256de3ac..eeae0dc8 100644 --- a/org.simantics.g3d/src/org/simantics/g3d/property/MethodWithMapValueProvider.java +++ b/org.simantics.g3d/src/org/simantics/g3d/property/MethodWithMapValueProvider.java @@ -1,3 +1,14 @@ +/******************************************************************************* + * Copyright (c) 2012, 2013 Association for Decentralized Information Management in + * Industry THTH ry. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * VTT Technical Research Centre of Finland - initial API and implementation + *******************************************************************************/ package org.simantics.g3d.property; import java.lang.reflect.Method; @@ -18,9 +29,11 @@ public class MethodWithMapValueProvider implements ValueProvider { @Override public Object getValue(Object obj) throws Exception{ + @SuppressWarnings("unchecked") Map map = (Map)getter.invoke(obj); return map.get(key); } + @SuppressWarnings("unchecked") @Override public void setValue(Object obj, Object value) throws Exception { Map map = new HashMap();