String.trim() doesn't work that way; try to avoid unnecessary instances

of boxed primitives.


git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@5491 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
Mark Wood
2010-10-20 17:37:25 +00:00
parent 945e5cd50b
commit 3bbfa0abec

View File

@@ -508,9 +508,7 @@ public class LogAnalyser
// strip the item id string // strip the item id string
Matcher matchItem = itemRX.matcher(handle); Matcher matchItem = itemRX.matcher(handle);
handle = matchItem.replaceAll(""); handle = matchItem.replaceAll("").trim();
handle.trim();
// either add the handle to the aggregator or // either add the handle to the aggregator or
// increment its counter // increment its counter
@@ -950,7 +948,7 @@ public class LogAnalyser
// documentation for more info on config params) // documentation for more info on config params)
if (key.equals("general.summary")) if (key.equals("general.summary"))
{ {
actionAggregator.put(value, new Integer(0)); actionAggregator.put(value, Integer.valueOf(0));
generalSummary.add(value); generalSummary.add(value);
} }
@@ -1017,11 +1015,11 @@ public class LogAnalyser
if (map.containsKey(key)) if (map.containsKey(key))
{ {
// FIXME: this seems like a ridiculous way to add Integers // FIXME: this seems like a ridiculous way to add Integers
newValue = new Integer(((Integer) map.get(key)).intValue() + 1); newValue = Integer.valueOf(((Integer) map.get(key)).intValue() + 1);
} }
else else
{ {
newValue = new Integer(1); newValue = Integer.valueOf(1);
} }
return newValue; return newValue;
} }
@@ -1282,13 +1280,13 @@ public class LogAnalyser
Integer numItems; Integer numItems;
if (oracle) if (oracle)
{ {
numItems = new Integer(row.getIntColumn("num")); numItems = Integer.valueOf(row.getIntColumn("num"));
} }
else else
{ {
// for some reason the number column is of "long" data type! // for some reason the number column is of "long" data type!
Long count = new Long(row.getLongColumn("num")); Long count = Long.valueOf(row.getLongColumn("num"));
numItems = new Integer(count.intValue()); numItems = Integer.valueOf(count.intValue());
} }
return numItems; return numItems;
} }