[
https://issues.apache.org/jira/browse/LANG-1327?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15994296#comment-15994296
]
Charles Honton commented on LANG-1327:
--------------------------------------
Empty format is legal, even if non-sensical. Since there are no format
specifiers, the output should be an empty string.
> org.apache.commons.lang3.time.DateFormatUtils.formatUTC (10L, "") throws
> java.lang.StringIndexOutOfBoundsException exception
> ----------------------------------------------------------------------------------------------------------------------------
>
> Key: LANG-1327
> URL: https://issues.apache.org/jira/browse/LANG-1327
> Project: Commons Lang
> Issue Type: Bug
> Components: lang.time.*
> Affects Versions: 3.4, 3.5
> Environment: JRE 8
> Reporter: Gleison Brito Batista
>
> 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?
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)