This is an automated email from the ASF dual-hosted git repository.
elharo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/xerces-j.git
The following commit(s) were added to refs/heads/main by this push:
new 40294a162 [NOJIRA]: Use Integer.valueOf instead of new Integer (#35)
40294a162 is described below
commit 40294a1623f9d3459ea1b27f4340c54a428a6f26
Author: Samael <[email protected]>
AuthorDate: Mon Oct 20 23:37:57 2025 +0100
[NOJIRA]: Use Integer.valueOf instead of new Integer (#35)
---
docs/properties.xml | 2 +-
samples/ui/TreeView.java | 2 +-
src/org/apache/xerces/dom/CoreDocumentImpl.java | 4 +-
src/org/apache/xerces/impl/XMLEntityManager.java | 4 +-
.../xerces/impl/dtd/models/DFAContentModel.java | 2 +-
src/org/apache/xerces/impl/xpath/XPath.java | 104 ++++++++++-----------
.../xerces/impl/xs/models/CMNodeFactory.java | 2 +-
src/org/apache/xerces/impl/xs/models/XSDFACM.java | 2 +-
.../xs/traversers/XSDComplexTypeTraverser.java | 4 +-
.../xerces/impl/xs/traversers/XSDHandler.java | 4 +-
.../jaxp/datatype/XMLGregorianCalendarImpl.java | 14 +--
.../parsers/SecureProcessingConfiguration.java | 6 +-
.../apache/xerces/xinclude/XIncludeHandler.java | 4 +-
.../xerces/xpointer/ElementSchemePointer.java | 10 +-
.../apache/xerces/xpointer/XPointerHandler.java | 18 ++--
src/org/apache/xml/serialize/HTMLdtd.java | 8 +-
tests/dom/DTest.java | 28 +++---
17 files changed, 109 insertions(+), 109 deletions(-)
diff --git a/docs/properties.xml b/docs/properties.xml
index 06999ad92..e1537da1a 100644
--- a/docs/properties.xml
+++ b/docs/properties.xml
@@ -61,7 +61,7 @@ SAXParser parser = /* created from SAXParserFactory */;
XMLReader reader = parser.getXMLReader();
String id = "http://apache.org/xml/properties/input-buffer-size";
-Object value = new Integer(2048);
+Object value = Integer.valueOf(2048);
try {
reader.setProperty(id, value);
}
diff --git a/samples/ui/TreeView.java b/samples/ui/TreeView.java
index c790dd136..db48d173b 100644
--- a/samples/ui/TreeView.java
+++ b/samples/ui/TreeView.java
@@ -392,7 +392,7 @@ public class TreeView extends JFrame implements
ActionListener, TextListener {
try{
readline: while ((line = dis.readLine()) != null) {
sb.append(line+nl);
- textLine.addElement(new Integer(len));
+ textLine.addElement(Integer.valueOf(len));
len += line.length()+nllen;
}
ta.append(sb.toString());
diff --git a/src/org/apache/xerces/dom/CoreDocumentImpl.java
b/src/org/apache/xerces/dom/CoreDocumentImpl.java
index d1ce6117a..703ec1c04 100644
--- a/src/org/apache/xerces/dom/CoreDocumentImpl.java
+++ b/src/org/apache/xerces/dom/CoreDocumentImpl.java
@@ -1477,13 +1477,13 @@ extends ParentNode implements Document {
if (nodeTable == null) {
nodeTable = new WeakHashMap();
num = --nodeCounter;
- nodeTable.put(node, new Integer(num));
+ nodeTable.put(node, Integer.valueOf(num));
}
else {
Integer n = (Integer)nodeTable.get(node);
if (n== null) {
num = --nodeCounter;
- nodeTable.put(node, new Integer(num));
+ nodeTable.put(node, Integer.valueOf(num));
}
else
num = n.intValue();
diff --git a/src/org/apache/xerces/impl/XMLEntityManager.java
b/src/org/apache/xerces/impl/XMLEntityManager.java
index 332b43250..7defb4932 100644
--- a/src/org/apache/xerces/impl/XMLEntityManager.java
+++ b/src/org/apache/xerces/impl/XMLEntityManager.java
@@ -200,7 +200,7 @@ public class XMLEntityManager
null,
null,
null,
- new Integer(DEFAULT_BUFFER_SIZE),
+ Integer.valueOf(DEFAULT_BUFFER_SIZE),
null,
};
@@ -953,7 +953,7 @@ public class XMLEntityManager
if (fEntityExpansionCount++ > fEntityExpansionLimit) {
fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
"EntityExpansionLimitExceeded",
- new Object[]{new Integer(fEntityExpansionLimit) },
+ new Object[]{Integer.valueOf(fEntityExpansionLimit) },
XMLErrorReporter.SEVERITY_FATAL_ERROR );
// is there anything better to do than reset the counter?
// at least one can envision debugging applications where this
might
diff --git a/src/org/apache/xerces/impl/dtd/models/DFAContentModel.java
b/src/org/apache/xerces/impl/dtd/models/DFAContentModel.java
index e24af202c..6f5b74adc 100644
--- a/src/org/apache/xerces/impl/dtd/models/DFAContentModel.java
+++ b/src/org/apache/xerces/impl/dtd/models/DFAContentModel.java
@@ -680,7 +680,7 @@ public class DFAContentModel
fTransTable[curState] = makeDefStateList();
/* Optimization(Jan, 2001) */
- stateTable.put(newSet, new Integer(curState));
+ stateTable.put(newSet, Integer.valueOf(curState));
/* Optimization(Jan, 2001) */
// We now have a new state to do so bump the count
diff --git a/src/org/apache/xerces/impl/xpath/XPath.java
b/src/org/apache/xerces/impl/xpath/XPath.java
index e1f583505..d7a35bd15 100644
--- a/src/org/apache/xerces/impl/xpath/XPath.java
+++ b/src/org/apache/xerces/impl/xpath/XPath.java
@@ -880,57 +880,57 @@ public class XPath {
"self",
};
for (int i = 0; i < symbols.length; i++) {
- fSymbolMapping.put(fSymbolTable.addSymbol(symbols[i]), new
Integer(i));
+ fSymbolMapping.put(fSymbolTable.addSymbol(symbols[i]),
Integer.valueOf(i));
}
- fTokenNames.put(new Integer(EXPRTOKEN_OPEN_PAREN),
"EXPRTOKEN_OPEN_PAREN");
- fTokenNames.put(new Integer(EXPRTOKEN_CLOSE_PAREN),
"EXPRTOKEN_CLOSE_PAREN");
- fTokenNames.put(new Integer(EXPRTOKEN_OPEN_BRACKET),
"EXPRTOKEN_OPEN_BRACKET");
- fTokenNames.put(new Integer(EXPRTOKEN_CLOSE_BRACKET),
"EXPRTOKEN_CLOSE_BRACKET");
- fTokenNames.put(new Integer(EXPRTOKEN_PERIOD), "EXPRTOKEN_PERIOD");
- fTokenNames.put(new Integer(EXPRTOKEN_DOUBLE_PERIOD),
"EXPRTOKEN_DOUBLE_PERIOD");
- fTokenNames.put(new Integer(EXPRTOKEN_ATSIGN), "EXPRTOKEN_ATSIGN");
- fTokenNames.put(new Integer(EXPRTOKEN_COMMA), "EXPRTOKEN_COMMA");
- fTokenNames.put(new Integer(EXPRTOKEN_DOUBLE_COLON),
"EXPRTOKEN_DOUBLE_COLON");
- fTokenNames.put(new Integer(EXPRTOKEN_NAMETEST_ANY),
"EXPRTOKEN_NAMETEST_ANY");
- fTokenNames.put(new Integer(EXPRTOKEN_NAMETEST_NAMESPACE),
"EXPRTOKEN_NAMETEST_NAMESPACE");
- fTokenNames.put(new Integer(EXPRTOKEN_NAMETEST_QNAME),
"EXPRTOKEN_NAMETEST_QNAME");
- fTokenNames.put(new Integer(EXPRTOKEN_NODETYPE_COMMENT),
"EXPRTOKEN_NODETYPE_COMMENT");
- fTokenNames.put(new Integer(EXPRTOKEN_NODETYPE_TEXT),
"EXPRTOKEN_NODETYPE_TEXT");
- fTokenNames.put(new Integer(EXPRTOKEN_NODETYPE_PI),
"EXPRTOKEN_NODETYPE_PI");
- fTokenNames.put(new Integer(EXPRTOKEN_NODETYPE_NODE),
"EXPRTOKEN_NODETYPE_NODE");
- fTokenNames.put(new Integer(EXPRTOKEN_OPERATOR_AND),
"EXPRTOKEN_OPERATOR_AND");
- fTokenNames.put(new Integer(EXPRTOKEN_OPERATOR_OR),
"EXPRTOKEN_OPERATOR_OR");
- fTokenNames.put(new Integer(EXPRTOKEN_OPERATOR_MOD),
"EXPRTOKEN_OPERATOR_MOD");
- fTokenNames.put(new Integer(EXPRTOKEN_OPERATOR_DIV),
"EXPRTOKEN_OPERATOR_DIV");
- fTokenNames.put(new Integer(EXPRTOKEN_OPERATOR_MULT),
"EXPRTOKEN_OPERATOR_MULT");
- fTokenNames.put(new Integer(EXPRTOKEN_OPERATOR_SLASH),
"EXPRTOKEN_OPERATOR_SLASH");
- fTokenNames.put(new Integer(EXPRTOKEN_OPERATOR_DOUBLE_SLASH),
"EXPRTOKEN_OPERATOR_DOUBLE_SLASH");
- fTokenNames.put(new Integer(EXPRTOKEN_OPERATOR_UNION),
"EXPRTOKEN_OPERATOR_UNION");
- fTokenNames.put(new Integer(EXPRTOKEN_OPERATOR_PLUS),
"EXPRTOKEN_OPERATOR_PLUS");
- fTokenNames.put(new Integer(EXPRTOKEN_OPERATOR_MINUS),
"EXPRTOKEN_OPERATOR_MINUS");
- fTokenNames.put(new Integer(EXPRTOKEN_OPERATOR_EQUAL),
"EXPRTOKEN_OPERATOR_EQUAL");
- fTokenNames.put(new Integer(EXPRTOKEN_OPERATOR_NOT_EQUAL),
"EXPRTOKEN_OPERATOR_NOT_EQUAL");
- fTokenNames.put(new Integer(EXPRTOKEN_OPERATOR_LESS),
"EXPRTOKEN_OPERATOR_LESS");
- fTokenNames.put(new Integer(EXPRTOKEN_OPERATOR_LESS_EQUAL),
"EXPRTOKEN_OPERATOR_LESS_EQUAL");
- fTokenNames.put(new Integer(EXPRTOKEN_OPERATOR_GREATER),
"EXPRTOKEN_OPERATOR_GREATER");
- fTokenNames.put(new Integer(EXPRTOKEN_OPERATOR_GREATER_EQUAL),
"EXPRTOKEN_OPERATOR_GREATER_EQUAL");
- fTokenNames.put(new Integer(EXPRTOKEN_FUNCTION_NAME),
"EXPRTOKEN_FUNCTION_NAME");
- fTokenNames.put(new Integer(EXPRTOKEN_AXISNAME_ANCESTOR),
"EXPRTOKEN_AXISNAME_ANCESTOR");
- fTokenNames.put(new Integer(EXPRTOKEN_AXISNAME_ANCESTOR_OR_SELF),
"EXPRTOKEN_AXISNAME_ANCESTOR_OR_SELF");
- fTokenNames.put(new Integer(EXPRTOKEN_AXISNAME_ATTRIBUTE),
"EXPRTOKEN_AXISNAME_ATTRIBUTE");
- fTokenNames.put(new Integer(EXPRTOKEN_AXISNAME_CHILD),
"EXPRTOKEN_AXISNAME_CHILD");
- fTokenNames.put(new Integer(EXPRTOKEN_AXISNAME_DESCENDANT),
"EXPRTOKEN_AXISNAME_DESCENDANT");
- fTokenNames.put(new
Integer(EXPRTOKEN_AXISNAME_DESCENDANT_OR_SELF),
"EXPRTOKEN_AXISNAME_DESCENDANT_OR_SELF");
- fTokenNames.put(new Integer(EXPRTOKEN_AXISNAME_FOLLOWING),
"EXPRTOKEN_AXISNAME_FOLLOWING");
- fTokenNames.put(new Integer(EXPRTOKEN_AXISNAME_FOLLOWING_SIBLING),
"EXPRTOKEN_AXISNAME_FOLLOWING_SIBLING");
- fTokenNames.put(new Integer(EXPRTOKEN_AXISNAME_NAMESPACE),
"EXPRTOKEN_AXISNAME_NAMESPACE");
- fTokenNames.put(new Integer(EXPRTOKEN_AXISNAME_PARENT),
"EXPRTOKEN_AXISNAME_PARENT");
- fTokenNames.put(new Integer(EXPRTOKEN_AXISNAME_PRECEDING),
"EXPRTOKEN_AXISNAME_PRECEDING");
- fTokenNames.put(new Integer(EXPRTOKEN_AXISNAME_PRECEDING_SIBLING),
"EXPRTOKEN_AXISNAME_PRECEDING_SIBLING");
- fTokenNames.put(new Integer(EXPRTOKEN_AXISNAME_SELF),
"EXPRTOKEN_AXISNAME_SELF");
- fTokenNames.put(new Integer(EXPRTOKEN_LITERAL),
"EXPRTOKEN_LITERAL");
- fTokenNames.put(new Integer(EXPRTOKEN_NUMBER), "EXPRTOKEN_NUMBER");
- fTokenNames.put(new Integer(EXPRTOKEN_VARIABLE_REFERENCE),
"EXPRTOKEN_VARIABLE_REFERENCE");
+ fTokenNames.put(Integer.valueOf(EXPRTOKEN_OPEN_PAREN),
"EXPRTOKEN_OPEN_PAREN");
+ fTokenNames.put(Integer.valueOf(EXPRTOKEN_CLOSE_PAREN),
"EXPRTOKEN_CLOSE_PAREN");
+ fTokenNames.put(Integer.valueOf(EXPRTOKEN_OPEN_BRACKET),
"EXPRTOKEN_OPEN_BRACKET");
+ fTokenNames.put(Integer.valueOf(EXPRTOKEN_CLOSE_BRACKET),
"EXPRTOKEN_CLOSE_BRACKET");
+ fTokenNames.put(Integer.valueOf(EXPRTOKEN_PERIOD),
"EXPRTOKEN_PERIOD");
+ fTokenNames.put(Integer.valueOf(EXPRTOKEN_DOUBLE_PERIOD),
"EXPRTOKEN_DOUBLE_PERIOD");
+ fTokenNames.put(Integer.valueOf(EXPRTOKEN_ATSIGN),
"EXPRTOKEN_ATSIGN");
+ fTokenNames.put(Integer.valueOf(EXPRTOKEN_COMMA),
"EXPRTOKEN_COMMA");
+ fTokenNames.put(Integer.valueOf(EXPRTOKEN_DOUBLE_COLON),
"EXPRTOKEN_DOUBLE_COLON");
+ fTokenNames.put(Integer.valueOf(EXPRTOKEN_NAMETEST_ANY),
"EXPRTOKEN_NAMETEST_ANY");
+ fTokenNames.put(Integer.valueOf(EXPRTOKEN_NAMETEST_NAMESPACE),
"EXPRTOKEN_NAMETEST_NAMESPACE");
+ fTokenNames.put(Integer.valueOf(EXPRTOKEN_NAMETEST_QNAME),
"EXPRTOKEN_NAMETEST_QNAME");
+ fTokenNames.put(Integer.valueOf(EXPRTOKEN_NODETYPE_COMMENT),
"EXPRTOKEN_NODETYPE_COMMENT");
+ fTokenNames.put(Integer.valueOf(EXPRTOKEN_NODETYPE_TEXT),
"EXPRTOKEN_NODETYPE_TEXT");
+ fTokenNames.put(Integer.valueOf(EXPRTOKEN_NODETYPE_PI),
"EXPRTOKEN_NODETYPE_PI");
+ fTokenNames.put(Integer.valueOf(EXPRTOKEN_NODETYPE_NODE),
"EXPRTOKEN_NODETYPE_NODE");
+ fTokenNames.put(Integer.valueOf(EXPRTOKEN_OPERATOR_AND),
"EXPRTOKEN_OPERATOR_AND");
+ fTokenNames.put(Integer.valueOf(EXPRTOKEN_OPERATOR_OR),
"EXPRTOKEN_OPERATOR_OR");
+ fTokenNames.put(Integer.valueOf(EXPRTOKEN_OPERATOR_MOD),
"EXPRTOKEN_OPERATOR_MOD");
+ fTokenNames.put(Integer.valueOf(EXPRTOKEN_OPERATOR_DIV),
"EXPRTOKEN_OPERATOR_DIV");
+ fTokenNames.put(Integer.valueOf(EXPRTOKEN_OPERATOR_MULT),
"EXPRTOKEN_OPERATOR_MULT");
+ fTokenNames.put(Integer.valueOf(EXPRTOKEN_OPERATOR_SLASH),
"EXPRTOKEN_OPERATOR_SLASH");
+ fTokenNames.put(Integer.valueOf(EXPRTOKEN_OPERATOR_DOUBLE_SLASH),
"EXPRTOKEN_OPERATOR_DOUBLE_SLASH");
+ fTokenNames.put(Integer.valueOf(EXPRTOKEN_OPERATOR_UNION),
"EXPRTOKEN_OPERATOR_UNION");
+ fTokenNames.put(Integer.valueOf(EXPRTOKEN_OPERATOR_PLUS),
"EXPRTOKEN_OPERATOR_PLUS");
+ fTokenNames.put(Integer.valueOf(EXPRTOKEN_OPERATOR_MINUS),
"EXPRTOKEN_OPERATOR_MINUS");
+ fTokenNames.put(Integer.valueOf(EXPRTOKEN_OPERATOR_EQUAL),
"EXPRTOKEN_OPERATOR_EQUAL");
+ fTokenNames.put(Integer.valueOf(EXPRTOKEN_OPERATOR_NOT_EQUAL),
"EXPRTOKEN_OPERATOR_NOT_EQUAL");
+ fTokenNames.put(Integer.valueOf(EXPRTOKEN_OPERATOR_LESS),
"EXPRTOKEN_OPERATOR_LESS");
+ fTokenNames.put(Integer.valueOf(EXPRTOKEN_OPERATOR_LESS_EQUAL),
"EXPRTOKEN_OPERATOR_LESS_EQUAL");
+ fTokenNames.put(Integer.valueOf(EXPRTOKEN_OPERATOR_GREATER),
"EXPRTOKEN_OPERATOR_GREATER");
+ fTokenNames.put(Integer.valueOf(EXPRTOKEN_OPERATOR_GREATER_EQUAL),
"EXPRTOKEN_OPERATOR_GREATER_EQUAL");
+ fTokenNames.put(Integer.valueOf(EXPRTOKEN_FUNCTION_NAME),
"EXPRTOKEN_FUNCTION_NAME");
+ fTokenNames.put(Integer.valueOf(EXPRTOKEN_AXISNAME_ANCESTOR),
"EXPRTOKEN_AXISNAME_ANCESTOR");
+
fTokenNames.put(Integer.valueOf(EXPRTOKEN_AXISNAME_ANCESTOR_OR_SELF),
"EXPRTOKEN_AXISNAME_ANCESTOR_OR_SELF");
+ fTokenNames.put(Integer.valueOf(EXPRTOKEN_AXISNAME_ATTRIBUTE),
"EXPRTOKEN_AXISNAME_ATTRIBUTE");
+ fTokenNames.put(Integer.valueOf(EXPRTOKEN_AXISNAME_CHILD),
"EXPRTOKEN_AXISNAME_CHILD");
+ fTokenNames.put(Integer.valueOf(EXPRTOKEN_AXISNAME_DESCENDANT),
"EXPRTOKEN_AXISNAME_DESCENDANT");
+
fTokenNames.put(Integer.valueOf(EXPRTOKEN_AXISNAME_DESCENDANT_OR_SELF),
"EXPRTOKEN_AXISNAME_DESCENDANT_OR_SELF");
+ fTokenNames.put(Integer.valueOf(EXPRTOKEN_AXISNAME_FOLLOWING),
"EXPRTOKEN_AXISNAME_FOLLOWING");
+
fTokenNames.put(Integer.valueOf(EXPRTOKEN_AXISNAME_FOLLOWING_SIBLING),
"EXPRTOKEN_AXISNAME_FOLLOWING_SIBLING");
+ fTokenNames.put(Integer.valueOf(EXPRTOKEN_AXISNAME_NAMESPACE),
"EXPRTOKEN_AXISNAME_NAMESPACE");
+ fTokenNames.put(Integer.valueOf(EXPRTOKEN_AXISNAME_PARENT),
"EXPRTOKEN_AXISNAME_PARENT");
+ fTokenNames.put(Integer.valueOf(EXPRTOKEN_AXISNAME_PRECEDING),
"EXPRTOKEN_AXISNAME_PRECEDING");
+
fTokenNames.put(Integer.valueOf(EXPRTOKEN_AXISNAME_PRECEDING_SIBLING),
"EXPRTOKEN_AXISNAME_PRECEDING_SIBLING");
+ fTokenNames.put(Integer.valueOf(EXPRTOKEN_AXISNAME_SELF),
"EXPRTOKEN_AXISNAME_SELF");
+ fTokenNames.put(Integer.valueOf(EXPRTOKEN_LITERAL),
"EXPRTOKEN_LITERAL");
+ fTokenNames.put(Integer.valueOf(EXPRTOKEN_NUMBER),
"EXPRTOKEN_NUMBER");
+ fTokenNames.put(Integer.valueOf(EXPRTOKEN_VARIABLE_REFERENCE),
"EXPRTOKEN_VARIABLE_REFERENCE");
}
//
@@ -944,13 +944,13 @@ public class XPath {
// }
//
public String getTokenString(int token) {
- return (String)fTokenNames.get(new Integer(token));
+ return (String)fTokenNames.get(Integer.valueOf(token));
}
public void addToken(String tokenStr) {
Integer tokenInt = (Integer)fTokenNames.get(tokenStr);
if (tokenInt == null) {
- tokenInt = new Integer(fTokenNames.size());
+ tokenInt = Integer.valueOf(fTokenNames.size());
fTokenNames.put(tokenInt, tokenStr);
}
addToken(tokenInt.intValue());
diff --git a/src/org/apache/xerces/impl/xs/models/CMNodeFactory.java
b/src/org/apache/xerces/impl/xs/models/CMNodeFactory.java
index 3386c1379..786e96c3d 100644
--- a/src/org/apache/xerces/impl/xs/models/CMNodeFactory.java
+++ b/src/org/apache/xerces/impl/xs/models/CMNodeFactory.java
@@ -119,7 +119,7 @@ public class CMNodeFactory {
System.out.println("nodeCount = " + nodeCount ) ;
System.out.println("nodeLimit = " + maxNodeLimit ) ;
}
- fErrorReporter.reportError(XSMessageFormatter.SCHEMA_DOMAIN,
"maxOccurLimit", new Object[]{ new Integer(maxNodeLimit) },
XMLErrorReporter.SEVERITY_FATAL_ERROR);
+ fErrorReporter.reportError(XSMessageFormatter.SCHEMA_DOMAIN,
"maxOccurLimit", new Object[]{ Integer.valueOf(maxNodeLimit) },
XMLErrorReporter.SEVERITY_FATAL_ERROR);
// similarly to entity manager behaviour, take into accont
// behaviour if continue-after-fatal-error is set.
nodeCount = 0;
diff --git a/src/org/apache/xerces/impl/xs/models/XSDFACM.java
b/src/org/apache/xerces/impl/xs/models/XSDFACM.java
index b2973b3a6..6aec9d0ee 100644
--- a/src/org/apache/xerces/impl/xs/models/XSDFACM.java
+++ b/src/org/apache/xerces/impl/xs/models/XSDFACM.java
@@ -743,7 +743,7 @@ public class XSDFACM
fTransTable[curState] = makeDefStateList();
/* Optimization(Jan, 2001) */
- stateTable.put(newSet, new Integer(curState));
+ stateTable.put(newSet, Integer.valueOf(curState));
/* Optimization(Jan, 2001) */
// We now have a new state to do so bump the count
diff --git
a/src/org/apache/xerces/impl/xs/traversers/XSDComplexTypeTraverser.java
b/src/org/apache/xerces/impl/xs/traversers/XSDComplexTypeTraverser.java
index 241c9c59a..4737d9399 100644
--- a/src/org/apache/xerces/impl/xs/traversers/XSDComplexTypeTraverser.java
+++ b/src/org/apache/xerces/impl/xs/traversers/XSDComplexTypeTraverser.java
@@ -1206,8 +1206,8 @@ class XSDComplexTypeTraverser extends
XSDAbstractParticleTraverser {
fGlobalStore[fGlobalStorePos++] = fName ;
fGlobalStore[fGlobalStorePos++] = fTargetNamespace;
// let's save ourselves a couple of objects...
- fGlobalStore[fGlobalStorePos++] = new Integer((fDerivedBy << 16) +
fFinal);
- fGlobalStore[fGlobalStorePos++] = new Integer((fBlock << 16) +
fContentType);
+ fGlobalStore[fGlobalStorePos++] = Integer.valueOf((fDerivedBy << 16) +
fFinal);
+ fGlobalStore[fGlobalStorePos++] = Integer.valueOf((fBlock << 16) +
fContentType);
fGlobalStore[fGlobalStorePos++] = fBaseType;
fGlobalStore[fGlobalStorePos++] = fAttrGrp;
fGlobalStore[fGlobalStorePos++] = fParticle;
diff --git a/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java
b/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java
index 545165fea..07f5c3983 100644
--- a/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java
+++ b/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java
@@ -3920,7 +3920,7 @@ public class XSDHandler {
","+oldName:currSchema.fTargetNamespace+","+oldName;
int attGroupRefsCount = changeRedefineGroup(processedBaseName,
componentType, newName, child, currSchema);
if (attGroupRefsCount > 1) {
- reportSchemaError("src-redefine.7.1", new Object []{new
Integer(attGroupRefsCount)}, child);
+ reportSchemaError("src-redefine.7.1", new Object
[]{Integer.valueOf(attGroupRefsCount)}, child);
}
else if (attGroupRefsCount == 1) {
// return true;
@@ -3936,7 +3936,7 @@ public class XSDHandler {
","+oldName:currSchema.fTargetNamespace+","+oldName;
int groupRefsCount = changeRedefineGroup(processedBaseName,
componentType, newName, child, currSchema);
if (groupRefsCount > 1) {
- reportSchemaError("src-redefine.6.1.1", new Object []{new
Integer(groupRefsCount)}, child);
+ reportSchemaError("src-redefine.6.1.1", new Object
[]{Integer.valueOf(groupRefsCount)}, child);
}
else if (groupRefsCount == 1) {
// return true;
diff --git a/src/org/apache/xerces/jaxp/datatype/XMLGregorianCalendarImpl.java
b/src/org/apache/xerces/jaxp/datatype/XMLGregorianCalendarImpl.java
index 47f698367..0a3648867 100644
--- a/src/org/apache/xerces/jaxp/datatype/XMLGregorianCalendarImpl.java
+++ b/src/org/apache/xerces/jaxp/datatype/XMLGregorianCalendarImpl.java
@@ -550,9 +550,9 @@ class XMLGregorianCalendarImpl
throw new IllegalArgumentException(
DatatypeMessageFormatter.formatMessage(null,
"InvalidXGCValue-fractional",
- new Object[] { year, new Integer(month), new Integer(day),
- new Integer(hour), new Integer(minute), new
Integer(second),
- fractionalSecond, new Integer(timezone)})
+ new Object[] { year, Integer.valueOf(month),
Integer.valueOf(day),
+ Integer.valueOf(hour), Integer.valueOf(minute),
Integer.valueOf(second),
+ fractionalSecond, Integer.valueOf(timezone)})
);
/**
@@ -627,9 +627,9 @@ class XMLGregorianCalendarImpl
throw new IllegalArgumentException(
DatatypeMessageFormatter.formatMessage(null,
"InvalidXGCValue-milli",
- new Object[] { new Integer(year), new
Integer(month), new Integer(day),
- new Integer(hour), new Integer(minute), new
Integer(second),
- new Integer(millisecond), new Integer(timezone)})
+ new Object[] { Integer.valueOf(year),
Integer.valueOf(month), Integer.valueOf(day),
+ Integer.valueOf(hour), Integer.valueOf(minute),
Integer.valueOf(second),
+ Integer.valueOf(millisecond),
Integer.valueOf(timezone)})
);
/*
throw new IllegalArgumentException(
@@ -1367,7 +1367,7 @@ class XMLGregorianCalendarImpl
" field");
*/
throw new IllegalArgumentException(
- DatatypeMessageFormatter.formatMessage(null,
"InvalidFieldValue", new Object[]{ new Integer(value), FIELD_NAME[field]})
+ DatatypeMessageFormatter.formatMessage(null,
"InvalidFieldValue", new Object[]{ Integer.valueOf(value), FIELD_NAME[field]})
);
}
}
diff --git a/src/org/apache/xerces/parsers/SecureProcessingConfiguration.java
b/src/org/apache/xerces/parsers/SecureProcessingConfiguration.java
index cf908bb5b..e6b313382 100644
--- a/src/org/apache/xerces/parsers/SecureProcessingConfiguration.java
+++ b/src/org/apache/xerces/parsers/SecureProcessingConfiguration.java
@@ -199,21 +199,21 @@ public final class SecureProcessingConfiguration extends
if (fTotalEntitySize > TOTAL_ENTITY_SIZE_LIMIT_SYSTEM_VALUE) {
fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
"TotalEntitySizeLimitExceeded",
- new Object[] {new
Integer(TOTAL_ENTITY_SIZE_LIMIT_SYSTEM_VALUE)},
+ new Object[]
{Integer.valueOf(TOTAL_ENTITY_SIZE_LIMIT_SYSTEM_VALUE)},
XMLErrorReporter.SEVERITY_FATAL_ERROR);
}
if (isPE) {
if (sizeOfEntity > MAX_PARAMETER_ENTITY_SIZE_LIMIT_SYSTEM_VALUE) {
fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
"MaxParameterEntitySizeLimitExceeded",
- new Object[] {new
Integer(MAX_PARAMETER_ENTITY_SIZE_LIMIT_SYSTEM_VALUE)},
+ new Object[]
{Integer.valueOf(MAX_PARAMETER_ENTITY_SIZE_LIMIT_SYSTEM_VALUE)},
XMLErrorReporter.SEVERITY_FATAL_ERROR);
}
}
else if (sizeOfEntity > MAX_GENERAL_ENTITY_SIZE_LIMIT_SYSTEM_VALUE) {
fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
"MaxGeneralEntitySizeLimitExceeded",
- new Object[] {new
Integer(MAX_GENERAL_ENTITY_SIZE_LIMIT_SYSTEM_VALUE)},
+ new Object[]
{Integer.valueOf(MAX_GENERAL_ENTITY_SIZE_LIMIT_SYSTEM_VALUE)},
XMLErrorReporter.SEVERITY_FATAL_ERROR);
}
}
diff --git a/src/org/apache/xerces/xinclude/XIncludeHandler.java
b/src/org/apache/xerces/xinclude/XIncludeHandler.java
index 296d7c217..74e426275 100644
--- a/src/org/apache/xerces/xinclude/XIncludeHandler.java
+++ b/src/org/apache/xerces/xinclude/XIncludeHandler.java
@@ -245,7 +245,7 @@ public class XIncludeHandler
{ ERROR_REPORTER, ENTITY_RESOLVER, SECURITY_MANAGER, BUFFER_SIZE };
/** Property defaults. */
- private static final Object[] PROPERTY_DEFAULTS = { null, null, null, new
Integer(XMLEntityManager.DEFAULT_BUFFER_SIZE) };
+ private static final Object[] PROPERTY_DEFAULTS = { null, null, null,
Integer.valueOf(XMLEntityManager.DEFAULT_BUFFER_SIZE) };
// instance variables
@@ -1604,7 +1604,7 @@ public class XIncludeHandler
if (fErrorReporter != null)
fChildConfig.setProperty(ERROR_REPORTER, fErrorReporter);
if (fEntityResolver != null)
fChildConfig.setProperty(ENTITY_RESOLVER, fEntityResolver);
fChildConfig.setProperty(SECURITY_MANAGER, fSecurityManager);
- fChildConfig.setProperty(BUFFER_SIZE, new
Integer(fBufferSize));
+ fChildConfig.setProperty(BUFFER_SIZE,
Integer.valueOf(fBufferSize));
// features must be copied to child configuration
fNeedCopyFeatures = true;
diff --git a/src/org/apache/xerces/xpointer/ElementSchemePointer.java
b/src/org/apache/xerces/xpointer/ElementSchemePointer.java
index 30fa5f07c..9701b4fe7 100644
--- a/src/org/apache/xerces/xpointer/ElementSchemePointer.java
+++ b/src/org/apache/xerces/xpointer/ElementSchemePointer.java
@@ -534,9 +534,9 @@ final class ElementSchemePointer implements XPointerPart {
private Tokens(SymbolTable symbolTable) {
fSymbolTable = symbolTable;
- fTokenNames.put(new Integer(XPTRTOKEN_ELEM_NCNAME),
+ fTokenNames.put(Integer.valueOf(XPTRTOKEN_ELEM_NCNAME),
"XPTRTOKEN_ELEM_NCNAME");
- fTokenNames.put(new Integer(XPTRTOKEN_ELEM_CHILD),
+ fTokenNames.put(Integer.valueOf(XPTRTOKEN_ELEM_CHILD),
"XPTRTOKEN_ELEM_CHILD");
}
@@ -546,7 +546,7 @@ final class ElementSchemePointer implements XPointerPart {
* @return String The token string
*/
private String getTokenString(int token) {
- return (String) fTokenNames.get(new Integer(token));
+ return (String) fTokenNames.get(Integer.valueOf(token));
}
/**
@@ -555,7 +555,7 @@ final class ElementSchemePointer implements XPointerPart {
* @return String The token string
*/
private Integer getToken(int token) {
- return (Integer) fTokenNames.get(new Integer(token));
+ return (Integer) fTokenNames.get(Integer.valueOf(token));
}
/**
@@ -566,7 +566,7 @@ final class ElementSchemePointer implements XPointerPart {
private void addToken(String tokenStr) {
Integer tokenInt = (Integer) fTokenNames.get(tokenStr);
if (tokenInt == null) {
- tokenInt = new Integer(fTokenNames.size());
+ tokenInt = Integer.valueOf(fTokenNames.size());
fTokenNames.put(tokenInt, tokenStr);
}
addToken(tokenInt.intValue());
diff --git a/src/org/apache/xerces/xpointer/XPointerHandler.java
b/src/org/apache/xerces/xpointer/XPointerHandler.java
index 98c142ccb..9725c00f0 100644
--- a/src/org/apache/xerces/xpointer/XPointerHandler.java
+++ b/src/org/apache/xerces/xpointer/XPointerHandler.java
@@ -246,8 +246,8 @@ public final class XPointerHandler extends XIncludeHandler
implements
if (openParenCount != closeParenCount) {
reportError("UnbalancedParenthesisInXPointerExpression",
new Object[] { xpointer,
- new Integer(openParenCount),
- new Integer(closeParenCount) });
+ Integer.valueOf(openParenCount),
+ Integer.valueOf(closeParenCount) });
}
// Perform scheme specific parsing of the pointer part
@@ -494,15 +494,15 @@ public final class XPointerHandler extends
XIncludeHandler implements
private Tokens(SymbolTable symbolTable) {
fSymbolTable = symbolTable;
- fTokenNames.put(new Integer(XPTRTOKEN_OPEN_PAREN),
+ fTokenNames.put(Integer.valueOf(XPTRTOKEN_OPEN_PAREN),
"XPTRTOKEN_OPEN_PAREN");
- fTokenNames.put(new Integer(XPTRTOKEN_CLOSE_PAREN),
+ fTokenNames.put(Integer.valueOf(XPTRTOKEN_CLOSE_PAREN),
"XPTRTOKEN_CLOSE_PAREN");
- fTokenNames.put(new Integer(XPTRTOKEN_SHORTHAND),
+ fTokenNames.put(Integer.valueOf(XPTRTOKEN_SHORTHAND),
"XPTRTOKEN_SHORTHAND");
- fTokenNames.put(new Integer(XPTRTOKEN_SCHEMENAME),
+ fTokenNames.put(Integer.valueOf(XPTRTOKEN_SCHEMENAME),
"XPTRTOKEN_SCHEMENAME");
- fTokenNames.put(new Integer(XPTRTOKEN_SCHEMEDATA),
+ fTokenNames.put(Integer.valueOf(XPTRTOKEN_SCHEMEDATA),
"XPTRTOKEN_SCHEMEDATA");
}
@@ -512,7 +512,7 @@ public final class XPointerHandler extends XIncludeHandler
implements
* @return String The token string
*/
private String getTokenString(int token) {
- return (String) fTokenNames.get(new Integer(token));
+ return (String) fTokenNames.get(Integer.valueOf(token));
}
/**
@@ -523,7 +523,7 @@ public final class XPointerHandler extends XIncludeHandler
implements
private void addToken(String tokenStr) {
Integer tokenInt = (Integer) fTokenNames.get(tokenStr);
if (tokenInt == null) {
- tokenInt = new Integer(fTokenNames.size());
+ tokenInt = Integer.valueOf(fTokenNames.size());
fTokenNames.put(tokenInt, tokenStr);
}
addToken(tokenInt.intValue());
diff --git a/src/org/apache/xml/serialize/HTMLdtd.java
b/src/org/apache/xml/serialize/HTMLdtd.java
index 78143db65..c5dac9baa 100755
--- a/src/org/apache/xml/serialize/HTMLdtd.java
+++ b/src/org/apache/xml/serialize/HTMLdtd.java
@@ -346,7 +346,7 @@ public final class HTMLdtd
String name;
initialize();
- name = (String) _byChar.get( new Integer( value ) );
+ name = (String) _byChar.get( Integer.valueOf( value ) );
return name;
}
@@ -434,15 +434,15 @@ public final class HTMLdtd
private static void defineEntity( String name, char value )
{
if ( _byName.get( name ) == null ) {
- _byName.put( name, new Integer( value ) );
- _byChar.put( new Integer( value ), name );
+ _byName.put( name, Integer.valueOf( value ) );
+ _byChar.put( Integer.valueOf( value ), name );
}
}
private static void defineElement( String name, int flags )
{
- _elemDefs.put( name, new Integer( flags ) );
+ _elemDefs.put( name, Integer.valueOf( flags ) );
}
diff --git a/tests/dom/DTest.java b/tests/dom/DTest.java
index 2c5f2f241..f5c5e4005 100644
--- a/tests/dom/DTest.java
+++ b/tests/dom/DTest.java
@@ -816,30 +816,30 @@ public void testCharacterData(org.w3c.dom.Document
document)
//!! Throws INDEX_SIZE_ERR ********************
OK &= Assertion.verify(DTest.DOMExceptionsTest(charData, "deleteData",
new Class[]{int.class, int.class},
- new Object[]{new Integer(-1),new Integer(5) },
DOMException.INDEX_SIZE_ERR ));
+ new Object[]{Integer.valueOf(-1),Integer.valueOf(5) },
DOMException.INDEX_SIZE_ERR ));
OK &= Assertion.verify(DTest.DOMExceptionsTest(charData, "deleteData",
new Class[]{int.class, int.class},
- new Object[]{new Integer(2),new Integer(-1) },
DOMException.INDEX_SIZE_ERR ));
+ new Object[]{Integer.valueOf(2),Integer.valueOf(-1) },
DOMException.INDEX_SIZE_ERR ));
OK &= Assertion.verify(DTest.DOMExceptionsTest(charData, "deleteData",
new Class[]{int.class, int.class},
- new Object[]{new Integer(100),new Integer(5) },
DOMException.INDEX_SIZE_ERR ));
+ new Object[]{Integer.valueOf(100),Integer.valueOf(5) },
DOMException.INDEX_SIZE_ERR ));
OK &= Assertion.verify(DTest.DOMExceptionsTest(charData, "insertData",
new Class[]{int.class, String.class},
- new Object[]{new Integer(-1),"Stuff inserted" },
DOMException.INDEX_SIZE_ERR ));
+ new Object[]{Integer.valueOf(-1),"Stuff inserted" },
DOMException.INDEX_SIZE_ERR ));
OK &= Assertion.verify(DTest.DOMExceptionsTest(charData, "insertData",
new Class[]{int.class, String.class},
- new Object[]{new Integer(100),"Stuff inserted" },
DOMException.INDEX_SIZE_ERR ));
+ new Object[]{Integer.valueOf(100),"Stuff inserted" },
DOMException.INDEX_SIZE_ERR ));
OK &= Assertion.verify(DTest.DOMExceptionsTest(charData, "replaceData",
new Class[]{int.class, int.class, String.class},
- new Object[]{new Integer(-1),new
Integer(5),"Replacement stuff" }, DOMException.INDEX_SIZE_ERR ));
+ new
Object[]{Integer.valueOf(-1),Integer.valueOf(5),"Replacement stuff" },
DOMException.INDEX_SIZE_ERR ));
OK &= Assertion.verify(DTest.DOMExceptionsTest(charData, "replaceData",
new Class[]{int.class, int.class, String.class},
- new Object[]{new Integer(100),new
Integer(5),"Replacement stuff" }, DOMException.INDEX_SIZE_ERR ));
+ new
Object[]{Integer.valueOf(100),Integer.valueOf(5),"Replacement stuff" },
DOMException.INDEX_SIZE_ERR ));
OK &= Assertion.verify(DTest.DOMExceptionsTest(charData, "replaceData",
new Class[]{int.class, int.class, String.class},
- new Object[]{new Integer(2),new
Integer(-1),"Replacement stuff" }, DOMException.INDEX_SIZE_ERR ));
+ new
Object[]{Integer.valueOf(2),Integer.valueOf(-1),"Replacement stuff" },
DOMException.INDEX_SIZE_ERR ));
OK &= Assertion.verify(DTest.DOMExceptionsTest(charData,
"substringData", new Class[]{int.class, int.class},
- new Object[]{new Integer(-1),new Integer(5) },
DOMException.INDEX_SIZE_ERR ));
+ new Object[]{Integer.valueOf(-1),Integer.valueOf(5) },
DOMException.INDEX_SIZE_ERR ));
OK &= Assertion.verify(DTest.DOMExceptionsTest(charData,
"substringData", new Class[]{int.class, int.class},
- new Object[]{new Integer(100),new Integer(5) },
DOMException.INDEX_SIZE_ERR ));
+ new Object[]{Integer.valueOf(100),Integer.valueOf(5) },
DOMException.INDEX_SIZE_ERR ));
OK &= Assertion.verify(DTest.DOMExceptionsTest(charData,
"substringData", new Class[]{int.class, int.class},
- new Object[]{new Integer(2),new Integer(-1) },
DOMException.INDEX_SIZE_ERR ));
+ new Object[]{Integer.valueOf(2),Integer.valueOf(-1) },
DOMException.INDEX_SIZE_ERR ));
//!! Throws NO_MODIFICATION_ALLOWED_ERR ********
@@ -848,11 +848,11 @@ public void testCharacterData(org.w3c.dom.Document
document)
OK &= Assertion.verify(DTest.DOMExceptionsTest(node, "appendData", new
Class[]{String.class},
new Object[]{"new data" },
DOMException.NO_MODIFICATION_ALLOWED_ERR ));
OK &= Assertion.verify(DTest.DOMExceptionsTest(node, "deleteData", new
Class[]{int.class, int.class},
- new Object[]{new Integer(5),new Integer(10) },
DOMException.NO_MODIFICATION_ALLOWED_ERR ));
+ new Object[]{Integer.valueOf(5),Integer.valueOf(10) },
DOMException.NO_MODIFICATION_ALLOWED_ERR ));
OK &= Assertion.verify(DTest.DOMExceptionsTest(node, "insertData", new
Class[]{int.class, String.class},
- new Object[]{new Integer(5),"Stuff inserted" },
DOMException.NO_MODIFICATION_ALLOWED_ERR ));
+ new Object[]{Integer.valueOf(5),"Stuff inserted" },
DOMException.NO_MODIFICATION_ALLOWED_ERR ));
OK &= Assertion.verify(DTest.DOMExceptionsTest(node, "replaceData", new
Class[]{int.class, int.class, String.class},
- new Object[]{new Integer(5),new
Integer(10),"Replacementstuff" }, DOMException.NO_MODIFICATION_ALLOWED_ERR ));
+ new
Object[]{Integer.valueOf(5),Integer.valueOf(10),"Replacementstuff" },
DOMException.NO_MODIFICATION_ALLOWED_ERR ));
OK &= Assertion.verify(DTest.DOMExceptionsTest(node, "setData", new
Class[]{String.class},
new Object[]{"New setdata stuff"},
DOMException.NO_MODIFICATION_ALLOWED_ERR ));
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]