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 2010/02/05 05:06:33 UTC
svn commit: r906804 -
/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/jaxp/datatype/DurationImpl.java
Author: mrglavas
Date: Fri Feb 5 04:06:33 2010
New Revision: 906804
URL: http://svn.apache.org/viewvc?rev=906804&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/branches/xml-schema-1.1-dev/src/org/apache/xerces/jaxp/datatype/DurationImpl.java
Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/jaxp/datatype/DurationImpl.java
URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/jaxp/datatype/DurationImpl.java?rev=906804&r1=906803&r2=906804&view=diff
==============================================================================
--- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/jaxp/datatype/DurationImpl.java (original)
+++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/jaxp/datatype/DurationImpl.java Fri Feb 5 04:06:33 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: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org