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

org.apache.commons.lang3.time.DateFormatUtils.formatUTC (10L, "") throws java.lang.StringIndexOutOfBoundsException exception

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • 3.4, 3.5
    • None
    • lang.time.*
    • None
    • JRE 8

    • Important

    Description

      I am calling method formatUTC() of class
      org.apache.commons.lang3.time.DateFormatUtils
      as in this code:
      java.lang.String var2 = org.apache.commons.lang3.time.DateFormatUtils.formatUTC (10L, "")
      In version 3.4, the call is throwing a
      java.lang.StringIndexOutOfBoundsException exception.
      But in version 3.5 it returns an empty string ("").
      According the documentation, the parameter patter can not be null.
      Is correct this method accept empty string as pattern parameter?

      Attachments

        Activity

          People

            Unassigned Unassigned
            glebrito Gleison Brito Batista
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: