[dna-issues] [JBoss JIRA] Resolved: (DNA-82) Break TextEncoder interface into two interfaces: one for encoding and one for decoding
Randall Hauch (JIRA)
jira-events at lists.jboss.org
Tue Jun 3 13:34:20 EDT 2008
[ http://jira.jboss.com/jira/browse/DNA-82?page=all ]
Randall Hauch resolved DNA-82.
------------------------------
Resolution: Done
Broke into separate interfaces, and changed all uses. Some places did require references to both a TextEncoder and TextDecoder, but most only required a single reference. It also made some of the uses of a decoder more clear (than calling it a "decoder" but having the type be TextEncoder, as it was previously.)
> Break TextEncoder interface into two interfaces: one for encoding and one for decoding
> --------------------------------------------------------------------------------------
>
> Key: DNA-82
> URL: http://jira.jboss.com/jira/browse/DNA-82
> Project: DNA
> Issue Type: Task
> Components: Common
> Reporter: Randall Hauch
> Assigned To: Randall Hauch
> Fix For: 0.2
>
> Original Estimate: 1 hour
> Remaining Estimate: 1 hour
>
> Currently, the org.jboss.dna.common.text.TextEncoder interface has two methods: encode(String):String and decode(String):String. Using a single reference to a TextEncoder (often times for decoding purposes) is confusing and relies upon documentation or parameter naming to make the purpose clear. It would be better to have a separate TextEncoder and TextDecoder interfaces, and to use those interfaces in the appropriate places. In some (rare?) situations where an encoder and decoder are required, two parameters or member attributes will be required. Overall, this should be an improvement.
> The current implementations (JCR, URL, NoOp) can all just implement both interfaces.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the dna-issues
mailing list