Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.6
-
None
-
Java 1.8.0_144,
Windows 10/Linux
Description
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.