Uploaded image for project: 'Commons Lang'
  1. Commons Lang
  2. LANG-1186

NullPointerException in FastDateParser$TimeZoneStrategy

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.4
    • 3.5
    • lang.time.*
    • None

    Description

      Java 8u60 has a change where DateFormatSymbols.getZoneStrings returns arrays with 7 elements instead of 5 like it previously had. For some locales, the additional two elements are null.

      Running org.apache.commons.lang3.time.FastDateParser_TimeZoneStrategyTest
      Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.597 sec <<< FAILURE! - in org.apache.commons.lang3.time.FastDateParser_TimeZoneStrategyTest
      testTimeZoneStrategyPattern(org.apache.commons.lang3.time.FastDateParser_TimeZoneStrategyTest)  Time elapsed: 0.597 sec  <<< ERROR!
      java.lang.NullPointerException: null
      	at org.apache.commons.lang3.time.FastDateParser$TimeZoneStrategy.<init>(FastDateParser.java:856)
      	at org.apache.commons.lang3.time.FastDateParser.getLocaleSpecificStrategy(FastDateParser.java:647)
      	at org.apache.commons.lang3.time.FastDateParser.getStrategy(FastDateParser.java:616)
      	at org.apache.commons.lang3.time.FastDateParser.access$100(FastDateParser.java:74)
      	at org.apache.commons.lang3.time.FastDateParser$StrategyParser.letterPattern(FastDateParser.java:230)
      	at org.apache.commons.lang3.time.FastDateParser$StrategyParser.getNextStrategy(FastDateParser.java:214)
      	at org.apache.commons.lang3.time.FastDateParser.init(FastDateParser.java:161)
      	at org.apache.commons.lang3.time.FastDateParser.<init>(FastDateParser.java:147)
      	at org.apache.commons.lang3.time.FastDateParser.<init>(FastDateParser.java:108)
      	at org.apache.commons.lang3.time.FastDateParser_TimeZoneStrategyTest.testTimeZoneStrategyPattern(FastDateParser_TimeZoneStrategyTest.java:31)
      

      Attachments

        Issue Links

          Activity

            People

              chonton Charles Honton
              nmanley Nick Manley
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: