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
@@ -107,7 +107,7 @@ public class Captcha {
// we can rotate it independently
int charWidth = fontMetrics.charWidth(characterToShow.charAt(i));
int charDim = Math.max(maxAdvance, fontHeight);
int halfCharDim = (int) (charDim / 2);
int halfCharDim = (charDim / 2);
BufferedImage charImage =
new BufferedImage(charDim, charDim, BufferedImage.TYPE_INT_ARGB);
@@ -121,10 +121,10 @@ public class Captcha {
int charX = (int) (0.5 * charDim - 0.5 * charWidth);
charGraphics.drawString("" + characterToShow.charAt(i), charX,
(int) ((charDim - fontMetrics.getAscent()) / 2 + fontMetrics.getAscent()));
((charDim - fontMetrics.getAscent()) / 2 + fontMetrics.getAscent()));
float x = horizMargin + spacePerChar * (i) - charDim / 2.0f;
int y = (int) ((height - charDim) / 2);
int y = ((height - charDim) / 2);
g.drawImage(charImage, (int) x, y, charDim, charDim, null, null);
@@ -137,7 +137,7 @@ public class CommonEvents {
String followSessionId = request.getParameter("followSid");
Map<String, String> follow = appletSessions.get(followSessionId);
if (follow == null) follow = FastMap.newInstance();
String followerListStr = (String) follow.get("followers");
String followerListStr = follow.get("followers");
if (followerListStr == null) {
followerListStr = followerSessionId;
} else {
@@ -452,7 +452,7 @@ public class CommonServices {
Map<String, String> mapOfStrings = checkMap(context.get("mapOfStrings"), String.class, String.class);
for (String str: listOfStrings) {
String v = (String) mapOfStrings.get(str);
String v = mapOfStrings.get(str);
Debug.log("SimpleMapListTest: " + str + " -> " + v, module);
}
@@ -593,8 +593,8 @@ public class FindServices {
String entityName = (String) context.get("entityName");
EntityConditionList entityConditionList = (EntityConditionList) context.get("entityConditionList");
List<String> orderByList = checkList(context.get("orderByList"), String.class);
boolean noConditionFind = "Y".equals((String) context.get("noConditionFind"));
boolean distinct = "Y".equals((String) context.get("distinct"));
boolean noConditionFind = "Y".equals(context.get("noConditionFind"));
boolean distinct = "Y".equals(context.get("distinct"));
List<String> fieldList = UtilGenerics.checkList(context.get("fieldList"));
Set<String> fieldSet = null;
if (fieldList != null) {
@@ -164,7 +164,7 @@ public class KeywordSearchUtil {
}
// group by word, add up weight
Long curWeight = (Long) keywords.get(token);
Long curWeight = keywords.get(token);
if (curWeight == null) {
keywords.put(token, Long.valueOf(1));
} else {
@@ -171,7 +171,7 @@ public class PreferenceServices {
String userLoginId = PreferenceWorker.getUserLoginId(context, false);
String userPrefTypeId = (String) context.get("userPrefTypeId");
Object userPrefValue = (String) context.get("userPrefValue");
Object userPrefValue = context.get("userPrefValue");
if (UtilValidate.isEmpty(userLoginId) || UtilValidate.isEmpty(userPrefTypeId) || userPrefValue == null) {
return ServiceUtil.returnError(UtilProperties.getMessage(resource, "setPreference.invalidArgument", locale));
}