click-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Malcolm Edgar (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CLK-610) DateField formatPattern should not be static string, but static variable
Date Mon, 18 Jan 2010 12:18:54 GMT

    [ https://issues.apache.org/jira/browse/CLK-610?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12801751#action_12801751
] 

Malcolm Edgar commented on CLK-610:
-----------------------------------

While this is an improvement over the previous version which had a magic string value, the
default value should probably be loaded from a DateField.properties file, as format patterns
are local specific.

regards Malcolm Edgar

> DateField formatPattern should not be static string, but static variable
> ------------------------------------------------------------------------
>
>                 Key: CLK-610
>                 URL: https://issues.apache.org/jira/browse/CLK-610
>             Project: Click
>          Issue Type: Improvement
>            Reporter: Andrey Rybin
>            Assignee: Bob Schellink
>             Fix For: 2.1.0
>
>
> DateField constructors contain this code:
>  super(...);
>   ...
>  setFormatPattern("dd MMM yyyy");
> (yes, same code 3 times ;-)
> I suggest to replace it with this:
> public static String defaultFormatPattern = "dd MMM yyyy";
>  super(...);
>   ...
>  setFormatPattern(defaultFormatPattern);

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message