Author: mrisaliti
Date: Sun Mar 13 09:29:32 2011
New Revision: 1081064
URL:
http://svn.apache.org/viewvc?rev=1081064&view=revLog:
Remove some reduntant cast warning in ProtectViewWorker/RequestHandler (OFBIZ-4102)
Modified:
ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ProtectViewWorker.java
ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java
Modified: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ProtectViewWorker.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ProtectViewWorker.java?rev=1081064&r1=1081063&r2=1081064&view=diff==============================================================================
--- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ProtectViewWorker.java (original)
+++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ProtectViewWorker.java Sun Mar 13 09:29:32 2011
@@ -94,7 +94,7 @@ public class ProtectViewWorker {
durationByViewAccessed.put(viewNameUserLoginId, now + maxHitsDuration);
} else {
Long maxDuration = durationByViewAccessed.get(viewNameUserLoginId);
- Long newMaxHits = (Long) curMaxHits + one;
+ Long newMaxHits = curMaxHits + one;
hitsByViewAccessed.put(viewNameUserLoginId, newMaxHits);
// Are we in a period of time where we need to check if there was too much hits ?
if (now < maxDuration) {
Modified: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java?rev=1081064&r1=1081063&r2=1081064&view=diff==============================================================================
--- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java (original)
+++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java Sun Mar 13 09:29:32 2011
@@ -700,7 +700,7 @@ public class RequestHandler {
Enumeration<String> attributeNameEnum = UtilGenerics.cast(req.getAttributeNames());
Map<String, Object> reqAttrMap = FastMap.newInstance();
while (attributeNameEnum.hasMoreElements()) {
- String name = (String) attributeNameEnum.nextElement();
+ String name = attributeNameEnum.nextElement();
Object obj = req.getAttribute(name);
if (obj instanceof Serializable) {
reqAttrMap.put(name, obj);