Author: rickdn
Date: Wed Feb 29 19:21:57 2012
New Revision: 1295225

URL: http://svn.apache.org/viewvc?rev=1295225&view=rev
Log:
OODT-361 #resolve fixed  DateConvert throws ParseException if input string is 
null.


Modified:
    
oodt/trunk/commons/src/main/java/org/apache/oodt/commons/util/DateConvert.java

Modified: 
oodt/trunk/commons/src/main/java/org/apache/oodt/commons/util/DateConvert.java
URL: 
http://svn.apache.org/viewvc/oodt/trunk/commons/src/main/java/org/apache/oodt/commons/util/DateConvert.java?rev=1295225&r1=1295224&r2=1295225&view=diff
==============================================================================
--- 
oodt/trunk/commons/src/main/java/org/apache/oodt/commons/util/DateConvert.java 
(original)
+++ 
oodt/trunk/commons/src/main/java/org/apache/oodt/commons/util/DateConvert.java 
Wed Feb 29 19:21:57 2012
@@ -151,7 +151,7 @@ public class DateConvert {
 
                @param inputString The string to be parsed.
                @return The resulting Date object.
-               @throws ParseException If the string does not match the 
date/time
+               @throws ParseException If the string is null or does not match 
the date/time
                format.
        */
        public static Date isoParse(String inputString) throws ParseException {
@@ -161,8 +161,8 @@ public class DateConvert {
                dateFormat.setLenient(false);
 
                // The length of the input string should be at least 24 
characters.
-               if (inputString.length() < 24) {
-                       throw new ParseException("An exception occurred because 
the input date/time string was not at least 24 characters in length.", 
inputString.length());
+               if (inputString == null || inputString.length() < 24) {
+                       throw new ParseException("An exception occurred because 
the input date/time string was null or under 24 characters in length.", 
inputString.length());
                }
 
                // Evaluate the the specified offset and set the time zone.


Reply via email to