[dna-issues] [JBoss JIRA] Closed: (DNA-247) Remove DateUtil class and StringUtil.readableString(...) methods

Randall Hauch (JIRA) jira-events at lists.jboss.org
Wed Nov 5 14:37:56 EST 2008


     [ https://jira.jboss.org/jira/browse/DNA-247?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Randall Hauch closed DNA-247.
-----------------------------

    Resolution: Done


Removed the DateUtil class, since it provided a subset of the functionality that is already available in Joda Time, which is being used by 'dna-graph'.  Also deleted the StringUtil.readableString(...) methods, replacing them with calls to List.toString(), Set.toString(), Property.toString(), and Map.toString().  Since the toString() method on arrays is crappy, used "Arrays.asList(array).toString()".

Ensured that Property.toString() returns a readable string, and that the Value classes all have readable toString() methods.  Most were find, but the InMemoryBinary value class had a poor toString() method, so this was changed to output the Base64 encoding of the binary content.  To do this, I added a Base64 utility class based on Federate's class (which was simplified from the public domain class at http://iharder.sourceforge.net/current/java/base64/).

> Remove DateUtil class and StringUtil.readableString(...) methods
> ----------------------------------------------------------------
>
>                 Key: DNA-247
>                 URL: https://jira.jboss.org/jira/browse/DNA-247
>             Project: DNA
>          Issue Type: Task
>    Affects Versions: 0.2
>            Reporter: Randall Hauch
>            Assignee: Randall Hauch
>             Fix For: 0.3
>
>
> The DateUtil class provides some of the same functionality that is already available in Joda Time, which is being used by 'dna-graph'.  Since this class is used very little (really, just by the tests and by StringUtil.readableString methods), we should just remove the DateUtil class.  
> Also, by ensuring that Property.toString() returns a readable string, and that the Value classes all have readable toString() methods, then we can use List.toString(), Set.toString(), Property.toString(), and Map.toString().  The toString() method on arrays is crappy, but this can easily be fixed by using "Arrays.asList(array).toString()".  This means that we can then delete the StringUtil.readableString(...) methods.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the dna-issues mailing list