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

NullPointerException (NPE) in FastDateFormat.getInstance(FastDateFormat.java:211)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 2.2
    • None
    • None
    • None
    • MS Windows XP (SP 2), Java 1.5.0 Update 11

    Description

      Sometimes (sadly this is not reproducible) the following method call results in a NullPointerException (NPE):

      Stacktrace:

      java.lang.NullPointerException
      at org.apache.commons.lang.time.FastDateFormat.getInstance(FastDateFormat.java:211)
      at org.apache.commons.lang.time.DateFormatUtils.format(DateFormatUtils.java:258)
      at org.apache.commons.lang.time.DateFormatUtils.format(DateFormatUtils.java:232)

      I don't know how this is actually possible, since the exception is being raised when accessing a static field 'cInstanceCache' that will be implicitly initialized...

      Could this have something to do with class gc?

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              kburjack Kai Burjack
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: