You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bu...@apache.org on 2001/11/01 17:07:56 UTC

DO NOT REPLY [Bug 4566] New: - [PATCH] PropertyFile pattern is not returned in exact format

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4566>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4566

[PATCH] PropertyFile pattern is not returned in exact format

           Summary: [PATCH] PropertyFile pattern is not returned in exact
                    format
           Product: Ant
           Version: 1.5 alpha (nightly)
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Optional Tasks
        AssignedTo: ant-dev@jakarta.apache.org
        ReportedBy: peterj@liberate.com


In certain cases, a pattern in PropertyFile (actually just a DecimalFormat) is
not returned in the exact format provided.  In particular, the returned string
can be longer than the specified pattern, e.g. if the value "99" is incremented
with pattern "00", the returned string is "100".

I've patched this to return the rightmost substring of the value if it's a)
positive; b) longer than the provided pattern; and c) the pattern is completely
numeric.  It's nominally a change in functionality, but has a workaround
(specify a pattern with "#" instead of "0" and you'll get the original behaviour).

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>