Author: adrianc
Date: Fri Oct 31 23:13:03 2014 New Revision: 1635878 URL: http://svn.apache.org/r1635878 Log: Remove Javolution from the widgets component. Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/ModelWidgetAction.java ofbiz/trunk/framework/widget/src/org/ofbiz/widget/WidgetFactory.java ofbiz/trunk/framework/widget/src/org/ofbiz/widget/WidgetWorker.java ofbiz/trunk/framework/widget/src/org/ofbiz/widget/cache/WidgetContextCacheKey.java ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelForm.java ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormAction.java ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlScreenRenderer.java ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ModelMenuAction.java ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ModelMenuCondition.java ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ModelMenuItem.java ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/HtmlWidget.java ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/MacroScreenRenderer.java ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreen.java ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenCondition.java ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenWidget.java ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ScreenFactory.java ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ScreenRenderer.java ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ModelTree.java ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ModelTreeAction.java ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ModelTreeCondition.java Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/ModelWidgetAction.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/ModelWidgetAction.java?rev=1635878&r1=1635877&r2=1635878&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/ModelWidgetAction.java (original) +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/ModelWidgetAction.java Fri Oct 31 23:13:03 2014 @@ -21,6 +21,8 @@ package org.ofbiz.widget; import java.io.Serializable; import java.text.MessageFormat; import java.util.ArrayList; +import java.util.HashMap; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; @@ -30,10 +32,6 @@ import java.util.regex.PatternSyntaxExce import javax.servlet.ServletContext; import javax.servlet.http.HttpSession; -import javolution.util.FastList; -import javolution.util.FastMap; - -import org.w3c.dom.Element; import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.ObjectType; @@ -59,6 +57,7 @@ import org.ofbiz.minilang.method.MethodC import org.ofbiz.service.DispatchContext; import org.ofbiz.service.GenericServiceException; import org.ofbiz.service.ModelService; +import org.w3c.dom.Element; @SuppressWarnings("serial") public abstract class ModelWidgetAction implements Serializable { @@ -140,6 +139,7 @@ public abstract class ModelWidgetAction } } + @SuppressWarnings("rawtypes") @Override public void runAction(Map<String, Object> context) { String globalStr = this.globalExdr.expandString(context); @@ -179,9 +179,9 @@ public abstract class ModelWidgetAction if (UtilValidate.isNotEmpty(this.type)) { if ("NewMap".equals(this.type)) { - newValue = FastMap.newInstance(); + newValue = new HashMap(); } else if ("NewList".equals(this.type)) { - newValue = FastList.newInstance(); + newValue = new LinkedList(); } else { try { newValue = ObjectType.simpleTypeConvert(newValue, this.type, null, (TimeZone) context.get("timeZone"), (Locale) context.get("locale"), true); @@ -400,7 +400,7 @@ public abstract class ModelWidgetAction @Override public void runAction(Map<String, Object> context) throws GeneralException { if (location.endsWith(".xml")) { - Map<String, Object> localContext = FastMap.newInstance(); + Map<String, Object> localContext = new HashMap<String, Object>(); localContext.putAll(context); DispatchContext ctx = WidgetWorker.getDispatcher(context).getDispatchContext(); MethodContext methodContext = new MethodContext(ctx, localContext, null); @@ -445,7 +445,7 @@ public abstract class ModelWidgetAction if ("true".equals(autoFieldMapString)) { DispatchContext dc = WidgetWorker.getDispatcher(context).getDispatchContext(); // try a map called "parameters", try it first so values from here are overriden by values in the main context - Map<String, Object> combinedMap = FastMap.newInstance(); + Map<String, Object> combinedMap = new HashMap<String, Object>(); Map<String, Object> parametersObj = UtilGenerics.toMap(context.get("parameters")); if (parametersObj != null) { combinedMap.putAll(parametersObj); @@ -460,7 +460,7 @@ public abstract class ModelWidgetAction } } if (serviceContext == null) { - serviceContext = FastMap.newInstance(); + serviceContext = new HashMap<String, Object>(); } if (this.fieldMap != null) { Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/WidgetFactory.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/WidgetFactory.java?rev=1635878&r1=1635877&r2=1635878&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/WidgetFactory.java (original) +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/WidgetFactory.java Fri Oct 31 23:13:03 2014 @@ -24,8 +24,7 @@ import java.lang.reflect.Modifier; import java.util.Iterator; import java.util.Map; import java.util.ServiceLoader; - -import javolution.util.FastMap; +import java.util.concurrent.ConcurrentHashMap; import org.ofbiz.base.util.Assert; import org.ofbiz.base.util.Debug; @@ -42,7 +41,7 @@ import org.w3c.dom.Element; public class WidgetFactory { public static final String module = WidgetFactory.class.getName(); - protected static final Map<String, Constructor<? extends ModelScreenWidget>> screenWidgets = FastMap.newInstance(); + protected static final Map<String, Constructor<? extends ModelScreenWidget>> screenWidgets = new ConcurrentHashMap<String, Constructor<? extends ModelScreenWidget>>(); static { loadStandardWidgets(); Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/WidgetWorker.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/WidgetWorker.java?rev=1635878&r1=1635877&r2=1635878&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/WidgetWorker.java (original) +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/WidgetWorker.java Fri Oct 31 23:13:03 2014 @@ -25,6 +25,8 @@ import java.math.BigDecimal; import java.net.URLEncoder; import java.nio.charset.Charset; import java.text.DateFormat; +import java.util.ArrayList; +import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; @@ -34,9 +36,6 @@ import javax.servlet.ServletContext; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.StringUtil; import org.ofbiz.base.util.UtilDateTime; @@ -414,7 +413,7 @@ public class WidgetWorker { public static class AutoServiceParameters { private String serviceName; - List<String> excludeList = FastList.newInstance(); + List<String> excludeList = new ArrayList<String>(); boolean includePk; boolean includeNonPk; boolean sendIfEmpty; @@ -433,7 +432,7 @@ public class WidgetWorker { @SuppressWarnings("unchecked") public Map<String, String> getParametersMap(Map<String, Object> context, String defaultServiceName) { - Map<String, String> autServiceParams = FastMap.newInstance(); + Map<String, String> autServiceParams = new HashMap<String, String>(); LocalDispatcher dispatcher = (LocalDispatcher) context.get("dispatcher"); if (dispatcher == null) { Debug.logError("We can not append auto service Parameters since we could not find dispatcher in the current context", module); @@ -477,7 +476,7 @@ public class WidgetWorker { public static class AutoEntityParameters { private String entityName; private String includeType; - List<String> excludeList = FastList.newInstance(); + List<String> excludeList = new ArrayList<String>(); boolean includePk; boolean includeNonPk; boolean sendIfEmpty; @@ -499,7 +498,7 @@ public class WidgetWorker { @SuppressWarnings("unchecked") public Map<String, String> getParametersMap(Map<String, Object> context, String defaultEntityName) { - Map<String, String> autEntityParams = FastMap.newInstance(); + Map<String, String> autEntityParams = new HashMap<String, String>(); Delegator delegator = (Delegator) context.get("delegator"); if (delegator == null) { Debug.logError("We can not append auto entity Parameters since we could not find delegator in the current context", module); Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/cache/WidgetContextCacheKey.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/cache/WidgetContextCacheKey.java?rev=1635878&r1=1635877&r2=1635878&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/cache/WidgetContextCacheKey.java (original) +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/cache/WidgetContextCacheKey.java Fri Oct 31 23:13:03 2014 @@ -18,24 +18,24 @@ *******************************************************************************/ package org.ofbiz.widget.cache; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; import java.util.Map; import java.util.Set; -import javolution.util.FastMap; -import javolution.util.FastSet; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilGenerics; import org.ofbiz.base.util.UtilMisc; -public class WidgetContextCacheKey { +public final class WidgetContextCacheKey { public static final String module = WidgetContextCacheKey.class.getName(); - private static Set<String> fieldNamesToSkip; + private static Set<String> fieldNamesToSkip = createFieldNamesToSkip(); - static { - fieldNamesToSkip = FastSet.newInstance(); + private static Set<String> createFieldNamesToSkip(){ + Set<String> fieldNamesToSkip = new HashSet<String>(); fieldNamesToSkip.add("globalContext"); fieldNamesToSkip.add("delegator"); fieldNamesToSkip.add("dispatcher"); @@ -76,13 +76,13 @@ public class WidgetContextCacheKey { // parameters fieldNamesToSkip.add("visit"); fieldNamesToSkip.add("visitor"); + return Collections.unmodifiableSet(fieldNamesToSkip); } - protected Map<String, Object> context; + private final Map<String, Object> context; public WidgetContextCacheKey(Map<String, ? extends Object> context) { - this.context = FastMap.newInstance(); - this.context.putAll(context); + this.context = Collections.unmodifiableMap(new HashMap<String, Object>(context)); } @Override @@ -103,7 +103,7 @@ public class WidgetContextCacheKey { return false; } - Set<String> unifiedContext = FastSet.newInstance(); + Set<String> unifiedContext = new HashSet<String>(); unifiedContext.addAll(this.context.keySet()); unifiedContext.addAll(key.context.keySet()); for (String fieldName: unifiedContext) { @@ -135,7 +135,7 @@ public class WidgetContextCacheKey { @Override public String toString() { - Map<String, Object> printableMap = FastMap.newInstance(); + Map<String, Object> printableMap = new HashMap<String, Object>(); for (String fieldName: this.context.keySet()) { if (!fieldNamesToSkip.contains(fieldName) && !"parameters".equals(fieldName)) { printableMap.put(fieldName, this.context.get(fieldName)); @@ -146,7 +146,7 @@ public class WidgetContextCacheKey { } public static String printMap(Map<String, ? extends Object> map) { - Map<String, Object> printableMap = FastMap.newInstance(); + Map<String, Object> printableMap = new HashMap<String, Object>(); for (Map.Entry<String, ? extends Object> entry : map.entrySet()) { String fieldName = entry.getKey(); if (!fieldNamesToSkip.contains(fieldName) && @@ -160,7 +160,7 @@ public class WidgetContextCacheKey { } public static boolean parametersAreEqual(Map<String, ? extends Object> map1, Map<String, ? extends Object> map2) { - Set<String> unifiedContext = FastSet.newInstance(); + Set<String> unifiedContext = new HashSet<String>(); unifiedContext.addAll(map1.keySet()); unifiedContext.addAll(map2.keySet()); for (String fieldName: unifiedContext) { Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java?rev=1635878&r1=1635877&r2=1635878&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java (original) +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java Fri Oct 31 23:13:03 2014 @@ -26,6 +26,7 @@ import java.rmi.server.UID; import java.sql.Timestamp; import java.util.HashSet; import java.util.Iterator; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; @@ -37,8 +38,6 @@ import javax.servlet.ServletContext; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import javolution.util.FastList; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.StringUtil; import org.ofbiz.base.util.UtilFormatOut; @@ -87,18 +86,18 @@ import freemarker.template.TemplateExcep * Widget Library - Form Renderer implementation based on Freemarker macros * */ -public class MacroFormRenderer implements FormStringRenderer { +public final class MacroFormRenderer implements FormStringRenderer { public static final String module = MacroFormRenderer.class.getName(); - private Template macroLibrary; - private WeakHashMap<Appendable, Environment> environments = new WeakHashMap<Appendable, Environment>(); - private StringUtil.SimpleEncoder internalEncoder; - protected RequestHandler rh; - protected HttpServletRequest request; - protected HttpServletResponse response; - protected boolean javaScriptEnabled = false; - protected boolean renderPagination = true; - protected boolean widgetCommentsEnabled = false; + private final Template macroLibrary; + private final WeakHashMap<Appendable, Environment> environments = new WeakHashMap<Appendable, Environment>(); + private final StringUtil.SimpleEncoder internalEncoder; + private final RequestHandler rh; + private final HttpServletRequest request; + private final HttpServletResponse response; + private final boolean javaScriptEnabled; + private boolean renderPagination = true; + private boolean widgetCommentsEnabled = false; public MacroFormRenderer(String macroLibraryPath, HttpServletRequest request, HttpServletResponse response) throws TemplateException, IOException { macroLibrary = FreeMarkerWorker.getTemplate(macroLibraryPath); @@ -1087,7 +1086,7 @@ public class MacroFormRenderer implement String backgroundSubmitRefreshTarget = submitField.getBackgroundSubmitRefreshTarget(context); if (UtilValidate.isNotEmpty(backgroundSubmitRefreshTarget)) { if (updateAreas == null) { - updateAreas = FastList.newInstance(); + updateAreas = new LinkedList<ModelForm.UpdateArea>(); } updateAreas.add(new ModelForm.UpdateArea("submit", formId, backgroundSubmitRefreshTarget)); } @@ -1414,8 +1413,8 @@ public class MacroFormRenderer implement this.renderNextPrev(writer, context, modelForm); } List<ModelFormField> childFieldList = modelForm.getFieldList(); - List<String> columnStyleList = FastList.newInstance(); - List<String> fieldNameList = FastList.newInstance(); + List<String> columnStyleList = new LinkedList<String>(); + List<String> fieldNameList = new LinkedList<String>(); for (ModelFormField childField : childFieldList) { int childFieldType = childField.getFieldInfo().getFieldType(); if (childFieldType == ModelFormField.FieldInfo.HIDDEN || childFieldType == ModelFormField.FieldInfo.IGNORED) { @@ -2012,7 +2011,7 @@ public class MacroFormRenderer implement autoCompleterTarget = lookupFieldFormName + "&amp;"; } autoCompleterTarget = autoCompleterTarget + "ajaxLookup=Y"; - updateAreas = FastList.newInstance(); + updateAreas = new LinkedList<ModelForm.UpdateArea>(); updateAreas.add(new ModelForm.UpdateArea("change", id, autoCompleterTarget)); } boolean ajaxEnabled = updateAreas != null && this.javaScriptEnabled; Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelForm.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelForm.java?rev=1635878&r1=1635877&r2=1635878&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelForm.java (original) +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelForm.java Fri Oct 31 23:13:03 2014 @@ -21,7 +21,10 @@ package org.ofbiz.widget.form; import java.io.IOException; import java.util.ArrayList; import java.util.Collection; +import java.util.HashMap; +import java.util.HashSet; import java.util.Iterator; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; @@ -30,10 +33,6 @@ import java.util.Set; import java.util.TreeMap; import java.util.TreeSet; -import javolution.util.FastList; -import javolution.util.FastMap; -import javolution.util.FastSet; - import org.ofbiz.base.util.BshUtil; import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; @@ -131,12 +130,12 @@ public class ModelForm extends ModelWidg protected boolean overridenListSize = false; protected boolean clientAutocompleteFields = true; - protected List<AltTarget> altTargets = FastList.newInstance(); - protected List<AutoFieldsService> autoFieldsServices = FastList.newInstance(); - protected List<AutoFieldsEntity> autoFieldsEntities = FastList.newInstance(); - protected List<String> lastOrderFields = FastList.newInstance(); - protected List<SortField> sortOrderFields = FastList.newInstance(); - protected List<AltRowStyle> altRowStyles = FastList.newInstance(); + protected List<AltTarget> altTargets = new ArrayList<AltTarget>(); + protected List<AutoFieldsService> autoFieldsServices = new ArrayList<AutoFieldsService>(); + protected List<AutoFieldsEntity> autoFieldsEntities = new ArrayList<AutoFieldsEntity>(); + protected List<String> lastOrderFields = new ArrayList<String>(); + protected List<SortField> sortOrderFields = new ArrayList<SortField>(); + protected List<AltRowStyle> altRowStyles = new ArrayList<AltRowStyle>(); /** This List will contain one copy of each field for each field name in the order * they were encountered in the service, entity, or form definition; field definitions @@ -147,25 +146,25 @@ public class ModelForm extends ModelWidg * necessary to use the Map. The Map is used when loading the form definition to keep the * list clean and implement the override features for field definitions. */ - protected List<ModelFormField> fieldList = FastList.newInstance(); + protected List<ModelFormField> fieldList = new ArrayList<ModelFormField>(); /** This Map is keyed with the field name and has a ModelFormField for the value. */ - protected Map<String, ModelFormField> fieldMap = FastMap.newInstance(); + protected Map<String, ModelFormField> fieldMap = new HashMap<String, ModelFormField>(); /** Keeps track of conditional fields to help ensure that only one is rendered */ - protected Set<String> useWhenFields = FastSet.newInstance(); + protected Set<String> useWhenFields = new HashSet<String>(); /** This is a list of FieldGroups in the order they were created. * Can also include Banner objects. */ - protected List<FieldGroupBase> fieldGroupList = FastList.newInstance(); + protected List<FieldGroupBase> fieldGroupList = new ArrayList<FieldGroupBase>(); /** This Map is keyed with the field name and has a FieldGroup for the value. * Can also include Banner objects. */ - protected Map<String, FieldGroupBase> fieldGroupMap = FastMap.newInstance(); + protected Map<String, FieldGroupBase> fieldGroupMap = new HashMap<String, FieldGroupBase>(); /** This field group will be the "catch-all" group for fields that are not * included in an explicit field-group. @@ -192,7 +191,7 @@ public class ModelForm extends ModelWidg protected List<ModelFormAction> actions; protected List<ModelFormAction> rowActions; protected FlexibleStringExpander rowCountExdr; - protected List<ModelFormField> multiSubmitFields = FastList.newInstance(); + protected List<ModelFormField> multiSubmitFields = new ArrayList<ModelFormField>(); protected int rowCount = 0; private String sortFieldParameterName = "sortField"; @@ -571,7 +570,7 @@ public class ModelForm extends ModelWidg // reorder fields according to sort order if (sortOrderFields.size() > 0) { - List<ModelFormField> sortedFields = FastList.newInstance(); + List<ModelFormField> sortedFields = new LinkedList<ModelFormField>(); for (SortField sortField: this.sortOrderFields) { String fieldName = sortField.getFieldName(); if (UtilValidate.isEmpty(fieldName)) { @@ -599,7 +598,7 @@ public class ModelForm extends ModelWidg } if (UtilValidate.isNotEmpty(this.lastOrderFields)) { - List<ModelFormField> lastedFields = FastList.newInstance(); + List<ModelFormField> lastedFields = new LinkedList<ModelFormField>(); for (String fieldName: this.lastOrderFields) { if (UtilValidate.isEmpty(fieldName)) { continue; @@ -695,7 +694,7 @@ public class ModelForm extends ModelWidg protected void addOnSubmitUpdateArea(UpdateArea updateArea) { if (onSubmitUpdateAreas == null) { - onSubmitUpdateAreas = FastList.newInstance(); + onSubmitUpdateAreas = new ArrayList<UpdateArea>(); } int index = onSubmitUpdateAreas.indexOf(updateArea); if (index != -1) { @@ -707,7 +706,7 @@ public class ModelForm extends ModelWidg protected void addOnPaginateUpdateArea(UpdateArea updateArea) { if (onPaginateUpdateAreas == null) { - onPaginateUpdateAreas = FastList.newInstance(); + onPaginateUpdateAreas = new ArrayList<UpdateArea>(); } int index = onPaginateUpdateAreas.indexOf(updateArea); if (index != -1) { @@ -724,7 +723,7 @@ public class ModelForm extends ModelWidg protected void addOnSortColumnUpdateArea(UpdateArea updateArea) { if (onSortColumnUpdateAreas == null) { - onSortColumnUpdateAreas = FastList.newInstance(); + onSortColumnUpdateAreas = new ArrayList<UpdateArea>(); } int index = onSortColumnUpdateAreas.indexOf(updateArea); if (index != -1) { @@ -916,7 +915,7 @@ public class ModelForm extends ModelWidg } public void renderSingleFormString(Appendable writer, Map<String, Object> context, FormStringRenderer formStringRenderer, int positions) throws IOException { - List<ModelFormField> tempFieldList = FastList.newInstance(); + List<ModelFormField> tempFieldList = new LinkedList<ModelFormField>(); tempFieldList.addAll(this.fieldList); // Check to see if there is a field, same name and same use-when (could come from extended form) @@ -1212,7 +1211,7 @@ public class ModelForm extends ModelWidg // in this model: we can have more fields with the same name when use-when // conditions are used or when a form is extended or when the fields are // automatically retrieved by a service or entity definition. - List<ModelFormField> tempFieldList = FastList.newInstance(); + List<ModelFormField> tempFieldList = new LinkedList<ModelFormField>(); tempFieldList.addAll(this.fieldList); for (int j = 0; j < tempFieldList.size(); j++) { ModelFormField modelFormField = tempFieldList.get(j); @@ -1230,13 +1229,13 @@ public class ModelForm extends ModelWidg // We get a sorted (by position, ascending) set of lists; // each list contains all the fields with that position. Collection<List<ModelFormField>> fieldListsByPosition = this.getFieldListsByPosition(tempFieldList); - List<Map<String, List<ModelFormField>>> fieldRowsByPosition = FastList.newInstance(); // this list will contain maps, each one containing the list of fields for a position + List<Map<String, List<ModelFormField>>> fieldRowsByPosition = new LinkedList<Map<String, List<ModelFormField>>>(); // this list will contain maps, each one containing the list of fields for a position for (List<ModelFormField> mainFieldList: fieldListsByPosition) { int numOfColumns = 0; - List<ModelFormField> innerDisplayHyperlinkFieldsBegin = FastList.newInstance(); - List<ModelFormField> innerFormFields = FastList.newInstance(); - List<ModelFormField> innerDisplayHyperlinkFieldsEnd = FastList.newInstance(); + List<ModelFormField> innerDisplayHyperlinkFieldsBegin = new LinkedList<ModelFormField>(); + List<ModelFormField> innerFormFields = new LinkedList<ModelFormField>(); + List<ModelFormField> innerDisplayHyperlinkFieldsEnd = new LinkedList<ModelFormField>(); // render title for each field, except hidden & ignored, etc @@ -1522,7 +1521,7 @@ public class ModelForm extends ModelWidg int itemIndex = -1; Object item = null; context.put("wholeFormContext", context); - Map<String, Object> previousItem = FastMap.newInstance(); + Map<String, Object> previousItem = new HashMap<String, Object>(); while ((item = this.safeNext(iter)) != null) { itemIndex++; if (itemIndex >= highIndex) { @@ -1556,7 +1555,7 @@ public class ModelForm extends ModelWidg this.resetBshInterpreter(localContext); localContext.push(); localContext.put("previousItem", previousItem); - previousItem = FastMap.newInstance(); + previousItem = new HashMap<String, Object>(); previousItem.putAll(itemMap); ModelFormAction.runSubActions(this.rowActions, localContext); @@ -1571,7 +1570,7 @@ public class ModelForm extends ModelWidg if (Debug.verboseOn()) Debug.logVerbose("In form got another row, context is: " + localContext, module); // Check to see if there is a field, same name and same use-when (could come from extended form) - List<ModelFormField> tempFieldList = FastList.newInstance(); + List<ModelFormField> tempFieldList = new LinkedList<ModelFormField>(); tempFieldList.addAll(this.fieldList); for (int j = 0; j < tempFieldList.size(); j++) { ModelFormField modelFormField = tempFieldList.get(j); @@ -1608,9 +1607,9 @@ public class ModelForm extends ModelWidg // we have two phases: preprocessing and rendering this.rowCount++; - List<ModelFormField> innerDisplayHyperlinkFieldsBegin = FastList.newInstance(); - List<ModelFormField> innerFormFields = FastList.newInstance(); - List<ModelFormField> innerDisplayHyperlinkFieldsEnd = FastList.newInstance(); + List<ModelFormField> innerDisplayHyperlinkFieldsBegin = new LinkedList<ModelFormField>(); + List<ModelFormField> innerFormFields = new LinkedList<ModelFormField>(); + List<ModelFormField> innerDisplayHyperlinkFieldsEnd = new LinkedList<ModelFormField>(); // Preprocessing: // all the form fields are evaluated and the ones that will @@ -1737,7 +1736,7 @@ public class ModelForm extends ModelWidg // render row formatting open formStringRenderer.renderFormatItemRowOpen(writer, localContext, this); Iterator<ModelFormField> innerDisplayHyperlinkFieldsBeginIter = innerDisplayHyperlinkFieldsBegin.iterator(); - Map<String, Integer> fieldCount = FastMap.newInstance(); + Map<String, Integer> fieldCount = new HashMap<String, Integer>(); while(innerDisplayHyperlinkFieldsBeginIter.hasNext()){ ModelFormField modelFormField = innerDisplayHyperlinkFieldsBeginIter.next(); if(fieldCount.containsKey(modelFormField.getFieldName())){ @@ -1862,7 +1861,7 @@ public class ModelForm extends ModelWidg } public List<ModelFormField> getHiddenIgnoredFields(Map<String, Object> context, Set<String> alreadyRendered, List<ModelFormField> fieldList, int position) { - List<ModelFormField> hiddenIgnoredFieldList = FastList.newInstance(); + List<ModelFormField> hiddenIgnoredFieldList = new LinkedList<ModelFormField>(); for (ModelFormField modelFormField: fieldList) { // with position == -1 then gets all the hidden fields if (position != -1 && modelFormField.getPosition() != position) { @@ -1927,7 +1926,7 @@ public class ModelForm extends ModelWidg Integer position = Integer.valueOf(modelFormField.getPosition()); List<ModelFormField> fieldListByPosition = fieldsByPosition.get(position); if (fieldListByPosition == null) { - fieldListByPosition = FastList.newInstance(); + fieldListByPosition = new LinkedList<ModelFormField>(); fieldsByPosition.put(position, fieldListByPosition); } fieldListByPosition.add(modelFormField); @@ -1936,7 +1935,7 @@ public class ModelForm extends ModelWidg } public List<ModelFormField> getFieldListByPosition(List<ModelFormField> modelFormFieldList, int position) { - List<ModelFormField> fieldListByPosition = FastList.newInstance(); + List<ModelFormField> fieldListByPosition = new LinkedList<ModelFormField>(); for (ModelFormField modelFormField: modelFormFieldList) { if (modelFormField.getPosition() == position) { fieldListByPosition.add(modelFormField); @@ -2812,7 +2811,7 @@ public class ModelForm extends ModelWidg } public void setDefaultEntityNameOnUpdateAreas() { - List<UpdateArea> allUpdateAreas = FastList.newInstance(); + List<UpdateArea> allUpdateAreas = new LinkedList<UpdateArea>(); if (UtilValidate.isNotEmpty(this.onSubmitUpdateAreas)) allUpdateAreas.addAll(this.onSubmitUpdateAreas); if (UtilValidate.isNotEmpty(this.onPaginateUpdateAreas)) allUpdateAreas.addAll(this.onPaginateUpdateAreas); for (UpdateArea updateArea : allUpdateAreas) { @@ -2823,7 +2822,7 @@ public class ModelForm extends ModelWidg } public void setDefaultServiceNameOnUpdateAreas() { - List<UpdateArea> allUpdateAreas = FastList.newInstance(); + List<UpdateArea> allUpdateAreas = new LinkedList<UpdateArea>(); if (UtilValidate.isNotEmpty(this.onSubmitUpdateAreas)) allUpdateAreas.addAll(this.onSubmitUpdateAreas); if (UtilValidate.isNotEmpty(this.onPaginateUpdateAreas)) allUpdateAreas.addAll(this.onPaginateUpdateAreas); for (UpdateArea updateArea : allUpdateAreas) { @@ -2901,7 +2900,7 @@ public class ModelForm extends ModelWidg protected String defaultEntityName; protected WidgetWorker.AutoEntityParameters autoEntityParameters; protected WidgetWorker.AutoEntityParameters autoServiceParameters; - List<WidgetWorker.Parameter> parameterList = FastList.newInstance(); + protected List<WidgetWorker.Parameter> parameterList = new ArrayList<WidgetWorker.Parameter>(); /** XML constructor. * @param updateAreaElement The <code><on-xxx-update-area></code> * XML element. @@ -2950,7 +2949,7 @@ public class ModelForm extends ModelWidg return FlexibleStringExpander.expandString(areaTarget, context); } public Map<String, String> getParameterMap(Map<String, Object> context) { - Map<String, String> fullParameterMap = FastMap.newInstance(); + Map<String, String> fullParameterMap = new HashMap<String, String>(); if (autoServiceParameters != null) { fullParameterMap.putAll(autoServiceParameters.getParametersMap(context, defaultServiceName)); } @@ -3175,7 +3174,7 @@ public class ModelForm extends ModelWidg } public Set<String> getAllEntityNamesUsed() { - Set<String> allEntityNamesUsed = FastSet.newInstance(); + Set<String> allEntityNamesUsed = new HashSet<String>(); for (AutoFieldsEntity autoFieldsEntity: this.autoFieldsEntities) { allEntityNamesUsed.add(autoFieldsEntity.entityName); } @@ -3221,7 +3220,7 @@ public class ModelForm extends ModelWidg } public Set<String> getAllServiceNamesUsed() { - Set<String> allServiceNamesUsed = FastSet.newInstance(); + Set<String> allServiceNamesUsed = new HashSet<String>(); for (AutoFieldsService autoFieldsService: this.autoFieldsServices) { allServiceNamesUsed.add(autoFieldsService.serviceName); } @@ -3254,7 +3253,7 @@ public class ModelForm extends ModelWidg } public Set<String> getLinkedRequestsLocationAndUri() throws GeneralException { - Set<String> allRequestsUsed = FastSet.newInstance(); + Set<String> allRequestsUsed = new HashSet<String>(); if (this.fieldList != null) { for (ModelFormField modelFormField: this.fieldList) { @@ -3306,7 +3305,7 @@ public class ModelForm extends ModelWidg } public Set<String> getTargetedRequestsLocationAndUri() throws GeneralException { - Set<String> allRequestsUsed = FastSet.newInstance(); + Set<String> allRequestsUsed = new HashSet<String>(); if (this.altTargets != null) { for (AltTarget altTarget: this.altTargets) { Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormAction.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormAction.java?rev=1635878&r1=1635877&r2=1635878&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormAction.java (original) +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormAction.java Fri Oct 31 23:13:03 2014 @@ -28,9 +28,6 @@ import java.util.Map; import java.util.TimeZone; import java.util.regex.PatternSyntaxException; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.ObjectType; @@ -131,6 +128,7 @@ public abstract class ModelFormAction { } } + @SuppressWarnings("rawtypes") @Override public void runAction(Map<String, Object> context) { String globalStr = this.globalExdr.expandString(context); @@ -152,9 +150,9 @@ public abstract class ModelFormAction { if (UtilValidate.isNotEmpty(this.type)) { if ("NewMap".equals(this.type)) { - newValue = FastMap.newInstance(); + newValue = new HashMap(); } else if ("NewList".equals(this.type)) { - newValue = FastList.newInstance(); + newValue = new LinkedList(); } else { try { newValue = ObjectType.simpleTypeConvert(newValue, this.type, null, (TimeZone) context.get("timeZone"), (Locale) context.get("locale"), true); @@ -286,7 +284,7 @@ public abstract class ModelFormAction { @Override public void runAction(Map<String, Object> context) { if (location.endsWith(".xml")) { - Map<String, Object> localContext = FastMap.newInstance(); + Map<String, Object> localContext = new HashMap<String, Object>(); localContext.putAll(context); DispatchContext ctx = this.modelForm.dispatchContext; MethodContext methodContext = new MethodContext(ctx, localContext, null); Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java?rev=1635878&r1=1635877&r2=1635878&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java (original) +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java Fri Oct 31 23:13:03 2014 @@ -23,6 +23,7 @@ import java.math.BigDecimal; import java.sql.Timestamp; import java.text.DateFormat; import java.text.NumberFormat; +import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import java.util.LinkedList; @@ -32,9 +33,6 @@ import java.util.Map; import java.util.StringTokenizer; import java.util.TimeZone; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.conversion.ConversionException; import org.ofbiz.base.conversion.DateTimeConverters; import org.ofbiz.base.conversion.DateTimeConverters.StringToTimestamp; @@ -218,13 +216,13 @@ public class ModelFormField { } protected void addOnChangeUpdateArea(UpdateArea updateArea) { - if (onChangeUpdateAreas == null) onChangeUpdateAreas = FastList.newInstance(); + if (onChangeUpdateAreas == null) onChangeUpdateAreas = new ArrayList<UpdateArea>(); onChangeUpdateAreas.add(updateArea); Debug.logInfo(this.modelForm.getName() + ":" + this.name + " onChangeUpdateAreas size = " + onChangeUpdateAreas.size(), module); } protected void addOnClickUpdateArea(UpdateArea updateArea) { - if (onClickUpdateAreas == null) onClickUpdateAreas = FastList.newInstance(); + if (onClickUpdateAreas == null) onClickUpdateAreas = new ArrayList<UpdateArea>(); onClickUpdateAreas.add(updateArea); } @@ -1519,7 +1517,7 @@ public class ModelFormField { List<? extends Object> dataList = UtilGenerics.checkList(this.listAcsr.get(context)); if (dataList != null && dataList.size() != 0) { for (Object data: dataList) { - Map<String, Object> localContext = FastMap.newInstance(); + Map<String, Object> localContext = new HashMap<String, Object>(); localContext.putAll(context); if (UtilValidate.isNotEmpty(this.listEntryName)) { localContext.put(this.listEntryName, data); @@ -2225,7 +2223,7 @@ public class ModelFormField { protected FlexibleStringExpander imageTitle; protected FlexibleStringExpander targetWindowExdr; protected FlexibleMapAccessor<Map<String, String>> parametersMapAcsr; - protected List<WidgetWorker.Parameter> parameterList = FastList.newInstance(); + protected List<WidgetWorker.Parameter> parameterList = new ArrayList<WidgetWorker.Parameter>(); protected WidgetWorker.AutoServiceParameters autoServiceParameters; protected WidgetWorker.AutoEntityParameters autoEntityParameters; @@ -2337,7 +2335,7 @@ public class ModelFormField { } public Map<String, String> getParameterMap(Map<String, Object> context) { - Map<String, String> fullParameterMap = FastMap.newInstance(); + Map<String, String> fullParameterMap = new HashMap<String, String>(); Map<String, String> addlParamMap = this.parametersMapAcsr.get(context); if (addlParamMap != null) { @@ -2433,7 +2431,7 @@ public class ModelFormField { protected FlexibleStringExpander target; protected FlexibleStringExpander description; protected FlexibleStringExpander targetWindowExdr; - protected List<WidgetWorker.Parameter> parameterList = FastList.newInstance(); + protected List<WidgetWorker.Parameter> parameterList = new ArrayList<WidgetWorker.Parameter>(); protected boolean requestConfirmation = false; protected FlexibleStringExpander confirmationMsgExdr; protected ModelFormField modelFormField; @@ -2500,7 +2498,7 @@ public class ModelFormField { } public Map<String, String> getParameterMap(Map<String, Object> context) { - Map<String, String> fullParameterMap = FastMap.newInstance(); + Map<String, String> fullParameterMap = new HashMap<String, String>(); /* leaving this here... may want to add it at some point like the hyperlink element: Map<String, String> addlParamMap = this.parametersMapAcsr.get(context); @@ -3607,7 +3605,7 @@ public class ModelFormField { } public List<String> getTargetParameterList() { - List<String> paramList = FastList.newInstance(); + List<String> paramList = new LinkedList<String>(); if (UtilValidate.isNotEmpty(this.targetParameter)) { StringTokenizer stk = new StringTokenizer(this.targetParameter, ", "); while (stk.hasMoreTokens()) { Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java?rev=1635878&r1=1635877&r2=1635878&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java (original) +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java Fri Oct 31 23:13:03 2014 @@ -20,6 +20,7 @@ package org.ofbiz.widget.html; import java.io.IOException; import java.util.HashSet; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; @@ -29,8 +30,6 @@ import javax.servlet.ServletContext; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import javolution.util.FastList; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.StringUtil; import org.ofbiz.base.util.StringUtil.SimpleEncoder; @@ -958,7 +957,7 @@ public class HtmlFormRenderer extends Ht String backgroundSubmitRefreshTarget = submitField.getBackgroundSubmitRefreshTarget(context); if (UtilValidate.isNotEmpty(backgroundSubmitRefreshTarget)) { if (updateAreas == null) { - updateAreas = FastList.newInstance(); + updateAreas = new LinkedList<ModelForm.UpdateArea>(); } updateAreas.add(new ModelForm.UpdateArea("submit", formId, backgroundSubmitRefreshTarget)); } Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlScreenRenderer.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlScreenRenderer.java?rev=1635878&r1=1635877&r2=1635878&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlScreenRenderer.java (original) +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlScreenRenderer.java Fri Oct 31 23:13:03 2014 @@ -29,8 +29,6 @@ import javax.servlet.ServletContext; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.UtilFormatOut; @@ -52,8 +50,8 @@ import org.ofbiz.widget.form.ModelForm; import org.ofbiz.widget.menu.MenuStringRenderer; import org.ofbiz.widget.menu.ModelMenu; import org.ofbiz.widget.screen.ModelScreenWidget; -import org.ofbiz.widget.screen.ScreenStringRenderer; import org.ofbiz.widget.screen.ModelScreenWidget.ColumnContainer; +import org.ofbiz.widget.screen.ScreenStringRenderer; /** * Widget Library - HTML Form Renderer implementation @@ -667,7 +665,7 @@ public class HtmlScreenRenderer extends Delegator delegator = (Delegator) context.get("delegator"); // make a new map for content rendering; so our current map does not get clobbered - Map<String, Object> contentContext = FastMap.newInstance(); + Map<String, Object> contentContext = new HashMap<String, Object>(); contentContext.putAll(context); String dataResourceId = (String)contentContext.get("dataResourceId"); if (Debug.verboseOn()) Debug.logVerbose("expandedContentId:" + expandedContentId, module); @@ -800,7 +798,7 @@ public class HtmlScreenRenderer extends Delegator delegator = (Delegator) context.get("delegator"); // create a new map for the content rendering; so our current context does not get overwritten! - Map<String, Object> contentContext = FastMap.newInstance(); + Map<String, Object> contentContext = new HashMap<String, Object>(); contentContext.putAll(context); try { Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ModelMenuAction.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ModelMenuAction.java?rev=1635878&r1=1635877&r2=1635878&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ModelMenuAction.java (original) +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ModelMenuAction.java Fri Oct 31 23:13:03 2014 @@ -20,6 +20,8 @@ package org.ofbiz.widget.menu; import java.text.MessageFormat; import java.util.ArrayList; +import java.util.HashMap; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; @@ -28,9 +30,6 @@ import java.util.TimeZone; import javax.servlet.ServletContext; import javax.servlet.http.HttpSession; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.ObjectType; @@ -140,6 +139,7 @@ public abstract class ModelMenuAction { } } + @SuppressWarnings("rawtypes") @Override public void runAction(Map<String, Object> context) { String globalStr = this.globalExdr.expandString(context); @@ -189,9 +189,9 @@ public abstract class ModelMenuAction { if (UtilValidate.isNotEmpty(this.type)) { if ("NewMap".equals(this.type)) { - newValue = FastMap.newInstance(); + newValue = new HashMap(); } else if ("NewList".equals(this.type)) { - newValue = FastList.newInstance(); + newValue = new LinkedList(); } else { try { newValue = ObjectType.simpleTypeConvert(newValue, this.type, null, (TimeZone) context.get("timeZone"), (Locale) context.get("locale"), true); @@ -379,7 +379,7 @@ public abstract class ModelMenuAction { List<? extends Element> fieldMapElementList = UtilXml.childElementList(serviceElement, "field-map"); if (fieldMapElementList.size() > 0) { - this.fieldMap = FastMap.newInstance(); + this.fieldMap = new HashMap<FlexibleMapAccessor<Object>, FlexibleMapAccessor<Object>>(); for (Element fieldMapElement: fieldMapElementList) { // set the env-name for each field-name, noting that if no field-name is specified it defaults to the env-name this.fieldMap.put( @@ -404,7 +404,7 @@ public abstract class ModelMenuAction { if (autoFieldMapBool) { serviceContext = WidgetWorker.getDispatcher(context).getDispatchContext().makeValidContext(serviceNameExpanded, ModelService.IN_PARAM, context); } else { - serviceContext = FastMap.newInstance(); + serviceContext = new HashMap<String, Object>(); } if (this.fieldMap != null) { Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ModelMenuCondition.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ModelMenuCondition.java?rev=1635878&r1=1635877&r2=1635878&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ModelMenuCondition.java (original) +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ModelMenuCondition.java Fri Oct 31 23:13:03 2014 @@ -19,13 +19,12 @@ package org.ofbiz.widget.menu; import java.lang.reflect.Method; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; import java.util.TimeZone; -import javolution.util.FastList; - import org.apache.oro.text.regex.MalformedPatternException; import org.apache.oro.text.regex.Pattern; import org.apache.oro.text.regex.PatternMatcher; @@ -101,7 +100,7 @@ public class ModelMenuCondition { } public static List<MenuCondition> readSubConditions(ModelMenuItem modelMenuItem, Element conditionElement) { - List<MenuCondition> condList = FastList.newInstance(); + List<MenuCondition> condList = new LinkedList<MenuCondition>(); List<? extends Element> subElementList = UtilXml.childElementList(conditionElement); for (Element subElement: subElementList) { condList.add(readCondition(modelMenuItem, subElement)); @@ -422,7 +421,7 @@ public class ModelMenuCondition { fieldVal = ""; } - List<Object> messages = FastList.newInstance(); + List<Object> messages = new LinkedList<Object>(); Boolean resultBool = BaseCompare.doRealCompare(fieldVal, value, operator, type, format, messages, null, null, true); if (messages.size() > 0) { messages.add(0, "Error with comparison in if-compare between field [" + fieldAcsr.toString() + "] with value [" + fieldVal + "] and value [" + value + "] with operator [" + operator + "] and type [" + type + "]: "); @@ -473,7 +472,7 @@ public class ModelMenuCondition { fieldVal = ""; } - List<Object> messages = FastList.newInstance(); + List<Object> messages = new LinkedList<Object>(); Boolean resultBool = BaseCompare.doRealCompare(fieldVal, toFieldVal, operator, type, format, messages, null, null, false); if (messages.size() > 0) { messages.add(0, "Error with comparison in if-compare-field between field [" + fieldAcsr.toString() + "] with value [" + fieldVal + "] and to-field [" + toFieldVal.toString() + "] with value [" + toFieldVal + "] with operator [" + operator + "] and type [" + type + "]: "); Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ModelMenuItem.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ModelMenuItem.java?rev=1635878&r1=1635877&r2=1635878&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ModelMenuItem.java (original) +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ModelMenuItem.java Fri Oct 31 23:13:03 2014 @@ -19,6 +19,7 @@ package org.ofbiz.widget.menu; import java.io.IOException; +import java.util.ArrayList; import java.util.HashMap; import java.util.LinkedList; import java.util.List; @@ -27,9 +28,6 @@ import java.util.Map; import javax.xml.parsers.ParserConfigurationException; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.StringUtil; import org.ofbiz.base.util.UtilFormatOut; @@ -39,8 +37,8 @@ import org.ofbiz.base.util.UtilXml; import org.ofbiz.base.util.collections.FlexibleMapAccessor; import org.ofbiz.base.util.string.FlexibleStringExpander; import org.ofbiz.entity.GenericValue; -import org.ofbiz.widget.WidgetWorker; import org.ofbiz.widget.PortalPageWorker; +import org.ofbiz.widget.WidgetWorker; import org.w3c.dom.Element; import org.xml.sax.SAXException; @@ -569,7 +567,7 @@ public class ModelMenuItem { protected WidgetWorker.AutoServiceParameters autoServiceParameters; protected WidgetWorker.AutoEntityParameters autoEntityParameters; protected FlexibleMapAccessor<Map<String, String>> parametersMapAcsr; - protected List<WidgetWorker.Parameter> parameterList = FastList.newInstance(); + protected List<WidgetWorker.Parameter> parameterList = new ArrayList<WidgetWorker.Parameter>(); protected boolean requestConfirmation = false; protected FlexibleStringExpander confirmationMsgExdr; @@ -702,7 +700,7 @@ public class ModelMenuItem { return this.parameterList; } public Map<String, String> getParameterMap(Map<String, Object> context) { - Map<String, String> fullParameterMap = FastMap.newInstance(); + Map<String, String> fullParameterMap = new HashMap<String, String>(); if (this.parametersMapAcsr != null) { Map<String, String> addlParamMap = this.parametersMapAcsr.get(context); Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/HtmlWidget.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/HtmlWidget.java?rev=1635878&r1=1635877&r2=1635878&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/HtmlWidget.java (original) +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/HtmlWidget.java Fri Oct 31 23:13:03 2014 @@ -22,11 +22,10 @@ import java.io.IOException; import java.net.MalformedURLException; import java.util.ArrayList; import java.util.Collection; +import java.util.HashMap; import java.util.List; import java.util.Map; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.StringUtil; @@ -220,7 +219,7 @@ public class HtmlWidget extends ModelScr public static class HtmlTemplateDecorator extends ModelScreenWidget { protected FlexibleStringExpander locationExdr; - protected Map<String, HtmlTemplateDecoratorSection> sectionMap = FastMap.newInstance(); + protected Map<String, HtmlTemplateDecoratorSection> sectionMap = new HashMap<String, HtmlTemplateDecoratorSection>(); public HtmlTemplateDecorator(ModelScreen modelScreen, Element htmlTemplateDecoratorElement) { super(modelScreen, htmlTemplateDecoratorElement); Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/MacroScreenRenderer.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/MacroScreenRenderer.java?rev=1635878&r1=1635877&r2=1635878&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/MacroScreenRenderer.java (original) +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/MacroScreenRenderer.java Fri Oct 31 23:13:03 2014 @@ -34,8 +34,6 @@ import javax.servlet.http.HttpServletReq import javax.servlet.http.HttpServletResponse; import javax.xml.parsers.ParserConfigurationException; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.UtilFormatOut; @@ -59,7 +57,8 @@ import org.ofbiz.widget.form.MacroFormRe import org.ofbiz.widget.form.ModelForm; import org.ofbiz.widget.html.HtmlScreenRenderer.ScreenletMenuRenderer; import org.ofbiz.widget.menu.MenuStringRenderer; -import org.ofbiz.widget.screen.ModelScreenWidget.*; +import org.ofbiz.widget.screen.ModelScreenWidget.Column; +import org.ofbiz.widget.screen.ModelScreenWidget.ColumnContainer; import org.xml.sax.SAXException; import freemarker.core.Environment; @@ -156,7 +155,7 @@ public class MacroScreenRenderer impleme this.widgetCommentsEnabled = ModelWidget.widgetBoundaryCommentsEnabled(context); } if (this.widgetCommentsEnabled) { - Map<String, Object> parameters = FastMap.newInstance(); + Map<String, Object> parameters = new HashMap<String, Object>(); StringBuilder sb = new StringBuilder("Begin "); sb.append(section.isMainSection ? "Screen " : "Section Widget "); sb.append(section.getBoundaryCommentName()); @@ -166,7 +165,7 @@ public class MacroScreenRenderer impleme } public void renderSectionEnd(Appendable writer, Map<String, Object> context, ModelScreenWidget.Section section) throws IOException { if (this.widgetCommentsEnabled) { - Map<String, Object> parameters = FastMap.newInstance(); + Map<String, Object> parameters = new HashMap<String, Object>(); StringBuilder sb = new StringBuilder(); sb.append("End "); sb.append(section.isMainSection ? "Screen " : "Section Widget "); @@ -190,7 +189,7 @@ public class MacroScreenRenderer impleme RequestHandler rh = (RequestHandler) ctx.getAttribute("_REQUEST_HANDLER_"); autoUpdateLink = rh.makeLink(request, response, autoUpdateTarget); } - Map<String, Object> parameters = FastMap.newInstance(); + Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("id", containerId); parameters.put("style", container.getStyle(context)); parameters.put("autoUpdateLink", autoUpdateLink); @@ -203,7 +202,7 @@ public class MacroScreenRenderer impleme } public void renderLabel(Appendable writer, Map<String, Object> context, ModelScreenWidget.Label label) throws IOException { - Map<String, Object> parameters = FastMap.newInstance(); + Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("text", label.getText(context)); parameters.put("id", label.getId(context)); parameters.put("style", label.getStyle(context)); @@ -211,7 +210,7 @@ public class MacroScreenRenderer impleme } public void renderHorizontalSeparator(Appendable writer, Map<String, Object> context, ModelScreenWidget.HorizontalSeparator separator) throws IOException { - Map<String, Object> parameters = FastMap.newInstance(); + Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("id", separator.getId(context)); parameters.put("style", separator.getStyle(context)); executeMacro(writer, "renderHorizontalSeparator", parameters); @@ -341,7 +340,7 @@ public class MacroScreenRenderer impleme } else { urlString = src; } - Map<String, Object> parameters = FastMap.newInstance(); + Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("src", src); parameters.put("id", image.getId(context)); parameters.put("style", image.getStyle(context)); @@ -360,7 +359,7 @@ public class MacroScreenRenderer impleme if (Debug.verboseOn()) Debug.logVerbose("directEditRequest:" + editRequest, module); - Map<String, Object> parameters = FastMap.newInstance(); + Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("editRequest", editRequest); parameters.put("enableEditValue", enableEditValue == null ? "" : enableEditValue); parameters.put("editContainerStyle", content.getEditContainerStyle(context)); @@ -378,7 +377,7 @@ public class MacroScreenRenderer impleme Delegator delegator = (Delegator) context.get("delegator"); // make a new map for content rendering; so our current map does not get clobbered - Map<String, Object> contentContext = FastMap.newInstance(); + Map<String, Object> contentContext = new HashMap<String, Object>(); contentContext.putAll(context); String dataResourceId = (String)contentContext.get("dataResourceId"); if (Debug.verboseOn()) Debug.logVerbose("expandedContentId:" + expandedContentId, module); @@ -454,7 +453,7 @@ public class MacroScreenRenderer impleme urlString = rh.makeLink(request, response, editRequest, false, false, false); } - Map<String, Object> parameters = FastMap.newInstance(); + Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("urlString", urlString); parameters.put("editMode", editMode); parameters.put("editContainerStyle", content.getEditContainerStyle(context)); @@ -476,7 +475,7 @@ public class MacroScreenRenderer impleme fullUrlString = rh.makeLink(request, response, urlString, true, false, false); } - Map<String, Object> parameters = FastMap.newInstance(); + Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("fullUrl", fullUrlString); parameters.put("width", content.getWidth()); parameters.put("height", content.getHeight()); @@ -488,7 +487,7 @@ public class MacroScreenRenderer impleme String enableEditName = content.getEnableEditName(context); String enableEditValue = (String)context.get(enableEditName); - Map<String, Object> parameters = FastMap.newInstance(); + Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("editContainerStyle", content.getEditContainerStyle(context)); parameters.put("editRequest", content.getEditRequest(context)); parameters.put("enableEditValue", enableEditValue == null ? "" : enableEditValue); @@ -505,7 +504,7 @@ public class MacroScreenRenderer impleme Delegator delegator = (Delegator) context.get("delegator"); // create a new map for the content rendering; so our current context does not get overwritten! - Map<String, Object> contentContext = FastMap.newInstance(); + Map<String, Object> contentContext = new HashMap<String, Object>(); contentContext.putAll(context); try { @@ -570,7 +569,7 @@ public class MacroScreenRenderer impleme } } - Map<String, Object> parameters = FastMap.newInstance(); + Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("urlString", urlString); parameters.put("editMode", editMode); parameters.put("editContainerStyle", content.getEditContainerStyle(context)); @@ -628,7 +627,7 @@ public class MacroScreenRenderer impleme menuString = sb.toString(); } - Map<String, Object> parameters = FastMap.newInstance(); + Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("title", title); parameters.put("collapsible", collapsible); parameters.put("saveCollapsed", screenlet.saveCollapsed()); @@ -781,7 +780,7 @@ public class MacroScreenRenderer impleme firstLinkUrl = rh.makeLink(request, response, linkText); } - Map<String, Object> parameters = FastMap.newInstance(); + Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("lowIndex", modelForm.getLowIndex(context)); parameters.put("actualPageSize", actualPageSize); parameters.put("ofLabel", ofLabel); Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreen.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreen.java?rev=1635878&r1=1635877&r2=1635878&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreen.java (original) +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreen.java Fri Oct 31 23:13:03 2014 @@ -19,12 +19,11 @@ package org.ofbiz.widget.screen; import java.util.Collection; +import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; -import javolution.util.FastSet; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.UtilGenerics; @@ -84,7 +83,7 @@ public class ModelScreen extends ModelWi } public Set<String> getAllServiceNamesUsed() { - Set<String> allServiceNamesUsed = FastSet.newInstance(); + Set<String> allServiceNamesUsed = new HashSet<String>(); findServiceNamesUsedInWidget(this.section, allServiceNamesUsed); return allServiceNamesUsed; } @@ -144,7 +143,7 @@ public class ModelScreen extends ModelWi } } public Set<String> getAllEntityNamesUsed() { - Set<String> allEntityNamesUsed = FastSet.newInstance(); + Set<String> allEntityNamesUsed = new HashSet<String>(); findEntityNamesUsedInWidget(this.section, allEntityNamesUsed); return allEntityNamesUsed; } @@ -215,7 +214,7 @@ public class ModelScreen extends ModelWi } } public Set<String> getAllFormNamesIncluded() { - Set<String> allFormNamesIncluded = FastSet.newInstance(); + Set<String> allFormNamesIncluded = new HashSet<String>(); findFormNamesIncludedInWidget(this.section, allFormNamesIncluded); return allFormNamesIncluded; } @@ -268,7 +267,7 @@ public class ModelScreen extends ModelWi } public Set<String> getAllRequestsLocationAndUri() throws GeneralException { - Set<String> allRequestNamesIncluded = FastSet.newInstance(); + Set<String> allRequestNamesIncluded = new HashSet<String>(); findRequestNamesLinkedtoInWidget(this.section, allRequestNamesIncluded); return allRequestNamesIncluded; } Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java?rev=1635878&r1=1635877&r2=1635878&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java (original) +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java Fri Oct 31 23:13:03 2014 @@ -21,6 +21,8 @@ package org.ofbiz.widget.screen; import java.io.Serializable; import java.text.MessageFormat; import java.util.ArrayList; +import java.util.HashMap; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; @@ -30,9 +32,6 @@ import java.util.regex.PatternSyntaxExce import javax.servlet.ServletContext; import javax.servlet.http.HttpSession; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.ObjectType; @@ -82,9 +81,8 @@ public abstract class ModelScreenAction @Deprecated public static List<ModelScreenAction> readSubActions(ModelScreen modelScreen, Element parentElement) { - List<ModelScreenAction> actions = FastList.newInstance(); - List<? extends Element> actionElementList = UtilXml.childElementList(parentElement); + List<ModelScreenAction> actions = new ArrayList<ModelScreenAction>(actionElementList.size()); for (Element actionElement: actionElementList) { if ("set".equals(actionElement.getNodeName())) { actions.add(new SetField(modelScreen, actionElement)); @@ -150,6 +148,7 @@ public abstract class ModelScreenAction } } + @SuppressWarnings("rawtypes") @Override public void runAction(Map<String, Object> context) { String globalStr = this.globalExdr.expandString(context); @@ -189,9 +188,9 @@ public abstract class ModelScreenAction if (UtilValidate.isNotEmpty(this.type)) { if ("NewMap".equals(this.type)) { - newValue = FastMap.newInstance(); + newValue = new HashMap(); } else if ("NewList".equals(this.type)) { - newValue = FastList.newInstance(); + newValue = new LinkedList(); } else { try { newValue = ObjectType.simpleTypeConvert(newValue, this.type, null, (TimeZone) context.get("timeZone"), (Locale) context.get("locale"), true); @@ -414,7 +413,7 @@ public abstract class ModelScreenAction @Override public void runAction(Map<String, Object> context) throws GeneralException { if (location.endsWith(".xml")) { - Map<String, Object> localContext = FastMap.newInstance(); + Map<String, Object> localContext = new HashMap<String, Object>(); localContext.putAll(context); DispatchContext ctx = this.modelScreen.getDispatcher(context).getDispatchContext(); MethodContext methodContext = new MethodContext(ctx, localContext, null); @@ -460,7 +459,7 @@ public abstract class ModelScreenAction if ("true".equals(autoFieldMapString)) { DispatchContext dc = this.modelScreen.getDispatcher(context).getDispatchContext(); // try a map called "parameters", try it first so values from here are overriden by values in the main context - Map<String, Object> combinedMap = FastMap.newInstance(); + Map<String, Object> combinedMap = new HashMap<String, Object>(); Map<String, Object> parametersObj = UtilGenerics.toMap(context.get("parameters")); if (parametersObj != null) { combinedMap.putAll(parametersObj); @@ -475,7 +474,7 @@ public abstract class ModelScreenAction } } if (serviceContext == null) { - serviceContext = FastMap.newInstance(); + serviceContext = new HashMap<String, Object>(); } if (this.fieldMap != null) { Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenCondition.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenCondition.java?rev=1635878&r1=1635877&r2=1635878&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenCondition.java (original) +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenCondition.java Fri Oct 31 23:13:03 2014 @@ -20,13 +20,13 @@ package org.ofbiz.widget.screen; import java.io.Serializable; import java.lang.reflect.Method; +import java.util.ArrayList; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; import java.util.TimeZone; -import javolution.util.FastList; - import org.apache.oro.text.regex.MalformedPatternException; import org.apache.oro.text.regex.Pattern; import org.apache.oro.text.regex.PatternMatcher; @@ -85,8 +85,8 @@ public class ModelScreenCondition implem } public static List<ScreenCondition> readSubConditions(ModelScreen modelScreen, Element conditionElement) { - List<ScreenCondition> condList = FastList.newInstance(); List<? extends Element> subElementList = UtilXml.childElementList(conditionElement); + List<ScreenCondition> condList = new ArrayList<ScreenCondition>(subElementList.size()); for (Element subElement: subElementList) { condList.add(readCondition(modelScreen, subElement)); } @@ -420,7 +420,7 @@ public class ModelScreenCondition implem fieldVal = ""; } - List<Object> messages = FastList.newInstance(); + List<Object> messages = new LinkedList<Object>(); Boolean resultBool = BaseCompare.doRealCompare(fieldVal, value, operator, type, format, messages, null, null, true); if (messages.size() > 0) { messages.add(0, "Error with comparison in if-compare between field [" + fieldAcsr.toString() + "] with value [" + fieldVal + "] and value [" + value + "] with operator [" + operator + "] and type [" + type + "]: "); @@ -471,7 +471,7 @@ public class ModelScreenCondition implem fieldVal = ""; } - List<Object> messages = FastList.newInstance(); + List<Object> messages = new LinkedList<Object>(); Boolean resultBool = BaseCompare.doRealCompare(fieldVal, toFieldVal, operator, type, format, messages, null, null, false); if (messages.size() > 0) { messages.add(0, "Error with comparison in if-compare-field between field [" + fieldAcsr.toString() + "] with value [" + fieldVal + "] and to-field [" + toFieldAcsr.toString() + "] with value [" + toFieldVal + "] with operator [" + operator + "] and type [" + type + "]: "); Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenWidget.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenWidget.java?rev=1635878&r1=1635877&r2=1635878&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenWidget.java (original) +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenWidget.java Fri Oct 31 23:13:03 2014 @@ -23,15 +23,13 @@ import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.HashMap; +import java.util.LinkedList; import java.util.List; import java.util.ListIterator; import java.util.Map; import javax.xml.parsers.ParserConfigurationException; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.StringUtil; @@ -85,7 +83,7 @@ public abstract class ModelScreenWidget public abstract String rawString(); public static List<ModelScreenWidget> readSubWidgets(ModelScreen modelScreen, List<? extends Element> subElementList) { - List<ModelScreenWidget> subWidgets = FastList.newInstance(); + List<ModelScreenWidget> subWidgets = new ArrayList<ModelScreenWidget>(subElementList.size()); for (Element subElement: subElementList) { subWidgets.add(WidgetFactory.getModelScreenWidget(modelScreen, subElement)); } @@ -570,7 +568,7 @@ public abstract class ModelScreenWidget // build the widgetpath List<String> widgetTrail = UtilGenerics.toList(context.get("_WIDGETTRAIL_")); if (widgetTrail == null) { - widgetTrail = FastList.newInstance(); + widgetTrail = new LinkedList<String>(); } String thisName = nameExdr.expandString(context); @@ -1273,7 +1271,7 @@ public abstract class ModelScreenWidget protected String linkType; protected String width; protected String height; - protected List<WidgetWorker.Parameter> parameterList = FastList.newInstance(); + protected List<WidgetWorker.Parameter> parameterList = new ArrayList<WidgetWorker.Parameter>(); protected WidgetWorker.AutoServiceParameters autoServiceParameters; protected WidgetWorker.AutoEntityParameters autoEntityParameters; @@ -1397,7 +1395,7 @@ public abstract class ModelScreenWidget } public Map<String, String> getParameterMap(Map<String, Object> context) { - Map<String, String> fullParameterMap = FastMap.newInstance(); + Map<String, String> fullParameterMap = new HashMap<String, String>(); /* leaving this here... may want to add it at some point like the hyperlink element: Map<String, String> addlParamMap = this.parametersMapAcsr.get(context); Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ScreenFactory.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ScreenFactory.java?rev=1635878&r1=1635877&r2=1635878&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ScreenFactory.java (original) +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ScreenFactory.java Fri Oct 31 23:13:03 2014 @@ -20,6 +20,7 @@ package org.ofbiz.widget.screen; import java.io.IOException; import java.net.URL; +import java.util.HashMap; import java.util.List; import java.util.Map; @@ -27,8 +28,6 @@ import javax.servlet.ServletContext; import javax.servlet.http.HttpServletRequest; import javax.xml.parsers.ParserConfigurationException; -import javolution.util.FastMap; - import org.ofbiz.base.location.FlexibleLocation; import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; @@ -162,7 +161,7 @@ public class ScreenFactory { } public static Map<String, ModelScreen> readScreenDocument(Document screenFileDoc, String sourceLocation) { - Map<String, ModelScreen> modelScreenMap = FastMap.newInstance(); + Map<String, ModelScreen> modelScreenMap = new HashMap<String, ModelScreen>(); if (screenFileDoc != null) { // read document and construct ModelScreen for each screen element Element rootElement = screenFileDoc.getDocumentElement(); Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ScreenRenderer.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ScreenRenderer.java?rev=1635878&r1=1635877&r2=1635878&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ScreenRenderer.java (original) +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ScreenRenderer.java Fri Oct 31 23:13:03 2014 @@ -21,6 +21,8 @@ package org.ofbiz.widget.screen; import java.io.IOException; import java.io.StringWriter; import java.io.Writer; +import java.util.HashMap; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; @@ -32,9 +34,6 @@ import javax.servlet.http.HttpServletRes import javax.servlet.http.HttpSession; import javax.xml.parsers.ParserConfigurationException; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.UtilDateTime; @@ -186,6 +185,7 @@ public class ScreenRenderer { populateContextForRequest(context, this, request, response, servletContext); } + @SuppressWarnings("rawtypes") public static void populateContextForRequest(MapStack<String> context, ScreenRenderer screens, HttpServletRequest request, HttpServletResponse response, ServletContext servletContext) { HttpSession session = request.getSession(); @@ -246,7 +246,7 @@ public class ScreenRenderer { context.put("requestParameters", UtilHttp.getParameterMap(request)); // this is a dummy object to stand-in for the JPublish page object for backward compatibility - context.put("page", FastMap.newInstance()); + context.put("page", new HashMap()); // some information from/about the ControlServlet environment context.put("controlPath", request.getAttribute("_CONTROL_PATH_")); @@ -260,9 +260,9 @@ public class ScreenRenderer { // setup message lists List<String> eventMessageList = UtilGenerics.toList(request.getAttribute("eventMessageList")); - if (eventMessageList == null) eventMessageList = FastList.newInstance(); + if (eventMessageList == null) eventMessageList = new LinkedList<String>(); List<String> errorMessageList = UtilGenerics.toList(request.getAttribute("errorMessageList")); - if (errorMessageList == null) errorMessageList = FastList.newInstance(); + if (errorMessageList == null) errorMessageList = new LinkedList<String>(); if (request.getAttribute("_EVENT_MESSAGE_") != null) { eventMessageList.add(UtilFormatOut.replaceString((String) request.getAttribute("_EVENT_MESSAGE_"), "\n", "<br/>")); |
Free forum by Nabble | Edit this page |