You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2019/10/11 05:12:00 UTC

[jira] [Work logged] (CONFIGURATION-764) Default date lookup can not work for some specific format

     [ https://issues.apache.org/jira/browse/CONFIGURATION-764?focusedWorklogId=326705&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-326705 ]

ASF GitHub Bot logged work on CONFIGURATION-764:
------------------------------------------------

                Author: ASF GitHub Bot
            Created on: 11/Oct/19 05:11
            Start Date: 11/Oct/19 05:11
    Worklog Time Spent: 10m 
      Work Description: NingZhang-e commented on pull request #36: [CONFIGURATION-764] Default date lookup can not work for some specific
URL: https://github.com/apache/commons-configuration/pull/36
 
 
   Fix for https://issues.apache.org/jira/browse/CONFIGURATION-764
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

            Worklog Id:     (was: 326705)
    Remaining Estimate: 0h
            Time Spent: 10m

> Default date lookup can not work for some specific format
> ---------------------------------------------------------
>
>                 Key: CONFIGURATION-764
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-764
>             Project: Commons Configuration
>          Issue Type: Bug
>          Components: Interpolation
>    Affects Versions: 2.6
>         Environment: Java 1.8.0_144,
> Windows 10/Linux
>            Reporter: Ning Zhang
>            Priority: Major
>         Attachments: 0001-Fix-default-date-lookup-issue.patch
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> When default date lookup is like: *${date:yyyyMM}/${date:ddHHmmss}*
> It will encounter one exception like:
> _java.lang.IllegalArgumentException: Illegal pattern character 't'_
> But if change date lookup format to : /*${date:yyyyMM}/${date:ddHHmmss}*
> There will be not such issue anymore.
> After investigation, found it is caused by _interpolate_ method in _ConfigurationInterpolator.java_.
> For the input date lookup format, it is will be taken as single variable via _looksLikeSingleVariable_,
> so default date lookup will try to format the date directly then throw one exception.
> Attached patch is trying to catch the exception then return null, substitutor will continue to work.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)