]> 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
Use execDir to choose config and data dir when not forked.
[gpl/argeo-slc.git] / runtime / org.argeo.slc.support.simple / src / main / java / org / argeo / slc / core / execution / DefaultDescriptorConverter.java
index aa647553027bd035fb5b8fa69a303b88eca6a708..4a234f9f9219fce0398aa9901795127c7bf20859 100644 (file)
@@ -16,18 +16,21 @@ 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) {
+                                       RefValue refValue = (RefValue) value;
+                                       convertedValues.put(key, refValue.getLabel());
+                               }
                        }
                }
                return convertedValues;