You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by mr...@apache.org on 2008/12/01 05:33:43 UTC
svn commit: r721960 -
/xerces/java/trunk/src/org/apache/xerces/jaxp/datatype/DurationImpl.java
Author: mrglavas
Date: Sun Nov 30 20:33:43 2008
New Revision: 721960
URL: http://svn.apache.org/viewvc?rev=721960&view=rev
Log:
JIRA Issue #1343:
http://issues.apache.org/jira/browse/XERCESJ-1343
Remove unused code. Patch thanks to Dave Brosius.
Modified:
xerces/java/trunk/src/org/apache/xerces/jaxp/datatype/DurationImpl.java
Modified: xerces/java/trunk/src/org/apache/xerces/jaxp/datatype/DurationImpl.java
URL: http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xerces/jaxp/datatype/DurationImpl.java?rev=721960&r1=721959&r2=721960&view=diff
==============================================================================
--- xerces/java/trunk/src/org/apache/xerces/jaxp/datatype/DurationImpl.java (original)
+++ xerces/java/trunk/src/org/apache/xerces/jaxp/datatype/DurationImpl.java Sun Nov 30 20:33:43 2008
@@ -100,11 +100,6 @@
class DurationImpl
extends Duration
implements Serializable {
-
- /**
- * <p>Number of Fields.</p>
- */
- private static final int FIELD_NUM = 6;
/**
* <p>Internal array of value Fields.</p>
@@ -119,21 +114,9 @@
};
/**
- * <p>Internal array of value Field ids.</p>
- */
- private static final int[] FIELD_IDS = {
- DatatypeConstants.YEARS.getId(),
- DatatypeConstants.MONTHS.getId(),
- DatatypeConstants.DAYS.getId(),
- DatatypeConstants.HOURS.getId(),
- DatatypeConstants.MINUTES.getId(),
- DatatypeConstants.SECONDS.getId()
- };
-
- /**
* <p>BigDecimal value of 0.</p>
*/
- private static final BigDecimal ZERO = BigDecimal.valueOf((long) 0);
+ private static final BigDecimal ZERO = BigDecimal.valueOf(0);
/**
* <p>Indicates the sign. -1, 0 or 1 if the duration is negative,
@@ -704,8 +687,7 @@
*/
public int compare(Duration rhs) {
- BigInteger maxintAsBigInteger = BigInteger.valueOf((long) Integer.MAX_VALUE);
- BigInteger minintAsBigInteger = BigInteger.valueOf((long) Integer.MIN_VALUE);
+ BigInteger maxintAsBigInteger = BigInteger.valueOf(Integer.MAX_VALUE);
// check for fields that are too large in this Duration
if (years != null && years.compareTo(maxintAsBigInteger) == 1) {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org