+/*\r
+ * Copyright (C) 2010 Mathieu Baudier <mbaudier@argeo.org>\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
package org.argeo.slc.core.execution;\r
\r
import java.beans.PropertyDescriptor;\r
placeholder).toString();\r
\r
else {// execution\r
- log.debug("Bean class: " + bean.getClass());\r
// next call fail if no execution context available\r
Object obj = executionContext.getVariable(placeholder);\r
if (obj != null) {\r
String originalValue = tsv.getValue();\r
\r
String convertedValue = resolveString(beanName, bean, originalValue);\r
+ if (convertedValue == null)\r
+ return null;\r
return convertedValue.equals(originalValue) ? value\r
: new TypedStringValue(convertedValue);\r
} else if (value instanceof String) {\r
String originalValue = value.toString();\r
String convertedValue = resolveString(beanName, bean, originalValue);\r
+ if (convertedValue == null)\r
+ return null;\r
return convertedValue.equals(originalValue) ? value\r
: convertedValue;\r
} else if (value instanceof ManagedMap) {\r
}\r
return entriesModified ? newContent : value;\r
} else {\r
- //log.debug(beanName + ": " + value.getClass() + " : " + value);\r
+ // log.debug(beanName + ": " + value.getClass() + " : " + value);\r
return value;\r
}\r
\r
}\r
\r
private String resolveString(String beanName, Object bean, String strVal) {\r
+ // in case <null/> is passed\r
+ if (strVal == null)\r
+ return null;\r
+\r
String value = parseStringValue(bean, strVal, new HashSet<String>());\r
\r
if (value == null)\r
Set<String> visitedPlaceholders)\r
throws BeanDefinitionStoreException {\r
\r
+ // in case <null/> is passed\r
+ if (strVal == null)\r
+ return null;\r
+\r
StringBuffer buf = new StringBuffer(strVal);\r
\r
int startIndex = strVal.indexOf(placeholderPrefix);\r