Author: mrglavas
Date: Fri Feb 5 04:06:16 2010
New Revision: 906803
URL: http://svn.apache.org/viewvc?rev=906803&view=rev
Log:
Fixing JIRA Bug #1416: http://issues.apache.org/jira/browse/XERCESJ-1416. An
NPE could occur when the value of the duration is invalid. Check for this
condition and throw the correct exception.
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=906803&r1=906802&r2=906803&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 Fri
Feb 5 04:06:16 2010
@@ -573,6 +573,9 @@
int idx = tokens.length();
for (int i = len - 1; i >= 0; i--) {
+ if (parts[i] == null) {
+ throw new IllegalArgumentException(whole);
+ }
int nidx =
tokens.lastIndexOf(
parts[i].charAt(parts[i].length() - 1),
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]