Modified: ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/IterateSectionWidget.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/IterateSectionWidget.java?rev=1837577&r1=1837576&r2=1837577&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/IterateSectionWidget.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/IterateSectionWidget.java Tue Aug 7 07:30:43 2018 @@ -154,12 +154,12 @@ public class IterateSectionWidget extend locViewSize = Integer.parseInt(viewSizeString); } catch (NumberFormatException e) { try { - viewIndex = ((Integer) context.get("viewIndex")).intValue(); + viewIndex = (Integer) context.get("viewIndex"); } catch (Exception e2) { viewIndex = 0; } } - context.put("viewIndex", Integer.valueOf(viewIndex)); + context.put("viewIndex", viewIndex); lowIndex = viewIndex * locViewSize; highIndex = (viewIndex + 1) * locViewSize; } else { @@ -187,7 +187,7 @@ public class IterateSectionWidget extend } else { contextMs.put(entryName, item); } - contextMs.put("itemIndex", Integer.valueOf(itemIndex)); + contextMs.put("itemIndex", itemIndex); if (iterateIndex < listSize) { contextMs.put("iterateId",String.valueOf(entryName+iterateIndex)); @@ -208,7 +208,7 @@ public class IterateSectionWidget extend Map<String, Object> globalCtx = UtilGenerics.checkMap(context.get("globalContext")); if (globalCtx != null) { lastPageNumber = (Integer)globalCtx.get("PAGINATOR_NUMBER"); - globalCtx.put("PAGINATOR_NUMBER", Integer.valueOf(startPageNumber)); + globalCtx.put("PAGINATOR_NUMBER", startPageNumber); } renderNextPrev(writer, context, listSize, actualPageSize); if (globalCtx != null) { @@ -230,7 +230,7 @@ public class IterateSectionWidget extend public boolean getPaginate(Map<String, Object> context) { if (!this.paginate.isEmpty() && UtilValidate.isNotEmpty(this.paginate.expandString(context))) { - return Boolean.valueOf(this.paginate.expandString(context)).booleanValue(); + return Boolean.valueOf(this.paginate.expandString(context)); } return true; } @@ -265,14 +265,14 @@ public class IterateSectionWidget extend int viewIndex = -1; try { - viewIndex = ((Integer) context.get("viewIndex")).intValue(); + viewIndex = (Integer) context.get("viewIndex"); } catch (Exception e) { viewIndex = 0; } int viewSize = -1; try { - viewSize = ((Integer) context.get("viewSize")).intValue(); + viewSize = (Integer) context.get("viewSize"); } catch (Exception e) { viewSize = this.getViewSize(); } @@ -314,7 +314,7 @@ public class IterateSectionWidget extend } if (listSize > 0) { - Map<String, Integer> messageMap = UtilMisc.toMap("lowCount", Integer.valueOf(lowIndex + 1), "highCount", Integer.valueOf(lowIndex + actualPageSize), "total", Integer.valueOf(listSize)); + Map<String, Integer> messageMap = UtilMisc.toMap("lowCount", lowIndex + 1, "highCount", lowIndex + actualPageSize, "total", listSize); String commonDisplaying = UtilProperties.getMessage("CommonUiLabels", "CommonDisplaying", messageMap, (Locale) context.get("locale")); writer.append(" <span class=\"tabletext\">").append(commonDisplaying).append("</span> \n"); } Modified: ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelForm.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelForm.java?rev=1837577&r1=1837576&r2=1837577&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelForm.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelForm.java Tue Aug 7 07:30:43 2018 @@ -1107,7 +1107,7 @@ public abstract class ModelForm extends public boolean getPaginate(Map<String, Object> context) { String paginate = this.paginate.expandString(context); if (!paginate.isEmpty()) { - return Boolean.valueOf(paginate).booleanValue(); + return Boolean.valueOf(paginate); } return true; } @@ -1314,7 +1314,7 @@ public abstract class ModelForm extends // retVal should be a Boolean, if not something weird is up... if (retVal instanceof Boolean) { Boolean boolVal = (Boolean) retVal; - if (boolVal.booleanValue()) { + if (boolVal) { styles += altRowStyle.style; } } else { @@ -1351,7 +1351,7 @@ public abstract class ModelForm extends // retVal should be a Boolean, if not something weird is up... if (retVal instanceof Boolean) { Boolean boolVal = (Boolean) retVal; - condTrue = boolVal.booleanValue(); + condTrue = boolVal; } else { throw new IllegalArgumentException("Return value from target condition eval was not a Boolean: " + retVal.getClass().getName() + " [" + retVal + "] of form " + getName()); Modified: ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelFormField.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelFormField.java?rev=1837577&r1=1837576&r2=1837577&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelFormField.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelFormField.java Tue Aug 7 07:30:43 2018 @@ -234,7 +234,7 @@ public class ModelFormField { Integer itemIndex = (Integer) context.get("itemIndex"); if ("list".equals(modelForm.getType()) || "multi".equals(modelForm.getType())) { if (itemIndex != null) { - return idName + modelForm.getItemIndexSeparator() + itemIndex.intValue(); + return idName + modelForm.getItemIndexSeparator() + itemIndex; } } } @@ -526,7 +526,7 @@ public class ModelFormField { Integer itemIndex = (Integer) context.get("itemIndex"); if (itemIndex != null && "multi".equals(this.modelForm.getType())) { - return baseName + this.modelForm.getItemIndexSeparator() + itemIndex.intValue(); + return baseName + this.modelForm.getItemIndexSeparator() + itemIndex; } return baseName; } @@ -535,7 +535,7 @@ public class ModelFormField { if (this.position == null) { return 1; } - return position.intValue(); + return position; } public String getRedWhen() { @@ -753,7 +753,7 @@ public class ModelFormField { } public boolean isSortField() { - return this.sortField != null && this.sortField.booleanValue(); + return this.sortField != null && this.sortField; } public boolean isUseWhenEmpty() { @@ -897,7 +897,7 @@ public class ModelFormField { // retVal should be a Boolean, if not something weird is up... if (retVal instanceof Boolean) { Boolean boolVal = (Boolean) retVal; - condTrue = boolVal.booleanValue(); + condTrue = boolVal; } else { throw new IllegalArgumentException("Return value from use-when condition eval was not a Boolean: " + (retVal != null ? retVal.getClass().getName() : "null") + " [" + retVal + "] on the field " + this.name @@ -1023,7 +1023,7 @@ public class ModelFormField { public Boolean isAllChecked(Map<String, Object> context) { String allCheckedStr = this.allChecked.expandString(context); if (!allCheckedStr.isEmpty()) { - return Boolean.valueOf("true".equals(allCheckedStr)); + return "true".equals(allCheckedStr); } return null; } @@ -1629,7 +1629,7 @@ public class ModelFormField { Double parsedRetVal = (Double) ObjectType.simpleTypeConvert(retVal, "Double", null, locale, false); String template = UtilProperties.getPropertyValue("arithmetic", "accounting-number.format", "#,##0.00;(#,##0.00)"); - retVal = UtilFormatOut.formatDecimalNumber(parsedRetVal.doubleValue(), template, locale); + retVal = UtilFormatOut.formatDecimalNumber(parsedRetVal, template, locale); } catch (GeneralException e) { String errMsg = "Error formatting number [" + retVal + "]: " + e.toString(); Debug.logError(e, errMsg, module); @@ -1845,7 +1845,7 @@ public class ModelFormField { baseName += "_OTHER"; Integer itemIndex = (Integer) context.get("itemIndex"); if (itemIndex != null && "multi".equals(getModelFormField().modelForm.getType())) { - return baseName + getModelFormField().modelForm.getItemIndexSeparator() + itemIndex.intValue(); + return baseName + getModelFormField().modelForm.getItemIndexSeparator() + itemIndex; } return baseName; } @@ -3774,7 +3774,7 @@ public class ModelFormField { // retVal should be a Boolean, if not something weird is up... if (retVal instanceof Boolean) { Boolean boolVal = (Boolean) retVal; - shouldUse = boolVal.booleanValue(); + shouldUse = boolVal; } else { throw new IllegalArgumentException("Return value from target condition eval was not a Boolean: " + retVal.getClass().getName() + " [" + retVal + "]"); Modified: ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelFormFieldBuilder.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelFormFieldBuilder.java?rev=1837577&r1=1837576&r2=1837577&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelFormFieldBuilder.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelFormFieldBuilder.java Tue Aug 7 07:30:43 2018 @@ -521,29 +521,29 @@ public class ModelFormFieldBuilder { if ("find".equals(defaultFieldType)) { if ("id".equals(modelField.getType())) { ModelFormField.TextFindField textField = new ModelFormField.TextFindField(FieldInfo.SOURCE_AUTO_ENTITY, 20, - Integer.valueOf(20), null); + 20, null); this.setFieldInfo(textField); } else if ("id-long".equals(modelField.getType())) { ModelFormField.TextFindField textField = new ModelFormField.TextFindField(FieldInfo.SOURCE_AUTO_ENTITY, 40, - Integer.valueOf(60), null); + 60, null); this.setFieldInfo(textField); } else if ("id-vlong".equals(modelField.getType())) { ModelFormField.TextFindField textField = new ModelFormField.TextFindField(FieldInfo.SOURCE_AUTO_ENTITY, 60, - Integer.valueOf(250), null); + 250, null); this.setFieldInfo(textField); } else if ("very-short".equals(modelField.getType())) { ModelFormField.TextField textField = new ModelFormField.TextField(FieldInfo.SOURCE_AUTO_ENTITY, 6, - Integer.valueOf(10), null); + 10, null); this.setFieldInfo(textField); } else if ("name".equals(modelField.getType()) || "short-varchar".equals(modelField.getType())) { ModelFormField.TextFindField textField = new ModelFormField.TextFindField(FieldInfo.SOURCE_AUTO_ENTITY, 40, - Integer.valueOf(60), null); + 60, null); this.setFieldInfo(textField); } else if ("value".equals(modelField.getType()) || "comment".equals(modelField.getType()) || "description".equals(modelField.getType()) || "long-varchar".equals(modelField.getType()) || "url".equals(modelField.getType()) || "email".equals(modelField.getType())) { ModelFormField.TextFindField textField = new ModelFormField.TextFindField(FieldInfo.SOURCE_AUTO_ENTITY, 60, - Integer.valueOf(250), null); + 250, null); this.setFieldInfo(textField); } else if ("floating-point".equals(modelField.getType()) || "currency-amount".equals(modelField.getType()) || "numeric".equals(modelField.getType()) || "fixed-point".equals(modelField.getType()) || "currency-precise".equals(modelField.getType())) { @@ -570,15 +570,15 @@ public class ModelFormFieldBuilder { } else { if ("id".equals(modelField.getType())) { ModelFormField.TextField textField = new ModelFormField.TextField(FieldInfo.SOURCE_AUTO_ENTITY, 20, - Integer.valueOf(20), null); + 20, null); this.setFieldInfo(textField); } else if ("id-long".equals(modelField.getType())) { ModelFormField.TextField textField = new ModelFormField.TextField(FieldInfo.SOURCE_AUTO_ENTITY, 40, - Integer.valueOf(60), null); + 60, null); this.setFieldInfo(textField); } else if ("id-vlong".equals(modelField.getType())) { ModelFormField.TextField textField = new ModelFormField.TextField(FieldInfo.SOURCE_AUTO_ENTITY, 60, - Integer.valueOf(250), null); + 250, null); this.setFieldInfo(textField); } else if ("indicator".equals(modelField.getType())) { List<OptionSource> optionSources = new ArrayList<>(); @@ -589,20 +589,20 @@ public class ModelFormFieldBuilder { this.setFieldInfo(dropDownField); } else if ("very-short".equals(modelField.getType())) { ModelFormField.TextField textField = new ModelFormField.TextField(FieldInfo.SOURCE_AUTO_ENTITY, 6, - Integer.valueOf(10), null); + 10, null); this.setFieldInfo(textField); } else if ("very-long".equals(modelField.getType())) { ModelFormField.TextareaField textareaField = new ModelFormField.TextareaField(FieldInfo.SOURCE_AUTO_ENTITY, null); this.setFieldInfo(textareaField); } else if ("name".equals(modelField.getType()) || "short-varchar".equals(modelField.getType())) { ModelFormField.TextField textField = new ModelFormField.TextField(FieldInfo.SOURCE_AUTO_ENTITY, 40, - Integer.valueOf(60), null); + 60, null); this.setFieldInfo(textField); } else if ("value".equals(modelField.getType()) || "comment".equals(modelField.getType()) || "description".equals(modelField.getType()) || "long-varchar".equals(modelField.getType()) || "url".equals(modelField.getType()) || "email".equals(modelField.getType())) { ModelFormField.TextField textField = new ModelFormField.TextField(FieldInfo.SOURCE_AUTO_ENTITY, 60, - Integer.valueOf(250), null); + 250, null); this.setFieldInfo(textField); } else if ("floating-point".equals(modelField.getType()) || "currency-amount".equals(modelField.getType()) || "numeric".equals(modelField.getType())) { Modified: ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelMenuItem.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelMenuItem.java?rev=1837577&r1=1837576&r2=1837577&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelMenuItem.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelMenuItem.java Tue Aug 7 07:30:43 2018 @@ -410,7 +410,7 @@ public class ModelMenuItem extends Model if (this.position == null) { return 1; } - return position.intValue(); + return position; } public String getSelectedStyle() { Modified: ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelScreenWidget.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelScreenWidget.java?rev=1837577&r1=1837576&r2=1837577&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelScreenWidget.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelScreenWidget.java Tue Aug 7 07:30:43 2018 @@ -619,7 +619,7 @@ public abstract class ModelScreenWidget String screenletId = this.getId(context) + "_collapsed"; Map<String, ? extends Object> userPreferences = UtilGenerics.checkMap(context.get("userPreferences")); if (userPreferences != null && userPreferences.containsKey(screenletId)) { - return Boolean.valueOf((String)userPreferences.get(screenletId)).booleanValue() ; + return Boolean.valueOf((String) userPreferences.get(screenletId)); } return "true".equals(this.initiallyCollapsed.expand(context)); Modified: ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelTree.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelTree.java?rev=1837577&r1=1837576&r2=1837577&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelTree.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelTree.java Tue Aug 7 07:30:43 2018 @@ -488,7 +488,7 @@ public class ModelTree extends ModelWidg } if (nodeCount == null && modelField != null || this.modelTree.forceChildCheck) { getChildren(context); - nodeCount = Long.valueOf(subNodeValues.size()); + nodeCount = (long) subNodeValues.size(); String pkName = this.getPkName(context); String id = null; if (!this.entryName.isEmpty()) { @@ -510,7 +510,7 @@ public class ModelTree extends ModelWidg } } else if (nodeCount == null) { getChildren(context); - nodeCount = Long.valueOf(subNodeValues.size()); + nodeCount = (long) subNodeValues.size(); } if (nodeCount != null && nodeCount.intValue() > 0) { hasChildren = true; @@ -584,7 +584,7 @@ public class ModelTree extends ModelWidg } treeStringRenderer.renderLastElement(writer, context, this); Boolean processChildren = (Boolean) context.get("processChildren"); - if (processChildren.booleanValue()) { + if (processChildren) { List<Object[]> subNodeValues = getChildren(context); int newDepth = depth + 1; for (Object[] arr : subNodeValues) { Modified: ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelWidget.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelWidget.java?rev=1837577&r1=1837576&r2=1837577&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelWidget.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelWidget.java Tue Aug 7 07:30:43 2018 @@ -63,8 +63,8 @@ public abstract class ModelWidget implem protected ModelWidget(Element widgetElement) { this.name = widgetElement.getAttribute("name"); this.systemId = (String) widgetElement.getUserData("systemId"); - this.startColumn = ((Integer) widgetElement.getUserData("startColumn")).intValue(); - this.startLine = ((Integer) widgetElement.getUserData("startLine")).intValue(); + this.startColumn = (Integer) widgetElement.getUserData("startColumn"); + this.startLine = (Integer) widgetElement.getUserData("startLine"); } public abstract void accept(ModelWidgetVisitor visitor) throws Exception; Modified: ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelWidgetCondition.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelWidgetCondition.java?rev=1837577&r1=1837576&r2=1837577&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelWidgetCondition.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelWidgetCondition.java Tue Aug 7 07:30:43 2018 @@ -241,7 +241,7 @@ public abstract class ModelWidgetConditi Debug.logWarning(fullString.toString(), module); throw new IllegalArgumentException(fullString.toString()); } - return resultBool.booleanValue(); + return resultBool; } } @@ -298,7 +298,7 @@ public abstract class ModelWidgetConditi Debug.logWarning(fullString.toString(), module); throw new IllegalArgumentException(fullString.toString()); } - return resultBool.booleanValue(); + return resultBool; } } @@ -506,7 +506,7 @@ public abstract class ModelWidgetConditi } Boolean hasPermission = (Boolean) resp.get("hasPermission"); if (hasPermission != null) { - return hasPermission.booleanValue(); + return hasPermission; } } return false; @@ -575,7 +575,7 @@ public abstract class ModelWidgetConditi Debug.logError(e, "Error in IfValidationMethod " + methodName + " of class " + className + ", defaulting to false ", module); } - return resultBool.booleanValue(); + return resultBool; } } Modified: ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/FormRenderer.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/FormRenderer.java?rev=1837577&r1=1837576&r2=1837577&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/FormRenderer.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/FormRenderer.java Tue Aug 7 07:30:43 2018 @@ -81,10 +81,9 @@ public class FormRenderer { Integer itemIndex = (Integer) context.get("itemIndex"); if (itemIndex != null/* && "list".equals(modelForm.getType()) */) { if (UtilValidate.isNotEmpty(context.get("parentItemIndex"))) { - return retVal + context.get("parentItemIndex") + modelForm.getItemIndexSeparator() + itemIndex - .intValue(); + return retVal + context.get("parentItemIndex") + modelForm.getItemIndexSeparator() + itemIndex; } - return retVal + modelForm.getItemIndexSeparator() + itemIndex.intValue(); + return retVal + modelForm.getItemIndexSeparator() + itemIndex; } return retVal; } @@ -96,7 +95,7 @@ public class FormRenderer { formName = modelForm.getName(); } if (itemIndex != null && "list".equals(modelForm.getType())) { - return formName + modelForm.getItemIndexSeparator() + itemIndex.intValue(); + return formName + modelForm.getItemIndexSeparator() + itemIndex; } return formName; } @@ -714,14 +713,14 @@ public class FormRenderer { // set low and high index Paginator.getListLimits(modelForm, context, obj); - int listSize = ((Integer) context.get("listSize")).intValue(); - int lowIndex = ((Integer) context.get("lowIndex")).intValue(); - int highIndex = ((Integer) context.get("highIndex")).intValue(); + int listSize = (Integer) context.get("listSize"); + int lowIndex = (Integer) context.get("lowIndex"); + int highIndex = (Integer) context.get("highIndex"); // we're passed a subset of the list, so use (0, viewSize) range if (modelForm.isOverridenListSize()) { lowIndex = 0; - highIndex = ((Integer) context.get("viewSize")).intValue(); + highIndex = (Integer) context.get("viewSize"); } if (iter != null) { @@ -770,7 +769,7 @@ public class FormRenderer { AbstractModelAction.runSubActions(modelForm.getRowActions(), localContext); - localContext.put("itemIndex", Integer.valueOf(itemIndex - lowIndex)); + localContext.put("itemIndex", itemIndex - lowIndex); if (UtilValidate.isNotEmpty(context.get("renderFormSeqNumber"))) { localContext.put("formUniqueId", "_" + context.get("renderFormSeqNumber")); } @@ -898,9 +897,9 @@ public class FormRenderer { if ((itemIndex + 1) < highIndex) { highIndex = itemIndex + 1; // if list size is overridden, use full listSize - context.put("highIndex", Integer.valueOf(modelForm.isOverridenListSize() ? listSize : highIndex)); + context.put("highIndex", modelForm.isOverridenListSize() ? listSize : highIndex); } - context.put("actualPageSize", Integer.valueOf(highIndex - lowIndex)); + context.put("actualPageSize", highIndex - lowIndex); if (iter instanceof EntityListIterator) { try { @@ -1157,7 +1156,7 @@ public class FormRenderer { if (nextFormField != null) { if (nextFormField.getPosition() > currentFormField.getPosition()) { positionSpan = nextFormField.getPosition() - currentFormField.getPosition() - 1; - nextPositionInRow = Integer.valueOf(nextFormField.getPosition()); + nextPositionInRow = nextFormField.getPosition(); } else { positionSpan = positions - currentFormField.getPosition(); } Modified: ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/Paginator.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/Paginator.java?rev=1837577&r1=1837576&r2=1837577&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/Paginator.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/Paginator.java Tue Aug 7 07:30:43 2018 @@ -44,12 +44,12 @@ public final class Paginator { public static int getActualPageSize(Map<String, Object> context) { Integer value = (Integer) context.get("actualPageSize"); - return value != null ? value.intValue() : (getHighIndex(context) - getLowIndex(context)); + return value != null ? value : (getHighIndex(context) - getLowIndex(context)); } public static int getHighIndex(Map<String, Object> context) { Integer value = (Integer) context.get("highIndex"); - return value != null ? value.intValue() : 0; + return value != null ? value : 0; } // entryList might be an EntityListIterator. It will then be closed at the end of FormRenderer.renderItemRows() @@ -92,21 +92,21 @@ public final class Paginator { lowIndex = 0; highIndex = ModelForm.MAX_PAGE_SIZE; } - context.put("listSize", Integer.valueOf(listSize)); - context.put("viewIndex", Integer.valueOf(viewIndex)); - context.put("viewSize", Integer.valueOf(viewSize)); - context.put("lowIndex", Integer.valueOf(lowIndex)); - context.put("highIndex", Integer.valueOf(highIndex)); + context.put("listSize", listSize); + context.put("viewIndex", viewIndex); + context.put("viewSize", viewSize); + context.put("lowIndex", lowIndex); + context.put("highIndex", highIndex); } public static int getListSize(Map<String, Object> context) { Integer value = (Integer) context.get("listSize"); - return value != null ? value.intValue() : 0; + return value != null ? value : 0; } public static int getLowIndex(Map<String, Object> context) { Integer value = (Integer) context.get("lowIndex"); - return value != null ? value.intValue() : 0; + return value != null ? value : 0; } public static int getViewIndex(ModelForm modelForm, Map<String, Object> context) { @@ -131,7 +131,7 @@ public final class Paginator { value = context.get(field); } if (value instanceof Integer) { - viewIndex = ((Integer) value).intValue(); + viewIndex = (Integer) value; } else if (value instanceof String) { viewIndex = Integer.parseInt((String) value); } @@ -163,7 +163,7 @@ public final class Paginator { value = context.get(field); } if (value instanceof Integer) { - viewSize = ((Integer) value).intValue(); + viewSize = (Integer) value; } else if (value instanceof String && UtilValidate.isNotEmpty(value)) { viewSize = Integer.parseInt((String) value); } @@ -200,14 +200,14 @@ public final class Paginator { // set low and high index getListLimits(modelForm, context, obj); - int listSize = ((Integer) context.get("listSize")).intValue(); - int lowIndex = ((Integer) context.get("lowIndex")).intValue(); - int highIndex = ((Integer) context.get("highIndex")).intValue(); + int listSize = (Integer) context.get("listSize"); + int lowIndex = (Integer) context.get("lowIndex"); + int highIndex = (Integer) context.get("highIndex"); // we're passed a subset of the list, so use (0, viewSize) range if (modelForm.isOverridenListSize()) { lowIndex = 0; - highIndex = ((Integer) context.get("viewSize")).intValue(); + highIndex = (Integer) context.get("viewSize"); } if (iter == null) { @@ -226,9 +226,9 @@ public final class Paginator { if ((itemIndex + 1) < highIndex) { highIndex = itemIndex + 1; // if list size is overridden, use full listSize - context.put("highIndex", Integer.valueOf(modelForm.isOverridenListSize() ? listSize : highIndex)); + context.put("highIndex", modelForm.isOverridenListSize() ? listSize : highIndex); } - context.put("actualPageSize", Integer.valueOf(highIndex - lowIndex)); + context.put("actualPageSize", highIndex - lowIndex); if (iter instanceof EntityListIterator) { // The EntityListIterator will be closed at the end of FormRenderer.renderItemRows() Modified: ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/ScreenRenderer.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/ScreenRenderer.java?rev=1837577&r1=1837576&r2=1837577&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/ScreenRenderer.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/ScreenRenderer.java Tue Aug 7 07:30:43 2018 @@ -247,7 +247,7 @@ public class ScreenRenderer { context.put("https", https); } } - context.put("javaScriptEnabled", Boolean.valueOf(UtilHttp.isJavaScriptEnabled(request))); + context.put("javaScriptEnabled", UtilHttp.isJavaScriptEnabled(request)); // these ones are FreeMarker specific and will only work in FTL templates, mainly here for backward compatibility context.put("sessionAttributes", new HttpSessionHashModel(session, FreeMarkerWorker.getDefaultOfbizWrapper())); Modified: ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/html/HtmlMenuRenderer.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/html/HtmlMenuRenderer.java?rev=1837577&r1=1837576&r2=1837577&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/html/HtmlMenuRenderer.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/html/HtmlMenuRenderer.java Tue Aug 7 07:30:43 2018 @@ -303,7 +303,7 @@ public class HtmlMenuRenderer extends Ht String currentMenuItemName = menu.getSelectedMenuItemContextFieldName(context); String currentItemName = menuItem.getName(); Boolean hideIfSelected = menuItem.getHideIfSelected(); - return (hideIfSelected != null && hideIfSelected.booleanValue() && currentMenuItemName != null && currentMenuItemName.equals(currentItemName)); + return (hideIfSelected != null && hideIfSelected && currentMenuItemName != null && currentMenuItemName.equals(currentItemName)); } Modified: ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/html/HtmlMenuWrapper.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/html/HtmlMenuWrapper.java?rev=1837577&r1=1837576&r2=1837577&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/html/HtmlMenuWrapper.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/html/HtmlMenuWrapper.java Tue Aug 7 07:30:43 2018 @@ -133,7 +133,7 @@ public class HtmlMenuWrapper { * parameters Map instead of the value Map. */ public void setIsError(boolean isError) { - this.context.put("isError", Boolean.valueOf(isError)); + this.context.put("isError", isError); } public boolean getIsError() { @@ -141,7 +141,7 @@ public class HtmlMenuWrapper { if (isErrorBoolean == null) { return false; } else { - return isErrorBoolean.booleanValue(); + return isErrorBoolean; } } Modified: ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/html/HtmlTreeRenderer.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/html/HtmlTreeRenderer.java?rev=1837577&r1=1837576&r2=1837577&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/html/HtmlTreeRenderer.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/html/HtmlTreeRenderer.java Tue Aug 7 07:30:43 2018 @@ -133,7 +133,7 @@ public class HtmlTreeRenderer extends Ht public void renderNodeEnd(Appendable writer, Map<String, Object> context, ModelTree.ModelNode node) throws IOException { Boolean processChildren = (Boolean) context.get("processChildren"); - if (processChildren.booleanValue()) { + if (processChildren) { appendWhitespace(writer); writer.append("</ul>"); } @@ -149,7 +149,7 @@ public class HtmlTreeRenderer extends Ht public void renderLastElement(Appendable writer, Map<String, Object> context, ModelTree.ModelNode node) throws IOException { Boolean processChildren = (Boolean) context.get("processChildren"); - if (processChildren.booleanValue()) { + if (processChildren) { appendWhitespace(writer); writer.append("<ul class=\"basic-tree\">"); } Modified: ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroFormRenderer.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroFormRenderer.java?rev=1837577&r1=1837576&r2=1837577&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroFormRenderer.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroFormRenderer.java Tue Aug 7 07:30:43 2018 @@ -779,7 +779,7 @@ public final class MacroFormRenderer imp ModelFormField.AutoComplete autoComplete = dropDownField.getAutoComplete(); String event = modelFormField.getEvent(); String action = modelFormField.getAction(context); - Integer textSize = Integer.valueOf(0); + Integer textSize = 0; if (UtilValidate.isNotEmpty(dropDownField.getTextSize())) { try { textSize = Integer.parseInt(dropDownField.getTextSize()); @@ -1654,7 +1654,7 @@ public final class MacroFormRenderer imp String oddRowStyle = ""; if (itemIndex != null) { altRowStyles = modelForm.getStyleAltRowStyle(context); - if (itemIndex.intValue() % 2 == 0) { + if (itemIndex % 2 == 0) { evenRowStyle = modelForm.getEvenRowStyle(); } else { oddRowStyle = FlexibleStringExpander.expandString(modelForm.getOddRowStyle(), context); @@ -2347,7 +2347,7 @@ public final class MacroFormRenderer imp Debug.logWarning("Could not find uiLabelMap in context", module); } else { pageLabel = uiLabelMap.get("CommonPage"); - Map<String, Integer> messageMap = UtilMisc.toMap("lowCount", Integer.valueOf(lowIndex + 1), "highCount", Integer.valueOf(lowIndex + actualPageSize), "total", Integer.valueOf(listSize)); + Map<String, Integer> messageMap = UtilMisc.toMap("lowCount", lowIndex + 1, "highCount", lowIndex + actualPageSize, "total", listSize); commonDisplaying = UtilProperties.getMessage("CommonUiLabels", "CommonDisplaying", messageMap, (Locale) context.get("locale")); } // for legacy support, the viewSizeParam is VIEW_SIZE and viewIndexParam is VIEW_INDEX when the fields are "viewSize" and "viewIndex" Modified: ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroMenuRenderer.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroMenuRenderer.java?rev=1837577&r1=1837576&r2=1837577&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroMenuRenderer.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroMenuRenderer.java Tue Aug 7 07:30:43 2018 @@ -166,7 +166,7 @@ public class MacroMenuRenderer implement String currentMenuItemName = menu.getSelectedMenuItemContextFieldName(context); String currentItemName = menuItem.getName(); Boolean hideIfSelected = menuItem.getHideIfSelected(); - return (hideIfSelected != null && hideIfSelected.booleanValue() && currentMenuItemName != null && currentMenuItemName.equals(currentItemName)); + return (hideIfSelected != null && hideIfSelected && currentMenuItemName != null && currentMenuItemName.equals(currentItemName)); } @Override Modified: ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroTreeRenderer.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroTreeRenderer.java?rev=1837577&r1=1837576&r2=1837577&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroTreeRenderer.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroTreeRenderer.java Tue Aug 7 07:30:43 2018 @@ -206,7 +206,7 @@ public class MacroTreeRenderer implement StringWriter sr = new StringWriter(); sr.append("<@renderNodeEnd "); sr.append(" processChildren="); - sr.append(Boolean.toString(processChildren.booleanValue())); + sr.append(Boolean.toString(processChildren)); sr.append(" isRootNode="); sr.append(Boolean.toString(node.isRootNode())); sr.append(" />"); @@ -220,7 +220,7 @@ public class MacroTreeRenderer implement public void renderLastElement(Appendable writer, Map<String, Object> context, ModelTree.ModelNode node) throws IOException { Boolean processChildren = (Boolean) context.get("processChildren"); - if (processChildren.booleanValue()) { + if (processChildren) { StringWriter sr = new StringWriter(); sr.append("<@renderLastElement "); sr.append("style=\""); |
Free forum by Nabble | Edit this page |