X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;ds=sidebyside;f=runtime%2Forg.argeo.slc.support.jcr%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fslc%2Fjcr%2Fexecution%2FJcrProcessThread.java;fp=runtime%2Forg.argeo.slc.support.jcr%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fslc%2Fjcr%2Fexecution%2FJcrProcessThread.java;h=1c97322bda6f344b49db5f2fd4ceb5a1dce8b14b;hb=615e659f0f733763ada90e5989899bee5e5a57d6;hp=26e3737b0be824d3cd0f257a7595ab1629024c5f;hpb=dd737627cf2209c2f27a640a3e85fb01ed9b953f;p=gpl%2Fargeo-slc.git diff --git a/runtime/org.argeo.slc.support.jcr/src/main/java/org/argeo/slc/jcr/execution/JcrProcessThread.java b/runtime/org.argeo.slc.support.jcr/src/main/java/org/argeo/slc/jcr/execution/JcrProcessThread.java index 26e3737b0..1c97322bd 100644 --- a/runtime/org.argeo.slc.support.jcr/src/main/java/org/argeo/slc/jcr/execution/JcrProcessThread.java +++ b/runtime/org.argeo.slc.support.jcr/src/main/java/org/argeo/slc/jcr/execution/JcrProcessThread.java @@ -87,20 +87,6 @@ public class JcrProcessThread extends ProcessThread implements SlcNames { .getString(); Object value = PrimitiveUtils.convert(type, valueStr); values.put(attrName, value); - // Property prop = flowNode.getNode(attrName).getProperty( - // SLC_VALUE); - // // yes, this could be a switch... (patches welcome) - // if (prop.getType() == PropertyType.STRING) - // values.put(attrName, prop.getString()); - // else if (prop.getType() == PropertyType.LONG) - // values.put(attrName, prop.getLong()); - // else if (prop.getType() == PropertyType.DOUBLE) - // values.put(attrName, prop.getDouble()); - // else if (prop.getType() == PropertyType.BOOLEAN) - // values.put(attrName, prop.getBoolean()); - // else - // throw new SlcException("Unsupported value type " - // + PropertyType.nameFromValue(prop.getType())); } else { ExecutionSpecAttribute attr = attrs.get(attrName); Object value = attr.getValue(); @@ -128,14 +114,15 @@ public class JcrProcessThread extends ProcessThread implements SlcNames { .isNodeType(SlcTypes.SLC_PRIMITIVE_SPEC_ATTRIBUTE)) { String type = specAttrNode.getProperty(SLC_TYPE) .getString(); + Object value = null; if (specAttrNode.hasProperty(SLC_VALUE)) { String valueStr = specAttrNode.getProperty(SLC_VALUE) .getString(); - Object value = PrimitiveUtils.convert(type, valueStr); - PrimitiveSpecAttribute specAttr = new PrimitiveSpecAttribute( - type, value); - attrs.put(specAttrNode.getName(), specAttr); + value = PrimitiveUtils.convert(type, valueStr); } + PrimitiveSpecAttribute specAttr = new PrimitiveSpecAttribute( + type, value); + attrs.put(specAttrNode.getName(), specAttr); } }