]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - runtime/org.argeo.slc.support.simple/src/main/java/org/argeo/slc/core/execution/DefaultDescriptorConverter.java
Fix SVN issues
[gpl/argeo-slc.git] / runtime / org.argeo.slc.support.simple / src / main / java / org / argeo / slc / core / execution / DefaultDescriptorConverter.java
index aa647553027bd035fb5b8fa69a303b88eca6a708..2ae1e3639b9b6aed274da6035e3870b847cdb7ce 100644 (file)
@@ -16,18 +16,23 @@ public class DefaultDescriptorConverter implements
 
                Map<String, Object> convertedValues = new HashMap<String, Object>();
 
-               for (String key : values.keySet()) {
-                       Object value = values.get(key);
-                       if (value instanceof PrimitiveValue) {
-                               PrimitiveValue primitiveValue = (PrimitiveValue) value;
-
-                               // TODO: check that the class of the the primitiveValue.value
-                               // matches
-                               // the primitiveValue.type
-                               convertedValues.put(key, primitiveValue.getValue());
-                       } else if (value instanceof RefValue) {
-                               RefValue refValue = (RefValue) value;
-                               convertedValues.put(key, refValue.getLabel());
+               if (values != null) {
+                       for (String key : values.keySet()) {
+                               Object value = values.get(key);
+                               if (value instanceof PrimitiveValue) {
+                                       PrimitiveValue primitiveValue = (PrimitiveValue) value;
+
+                                       // TODO: check that the class of the the
+                                       // primitiveValue.value
+                                       // matches
+                                       // the primitiveValue.type
+                                       convertedValues.put(key, primitiveValue.getValue());
+                               } else if (value instanceof RefValue) {
+                                       // not yet implemented
+                                       
+//                                     RefValue refValue = (RefValue) value;
+//                                     convertedValues.put(key, refValue.getLabel());
+                               }
                        }
                }
                return convertedValues;