Remove unnecessary casts

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1044931 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Scott Gray
2010-12-12 21:31:27 +00:00
parent 54d64290f6
commit 47f43a302a
147 changed files with 464 additions and 464 deletions
@@ -239,7 +239,7 @@ public class MacroFormRenderer implements FormStringRenderer {
while (fieldIterator.hasNext()) {
count++;
Entry<String, Object> field = fieldIterator.next();
extraParameter += (String) field.getKey() + ":'" + (String) field.getValue() + "'";
extraParameter += field.getKey() + ":'" + (String) field.getValue() + "'";
if (count < fieldSet.size()) {
extraParameter += ',';
}
@@ -92,7 +92,7 @@ public class HtmlFormWrapper {
}
// if a parameter was passed saying this is an error, it is an error
if ("true".equals((String) parameterMap.get("isError"))) {
if ("true".equals(parameterMap.get("isError"))) {
context.put("isError", Boolean.TRUE);
}
@@ -93,7 +93,7 @@ public class HtmlMenuWrapper {
}
// if a parameter was passed saying this is an error, it is an error
if ("true".equals((String) parameterMap.get("isError"))) {
if ("true".equals(parameterMap.get("isError"))) {
context.put("isError", Boolean.TRUE);
}
}
@@ -287,7 +287,7 @@ public class HtmlScreenRenderer extends HtmlWidgetRenderer implements ScreenStri
if (uiLabelMap == null) {
Debug.logWarning("Could not find uiLabelMap in context", module);
} else {
ofLabel = (String) uiLabelMap.get("CommonOf");
ofLabel = uiLabelMap.get("CommonOf");
ofLabel = ofLabel.toLowerCase();
}
@@ -77,7 +77,7 @@ public class HtmlTreeRenderer extends HtmlWidgetRenderer implements TreeStringRe
String targetEntityId = null;
List<String> targetNodeTrail = UtilGenerics.toList(context.get("targetNodeTrail"));
if (depth < targetNodeTrail.size()) {
targetEntityId = (String)targetNodeTrail.get(depth);
targetEntityId = targetNodeTrail.get(depth);
}
int openDepth = node.getModelTree().getOpenDepth();
@@ -102,7 +102,7 @@ public class HtmlTreeRenderer extends HtmlWidgetRenderer implements TreeStringRe
} else {
context.put("processChildren", Boolean.TRUE);
//expandCollapseLink.setText("&nbsp;-&nbsp;");
String lastContentId = (String)currentNodeTrail.remove(currentNodeTrail.size() - 1);
String lastContentId = currentNodeTrail.remove(currentNodeTrail.size() - 1);
currentNodeTrailPiped = StringUtil.join(currentNodeTrail, "|");
if (currentNodeTrailPiped == null) {
currentNodeTrailPiped = "";
@@ -199,7 +199,7 @@ public class ModelMenuItem {
public ModelMenuItem addUpdateMenuItem(ModelMenuItem modelMenuItem) {
// not a conditional item, see if a named item exists in Map
ModelMenuItem existingMenuItem = (ModelMenuItem) this.menuItemMap.get(modelMenuItem.getName());
ModelMenuItem existingMenuItem = this.menuItemMap.get(modelMenuItem.getName());
if (existingMenuItem != null) {
// does exist, update the item by doing a merge/override
existingMenuItem.mergeOverrideModelMenuItem(modelMenuItem);
@@ -688,7 +688,7 @@ public class MacroScreenRenderer implements ScreenStringRenderer {
if (uiLabelMap == null) {
Debug.logWarning("Could not find uiLabelMap in context", module);
} else {
ofLabel = (String) uiLabelMap.get("CommonOf");
ofLabel = uiLabelMap.get("CommonOf");
ofLabel = ofLabel.toLowerCase();
}
@@ -790,8 +790,8 @@ public class MacroScreenRenderer implements ScreenStringRenderer {
if (uiLabelMap == null) {
Debug.logWarning("Could not find uiLabelMap in context", module);
} else {
addColumnLabel = (String) uiLabelMap.get("CommonAddColumn");
addColumnHint = (String) uiLabelMap.get("CommonAddAColumnToThisPortalPage");
addColumnLabel = uiLabelMap.get("CommonAddColumn");
addColumnHint = uiLabelMap.get("CommonAddAColumnToThisPortalPage");
}
StringWriter sr = new StringWriter();
@@ -835,13 +835,13 @@ public class MacroScreenRenderer implements ScreenStringRenderer {
if (uiLabelMap == null) {
Debug.logWarning("Could not find uiLabelMap in context", module);
} else {
delColumnLabel = (String) uiLabelMap.get("CommonDeleteColumn");
delColumnHint = (String) uiLabelMap.get("CommonDeleteThisColumn");
delColumnLabel = uiLabelMap.get("CommonDeleteColumn");
delColumnHint = uiLabelMap.get("CommonDeleteThisColumn");
addPortletLabel = (String) uiLabelMap.get("CommonAddAPortlet");
addPortletHint = (String) uiLabelMap.get("CommonAddPortletToPage");
colWidthLabel = (String) uiLabelMap.get("CommonWidth");
setColumnSizeHint = (String) uiLabelMap.get("CommonSetColumnWidth");
addPortletLabel = uiLabelMap.get("CommonAddAPortlet");
addPortletHint = uiLabelMap.get("CommonAddPortletToPage");
colWidthLabel = uiLabelMap.get("CommonWidth");
setColumnSizeHint = uiLabelMap.get("CommonSetColumnWidth");
}
StringWriter sr = new StringWriter();
@@ -908,8 +908,8 @@ public class MacroScreenRenderer implements ScreenStringRenderer {
if (uiLabelMap == null) {
Debug.logWarning("Could not find uiLabelMap in context", module);
} else {
delPortletHint = (String) uiLabelMap.get("CommonDeleteThisPortlet");
editAttributeHint = (String) uiLabelMap.get("CommonEditPortletAttributes");
delPortletHint = uiLabelMap.get("CommonDeleteThisPortlet");
editAttributeHint = uiLabelMap.get("CommonEditPortletAttributes");
}
StringWriter sr = new StringWriter();
@@ -79,7 +79,7 @@ public class MacroScreenViewHandler extends AbstractViewHandler {
compressOutput = "true".equals(UtilProperties.getPropertyValue("widget", "compress.HTML"));
}
if (!compressOutput && this.servletContext != null) {
compressOutput = "true".equals((String) this.servletContext.getAttribute("compressHTML"));
compressOutput = "true".equals(this.servletContext.getAttribute("compressHTML"));
}
if (compressOutput) {
// StandardCompress defaults to a 2k buffer. That could be increased
@@ -159,7 +159,7 @@ public class ScreenFactory {
}
}
ModelScreen modelScreen = (ModelScreen) modelScreenMap.get(screenName);
ModelScreen modelScreen = modelScreenMap.get(screenName);
if (modelScreen == null) {
throw new IllegalArgumentException("Could not find screen with name [" + screenName + "] in webapp resource [" + resourceName + "] in the webapp [" + webappName + "]");
}
@@ -230,7 +230,7 @@ public class ModelTree extends ModelWidget {
public void renderTreeString(StringBuffer buf, Map<String, Object> context, TreeStringRenderer treeStringRenderer) throws GeneralException {
Map<String, Object> parameters = UtilGenerics.checkMap(context.get("parameters"));
ModelNode node = (ModelNode)nodeMap.get(rootNodeName);
ModelNode node = nodeMap.get(rootNodeName);
String trailName = trailNameExdr.expandString(context);
String treeString = (String)context.get(trailName);
@@ -548,7 +548,7 @@ public class ModelTree extends ModelWidget {
this.subNodeValues = FastList.newInstance();
for (ModelSubNode subNode: subNodeList) {
String nodeName = subNode.getNodeName(context);
ModelNode node = (ModelNode)modelTree.nodeMap.get(nodeName);
ModelNode node = modelTree.nodeMap.get(nodeName);
List<ModelTreeAction> subNodeActions = subNode.getActions();
//if (Debug.infoOn()) Debug.logInfo(" context.currentValue:" + context.get("currentValue"), module);
ModelTreeAction.runSubActions(subNodeActions, context);
@@ -69,7 +69,7 @@ public class TreeFactory {
}
}
ModelTree modelTree = (ModelTree) modelTreeMap.get(treeName);
ModelTree modelTree = modelTreeMap.get(treeName);
if (modelTree == null) {
throw new IllegalArgumentException("Could not find tree with name [" + treeName + "] in class resource [" + resourceName + "]");
}
@@ -99,7 +99,7 @@ public class TreeFactory {
}
}
ModelTree modelTree = (ModelTree) modelTreeMap.get(treeName);
ModelTree modelTree = modelTreeMap.get(treeName);
if (modelTree == null) {
throw new IllegalArgumentException("Could not find tree with name [" + treeName + "] in webapp resource [" + resourceName + "] in the webapp [" + webappName + "]");
}