tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 49979] SimpleDateFormat StringIndexOutOfBoundsException
Date Mon, 27 Sep 2010 13:32:13 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=49979

sosigene@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID
           Severity|major                       |minor

--- Comment #3 from sosigene@gmail.com 2010-09-27 09:32:07 EDT ---
closing issue as it is really about the jdk 1.6.0_16 implementation, see
SimpleDateFormat lines 1767-1785

            // For time zones that have no known names, look for strings
            // of the form:
            //    GMT[+-]hours:minutes or
            //    GMT.
            if ((text.length() - start) >= GMT.length() &&
            text.regionMatches(true, start, GMT, 0, GMT.length())) {
            int num;
            calendar.set(Calendar.DST_OFFSET, 0);
            pos.index = start + GMT.length();

            try { // try-catch for "GMT" only time zone string
                char c = text.charAt(pos.index);
                if (c == '+') {
                sign = 1;
                } else if (c == '-') {
                sign = -1;
                } 
            }
            catch(StringIndexOutOfBoundsException e) {}

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message