Reverted: Changes done at r#1857089 and r#1857090 (OFBIZ-10911)(OFBIZ-10912)
The Cleanups introduced by those revisions has introduced some unexpected regressions making the Gradle ‘loadAll’ task fail. git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1857091 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -197,7 +197,9 @@ public final class ScriptUtil {
|
||||
localContext.put("context", context);
|
||||
ScriptContext scriptContext = new SimpleScriptContext();
|
||||
ScriptHelper helper = new ScriptHelperImpl(scriptContext);
|
||||
localContext.put(SCRIPT_HELPER_KEY, helper);
|
||||
if (helper != null) {
|
||||
localContext.put(SCRIPT_HELPER_KEY, helper);
|
||||
}
|
||||
Bindings bindings = new SimpleBindings(localContext);
|
||||
scriptContext.setBindings(bindings, ScriptContext.ENGINE_SCOPE);
|
||||
return scriptContext;
|
||||
|
||||
@@ -136,6 +136,7 @@ public final class UtilURL {
|
||||
}
|
||||
} catch (java.net.MalformedURLException e) {
|
||||
Debug.logError(e, "unable to retrieve URL for file: " + filename, module);
|
||||
url = null;
|
||||
}
|
||||
return url;
|
||||
}
|
||||
|
||||
+1
-3
@@ -341,7 +341,7 @@ public final class FreeMarkerWorker {
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static <T> T unwrap(Object o) {
|
||||
Object returnObj;
|
||||
Object returnObj = null;
|
||||
|
||||
if (o == TemplateModel.NOTHING) {
|
||||
returnObj = null;
|
||||
@@ -349,8 +349,6 @@ public final class FreeMarkerWorker {
|
||||
returnObj = o.toString();
|
||||
} else if (o instanceof BeanModel) {
|
||||
returnObj = ((BeanModel) o).getWrappedObject();
|
||||
} else {
|
||||
returnObj = null;
|
||||
}
|
||||
|
||||
return (T) returnObj;
|
||||
|
||||
Reference in New Issue
Block a user