mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 01:54:22 +00:00
[DS-707] Use valueOf instead of Number constructor
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@5500 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
@@ -294,7 +294,7 @@ public class MetadataExporter
|
||||
if (mdSchema != null)
|
||||
{
|
||||
name = mdSchema.getName();
|
||||
schemaMap.put(new Integer(mdSchema.getSchemaID()), name);
|
||||
schemaMap.put(Integer.valueOf(mdSchema.getSchemaID()), name);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -226,11 +226,10 @@ public class IPAuthentication implements AuthenticationMethod
|
||||
if (group != null)
|
||||
{
|
||||
// Add ID so we won't have to do lookup again
|
||||
ipMatcherGroupIDs.put(ipm, new Integer(group
|
||||
.getID()));
|
||||
ipMatcherGroupIDs.put(ipm, Integer.valueOf(group.getID()));
|
||||
ipMatcherGroupNames.remove(ipm);
|
||||
|
||||
groupIDs.add(new Integer(group.getID()));
|
||||
groupIDs.add(Integer.valueOf(group.getID()));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -273,11 +272,10 @@ public class IPAuthentication implements AuthenticationMethod
|
||||
if (group != null)
|
||||
{
|
||||
// Add ID so we won't have to do lookup again
|
||||
ipMatcherGroupIDs.put(ipm, new Integer(group
|
||||
.getID()));
|
||||
ipMatcherGroupIDs.put(ipm, Integer.valueOf(group.getID()));
|
||||
ipMatcherGroupNames.remove(ipm);
|
||||
|
||||
groupIDs.remove(new Integer(group.getID()));
|
||||
groupIDs.remove(Integer.valueOf(group.getID()));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -316,11 +316,11 @@ public class ShibAuthentication implements AuthenticationMethod
|
||||
log.warn(LogManager.getHeader(context, dspaceGroup
|
||||
+ " group is not found!! Admin needs to create one!",
|
||||
"requiredGroup=" + dspaceGroup));
|
||||
groups.add(new Integer(0));
|
||||
groups.add(Integer.valueOf(0));
|
||||
}
|
||||
else
|
||||
{
|
||||
groups.add(new Integer(g.getID()));
|
||||
groups.add(Integer.valueOf(g.getID()));
|
||||
}
|
||||
log.info("Mapping group: " + dspaceGroup + " to groupID: "
|
||||
+ (g == null ? 0 : g.getID()));
|
||||
|
@@ -520,7 +520,7 @@ public class X509Authentication implements AuthenticationMethod
|
||||
Group group = Group.findByName(context, groupName);
|
||||
if (group != null)
|
||||
{
|
||||
groupIDs.add(new Integer(group.getID()));
|
||||
groupIDs.add(Integer.valueOf(group.getID()));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -522,7 +522,7 @@ public final class BitstreamInfoDAO extends DAOSupport
|
||||
|
||||
while (rs.next())
|
||||
{
|
||||
ids.add(new Integer(rs.getInt(1)));
|
||||
ids.add(Integer.valueOf(rs.getInt(1)));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -565,7 +565,7 @@ public final class BitstreamInfoDAO extends DAOSupport
|
||||
|
||||
while (rs.next())
|
||||
{
|
||||
ids.add(new Integer(rs.getInt(1)));
|
||||
ids.add(Integer.valueOf(rs.getInt(1)));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -608,7 +608,7 @@ public final class BitstreamInfoDAO extends DAOSupport
|
||||
|
||||
while (rs.next())
|
||||
{
|
||||
ids.add(new Integer(rs.getInt(1)));
|
||||
ids.add(Integer.valueOf(rs.getInt(1)));
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -133,7 +133,7 @@ public class HandleDispatcher implements BitstreamDispatcher
|
||||
switch (dsoType)
|
||||
{
|
||||
case Constants.BITSTREAM:
|
||||
ids.add(new Integer(id));
|
||||
ids.add(Integer.valueOf(id));
|
||||
break;
|
||||
|
||||
case Constants.ITEM:
|
||||
|
@@ -214,7 +214,7 @@ public final class ResultsPruner
|
||||
*/
|
||||
public void addInterested(String result, long duration)
|
||||
{
|
||||
interests.put(result, new Long(duration));
|
||||
interests.put(result, Long.valueOf(duration));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -261,7 +261,7 @@ public final class ResultsPruner
|
||||
String code = (String) iter.next();
|
||||
if (!interests.containsKey(code))
|
||||
{
|
||||
interests.put(code, new Long(defaultDuration));
|
||||
interests.put(code, Long.valueOf(defaultDuration));
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -226,7 +226,7 @@ public class ItemComparator implements Comparator
|
||||
|
||||
if (value != null)
|
||||
{
|
||||
values.put(value, new Integer(i));
|
||||
values.put(value, Integer.valueOf(i));
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -626,7 +626,7 @@ public class MetadataField
|
||||
}
|
||||
|
||||
// 'sanity check' first.
|
||||
Integer iid = new Integer(id);
|
||||
Integer iid = Integer.valueOf(id);
|
||||
if (!id2field.containsKey(iid))
|
||||
return null;
|
||||
|
||||
@@ -662,7 +662,7 @@ public class MetadataField
|
||||
{
|
||||
TableRow row = tri.next();
|
||||
int fieldID = row.getIntColumn("metadata_field_id");
|
||||
new_id2field.put(new Integer(fieldID), new MetadataField(row));
|
||||
new_id2field.put(Integer.valueOf(fieldID), new MetadataField(row));
|
||||
}
|
||||
}
|
||||
finally
|
||||
|
@@ -541,7 +541,7 @@ public class MetadataSchema
|
||||
initCache(context);
|
||||
}
|
||||
|
||||
Integer iid = new Integer(id);
|
||||
Integer iid = Integer.valueOf(id);
|
||||
|
||||
// sanity check
|
||||
if (!id2schema.containsKey(iid))
|
||||
@@ -609,7 +609,7 @@ public class MetadataSchema
|
||||
TableRow row = tri.next();
|
||||
|
||||
MetadataSchema s = new MetadataSchema(row);
|
||||
new_id2schema.put(new Integer(s.schemaID), s);
|
||||
new_id2schema.put(Integer.valueOf(s.schemaID), s);
|
||||
new_name2schema.put(s.name, s);
|
||||
}
|
||||
}
|
||||
|
@@ -139,7 +139,7 @@ public class MetadataAuthorityManager
|
||||
// get minConfidence level for this field if any
|
||||
int mci = readConfidence("authority.minconfidence."+field);
|
||||
if (mci >= Choices.CF_UNSET)
|
||||
minConfidence.put(fkey, new Integer(mci));
|
||||
minConfidence.put(fkey, Integer.valueOf(mci));
|
||||
log.debug("Authority Control: For schema="+schema+", elt="+element+", qual="+qualifier+", controlled="+ctl+", required="+req);
|
||||
}
|
||||
}
|
||||
|
@@ -354,7 +354,7 @@ public class EPerson extends DSpaceObject
|
||||
int_param = Integer.valueOf(query);
|
||||
}
|
||||
catch (NumberFormatException e) {
|
||||
int_param = new Integer(-1);
|
||||
int_param = Integer.valueOf(-1);
|
||||
}
|
||||
|
||||
// Create the parameter array, including limit and offset if part of the query
|
||||
@@ -424,7 +424,7 @@ public class EPerson extends DSpaceObject
|
||||
int_param = Integer.valueOf(query);
|
||||
}
|
||||
catch (NumberFormatException e) {
|
||||
int_param = new Integer(-1);
|
||||
int_param = Integer.valueOf(-1);
|
||||
}
|
||||
|
||||
// Get all the epeople that match the query
|
||||
@@ -436,11 +436,11 @@ public class EPerson extends DSpaceObject
|
||||
// use getIntColumn for Oracle count data
|
||||
if ("oracle".equals(ConfigurationManager.getProperty("db.name")))
|
||||
{
|
||||
count = new Long(row.getIntColumn("epcount"));
|
||||
count = Long.valueOf(row.getIntColumn("epcount"));
|
||||
}
|
||||
else //getLongColumn works for postgres
|
||||
{
|
||||
count = new Long(row.getLongColumn("epcount"));
|
||||
count = Long.valueOf(row.getLongColumn("epcount"));
|
||||
}
|
||||
|
||||
return count.intValue();
|
||||
|
@@ -462,7 +462,7 @@ public class Group extends DSpaceObject
|
||||
|
||||
int childID = row.getIntColumn("eperson_group_id");
|
||||
|
||||
groupIDs.add(new Integer(childID));
|
||||
groupIDs.add(Integer.valueOf(childID));
|
||||
}
|
||||
}
|
||||
finally
|
||||
@@ -482,12 +482,12 @@ public class Group extends DSpaceObject
|
||||
Group[] specialGroups = c.getSpecialGroups();
|
||||
for(Group special : specialGroups)
|
||||
{
|
||||
groupIDs.add(new Integer(special.getID()));
|
||||
groupIDs.add(Integer.valueOf(special.getID()));
|
||||
}
|
||||
}
|
||||
|
||||
// all the users are members of the anonymous group
|
||||
groupIDs.add(new Integer(0));
|
||||
groupIDs.add(Integer.valueOf(0));
|
||||
|
||||
// now we have all owning groups, also grab all parents of owning groups
|
||||
// yes, I know this could have been done as one big query and a union,
|
||||
@@ -505,7 +505,7 @@ public class Group extends DSpaceObject
|
||||
{
|
||||
int groupID = (i.next()).intValue();
|
||||
|
||||
parameters[idx++] = new Integer(groupID);
|
||||
parameters[idx++] = Integer.valueOf(groupID);
|
||||
|
||||
groupQuery.append("child_id= ? ");
|
||||
if (i.hasNext())
|
||||
@@ -527,7 +527,7 @@ public class Group extends DSpaceObject
|
||||
|
||||
int parentID = row.getIntColumn("parent_id");
|
||||
|
||||
groupIDs.add(new Integer(parentID));
|
||||
groupIDs.add(Integer.valueOf(parentID));
|
||||
}
|
||||
}
|
||||
finally
|
||||
@@ -603,7 +603,7 @@ public class Group extends DSpaceObject
|
||||
|
||||
int childID = row.getIntColumn("child_id");
|
||||
|
||||
groupIDs.add(new Integer(childID));
|
||||
groupIDs.add(Integer.valueOf(childID));
|
||||
}
|
||||
}
|
||||
finally
|
||||
@@ -622,7 +622,7 @@ public class Group extends DSpaceObject
|
||||
Iterator<Integer> i = groupIDs.iterator();
|
||||
|
||||
// don't forget to add the current group to this query!
|
||||
parameters[idx++] = new Integer(g.getID());
|
||||
parameters[idx++] = Integer.valueOf(g.getID());
|
||||
|
||||
StringBuilder epersonQuery = new StringBuilder();
|
||||
epersonQuery.append("SELECT * FROM epersongroup2eperson WHERE ");
|
||||
@@ -634,7 +634,7 @@ public class Group extends DSpaceObject
|
||||
while (i.hasNext())
|
||||
{
|
||||
int groupID = (i.next()).intValue();
|
||||
parameters[idx++] = new Integer(groupID);
|
||||
parameters[idx++] = Integer.valueOf(groupID);
|
||||
|
||||
epersonQuery.append("eperson_group_id= ? ");
|
||||
if (i.hasNext())
|
||||
@@ -656,7 +656,7 @@ public class Group extends DSpaceObject
|
||||
|
||||
int epersonID = row.getIntColumn("eperson_id");
|
||||
|
||||
epeopleIDs.add(new Integer(epersonID));
|
||||
epeopleIDs.add(Integer.valueOf(epersonID));
|
||||
}
|
||||
}
|
||||
finally
|
||||
@@ -674,7 +674,7 @@ public class Group extends DSpaceObject
|
||||
{
|
||||
Set<Integer> groupIDs = Group.allMemberGroupIDs(c, e);
|
||||
|
||||
return groupIDs.contains(new Integer(groupID));
|
||||
return groupIDs.contains(Integer.valueOf(groupID));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -891,7 +891,7 @@ public class Group extends DSpaceObject
|
||||
int_param = Integer.valueOf(query);
|
||||
}
|
||||
catch (NumberFormatException e) {
|
||||
int_param = new Integer(-1);
|
||||
int_param = Integer.valueOf(-1);
|
||||
}
|
||||
|
||||
// Create the parameter array, including limit and offset if part of the query
|
||||
@@ -960,7 +960,7 @@ public class Group extends DSpaceObject
|
||||
int_param = Integer.valueOf(query);
|
||||
}
|
||||
catch (NumberFormatException e) {
|
||||
int_param = new Integer(-1);
|
||||
int_param = Integer.valueOf(-1);
|
||||
}
|
||||
|
||||
// Get all the epeople that match the query
|
||||
@@ -970,11 +970,11 @@ public class Group extends DSpaceObject
|
||||
Long count;
|
||||
if ("oracle".equals(ConfigurationManager.getProperty("db.name")))
|
||||
{
|
||||
count = new Long(row.getIntColumn("gcount"));
|
||||
count = Long.valueOf(row.getIntColumn("gcount"));
|
||||
}
|
||||
else //getLongColumn works for postgres
|
||||
{
|
||||
count = new Long(row.getLongColumn("gcount"));
|
||||
count = Long.valueOf(row.getLongColumn("gcount"));
|
||||
}
|
||||
|
||||
return count.intValue();
|
||||
@@ -1226,8 +1226,8 @@ public class Group extends DSpaceObject
|
||||
{
|
||||
TableRow row = (TableRow) tri.next();
|
||||
|
||||
Integer parentID = new Integer(row.getIntColumn("parent_id"));
|
||||
Integer childID = new Integer(row.getIntColumn("child_id"));
|
||||
Integer parentID = Integer.valueOf(row.getIntColumn("parent_id"));
|
||||
Integer childID = Integer.valueOf(row.getIntColumn("child_id"));
|
||||
|
||||
// if parent doesn't have an entry, create one
|
||||
if (!parents.containsKey(parentID))
|
||||
|
@@ -512,7 +512,7 @@ public class DatabaseManager
|
||||
String ctable = canonicalize(table);
|
||||
|
||||
return findByUnique(context, ctable, getPrimaryKeyColumn(ctable),
|
||||
new Integer(id));
|
||||
Integer.valueOf(id));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -569,7 +569,7 @@ public class DatabaseManager
|
||||
String ctable = canonicalize(table);
|
||||
|
||||
return deleteByValue(context, ctable, getPrimaryKeyColumn(ctable),
|
||||
new Integer(id));
|
||||
Integer.valueOf(id));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -374,7 +374,7 @@ public abstract class AbstractProcessingStep
|
||||
int pageNumber)
|
||||
{
|
||||
// set info to request
|
||||
request.setAttribute("submission.page", new Integer(pageNumber));
|
||||
request.setAttribute("submission.page", Integer.valueOf(pageNumber));
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -212,7 +212,7 @@ public class WorkflowManager
|
||||
{
|
||||
// make a hash table entry with item ID for no notify
|
||||
// notify code checks no notify hash for item id
|
||||
noEMail.put(new Integer(wsi.getItem().getID()), Boolean.TRUE);
|
||||
noEMail.put(Integer.valueOf(wsi.getItem().getID()), Boolean.TRUE);
|
||||
|
||||
return start(c, wsi);
|
||||
}
|
||||
@@ -841,7 +841,7 @@ public class WorkflowManager
|
||||
// check to see if notification is turned off
|
||||
// and only do it once - delete key after notification has
|
||||
// been suppressed for the first time
|
||||
Integer myID = new Integer(wi.getItem().getID());
|
||||
Integer myID = Integer.valueOf(wi.getItem().getID());
|
||||
|
||||
if (noEMail.containsKey(myID))
|
||||
{
|
||||
|
Reference in New Issue
Block a user