You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Sebb (JIRA)" <ji...@apache.org> on 2012/09/26 21:05:08 UTC

[jira] [Created] (LANG-829) FastDateParser could use Calendar.getDisplayNames for all text fields

Sebb created LANG-829:
-------------------------

             Summary: FastDateParser could use Calendar.getDisplayNames for all text fields
                 Key: LANG-829
                 URL: https://issues.apache.org/jira/browse/LANG-829
             Project: Commons Lang
          Issue Type: Improvement
          Components: lang.time.*
            Reporter: Sebb
            Priority: Minor


FastDateParser could use Calendar.getDisplayNames for all text fields.
This returns a map of names to indexes, which would be easier to search - no need to sort the symbols, and no need for the KeyValue instances.

Also, the nameValues entries are only used by the TextStrategy, so could be saved in the instance.

Overall this should reduce memory and be quicker.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (LANG-829) FastDateParser could use Calendar.getDisplayNames for all text fields

Posted by "Sebb (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LANG-829?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13464362#comment-13464362 ] 

Sebb commented on LANG-829:
---------------------------

bq. Also, the nameValues entries are only used by the TextStrategy, so could be saved in the instance.

This won't work, because the Strategy class instances are shared between formats.
Also, if the same field appears twice in a format, the nameValues approach would save memory.

However, dropping the KeyValue instances would simplify the code.
                
> FastDateParser could use Calendar.getDisplayNames for all text fields
> ---------------------------------------------------------------------
>
>                 Key: LANG-829
>                 URL: https://issues.apache.org/jira/browse/LANG-829
>             Project: Commons Lang
>          Issue Type: Improvement
>          Components: lang.time.*
>            Reporter: Sebb
>            Priority: Minor
>
> FastDateParser could use Calendar.getDisplayNames for all text fields.
> This returns a map of names to indexes, which would be easier to search - no need to sort the symbols, and no need for the KeyValue instances.
> Also, the nameValues entries are only used by the TextStrategy, so could be saved in the instance.
> Overall this should reduce memory and be quicker.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (LANG-829) FastDateParser could use Calendar.getDisplayNames for all text fields

Posted by "Sebb (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LANG-829?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sebb resolved LANG-829.
-----------------------

    Resolution: Fixed
      Assignee:     (was: Sebb)

URL: http://svn.apache.org/viewvc?rev=1390937&view=rev
Log:
LANG-829 FastDateParser could use Calendar.getDisplayNames for all text fields
Remove unnecessary KeyValue instances

Modified:
    commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/time/FastDateParser.java
                
> FastDateParser could use Calendar.getDisplayNames for all text fields
> ---------------------------------------------------------------------
>
>                 Key: LANG-829
>                 URL: https://issues.apache.org/jira/browse/LANG-829
>             Project: Commons Lang
>          Issue Type: Improvement
>          Components: lang.time.*
>            Reporter: Sebb
>            Priority: Minor
>             Fix For: 3.2
>
>
> FastDateParser could use Calendar.getDisplayNames for all text fields.
> This returns a map of names to indexes, which would be easier to search - no need to sort the symbols, and no need for the KeyValue instances.
> Also, the nameValues entries are only used by the TextStrategy, so could be saved in the instance.
> Overall this should reduce memory and be quicker.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (LANG-829) FastDateParser could use Calendar.getDisplayNames for all text fields

Posted by "Sebb (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LANG-829?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13464374#comment-13464374 ] 

Sebb commented on LANG-829:
---------------------------

Also, could fetch the values using Calender.ALL_STYLES - there would then be no need to have 2 separate lists.
                
> FastDateParser could use Calendar.getDisplayNames for all text fields
> ---------------------------------------------------------------------
>
>                 Key: LANG-829
>                 URL: https://issues.apache.org/jira/browse/LANG-829
>             Project: Commons Lang
>          Issue Type: Improvement
>          Components: lang.time.*
>            Reporter: Sebb
>            Priority: Minor
>
> FastDateParser could use Calendar.getDisplayNames for all text fields.
> This returns a map of names to indexes, which would be easier to search - no need to sort the symbols, and no need for the KeyValue instances.
> Also, the nameValues entries are only used by the TextStrategy, so could be saved in the instance.
> Overall this should reduce memory and be quicker.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Reopened] (LANG-829) FastDateParser could use Calendar.getDisplayNames for all text fields

Posted by "Sebb (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LANG-829?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sebb reopened LANG-829:
-----------------------

      Assignee: Sebb  (was: Charles Honton)

The change does not address the original issue.
The Map returned from getDisplayNames() is specifically designed to be used for looking up the names in order to return their index values, so we should use that.
                
> FastDateParser could use Calendar.getDisplayNames for all text fields
> ---------------------------------------------------------------------
>
>                 Key: LANG-829
>                 URL: https://issues.apache.org/jira/browse/LANG-829
>             Project: Commons Lang
>          Issue Type: Improvement
>          Components: lang.time.*
>            Reporter: Sebb
>            Assignee: Sebb
>            Priority: Minor
>             Fix For: 3.2
>
>
> FastDateParser could use Calendar.getDisplayNames for all text fields.
> This returns a map of names to indexes, which would be easier to search - no need to sort the symbols, and no need for the KeyValue instances.
> Also, the nameValues entries are only used by the TextStrategy, so could be saved in the instance.
> Overall this should reduce memory and be quicker.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (LANG-829) FastDateParser could use Calendar.getDisplayNames for all text fields

Posted by "Charles Honton (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LANG-829?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Charles Honton resolved LANG-829.
---------------------------------

       Resolution: Fixed
    Fix Version/s: 3.2

URL: http://svn.apache.org/viewvc?view=revision&revision=1390839

Modified:
 commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/time/FastDateParser.java

                
> FastDateParser could use Calendar.getDisplayNames for all text fields
> ---------------------------------------------------------------------
>
>                 Key: LANG-829
>                 URL: https://issues.apache.org/jira/browse/LANG-829
>             Project: Commons Lang
>          Issue Type: Improvement
>          Components: lang.time.*
>            Reporter: Sebb
>            Assignee: Charles Honton
>            Priority: Minor
>             Fix For: 3.2
>
>
> FastDateParser could use Calendar.getDisplayNames for all text fields.
> This returns a map of names to indexes, which would be easier to search - no need to sort the symbols, and no need for the KeyValue instances.
> Also, the nameValues entries are only used by the TextStrategy, so could be saved in the instance.
> Overall this should reduce memory and be quicker.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira