Author: mukulg
Date: Fri Jun 10 04:44:24 2016
New Revision: 1747631
URL: http://svn.apache.org/viewvc?rev=1747631&view=rev
Log:
I am reverting a change I did long time ago to this file. I am restoring the
logic in this file, that was in the original revision 906803. I think, the
original code that I had changed in this file is not really wrong. I started
looking at the code in this file, while studying the bug report XERCESJ-1669.
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=1747631&r1=1747630&r2=1747631&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
Jun 10 04:44:24 2016
@@ -420,16 +420,16 @@ class DurationImpl
protected DurationImpl(String lexicalRepresentation)
throws IllegalArgumentException {
// only if I could use the JDK1.4 regular expression ....
-
- if (lexicalRepresentation == null) {
- throw new NullPointerException();
- }
-
+
final String s = lexicalRepresentation;
boolean positive;
int[] idx = new int[1];
int length = s.length();
boolean timeRequired = false;
+
+ if (lexicalRepresentation == null) {
+ throw new NullPointerException();
+ }
idx[0] = 0;
if (length != idx[0] && s.charAt(idx[0]) == '-') {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]