[ 
https://issues.apache.org/jira/browse/AVRO-605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12895903#action_12895903
 ] 

Scott Carey commented on AVRO-605:
----------------------------------

bq. Should we rename get/setLength to be get/setByteLength? This will break 
some folks, but might be worth it.

If we were starting over, that would be a good plan.  If we don't want to break 
anyone, then we need extra explicit javadoc.   I'm OK with breaking this and 
happy to recompile my code for 1.4, but I can see the API breakage causing 
trouble for others because the Utf8 class is highly likely to be used by client 
code prior to this CharSequence change.   Maybe we should make the new 
get/setByteLength methods, deprecate the old ones, and have the old ones simply 
call the new ones.    Then we can toss out the old ones in 1.5 or 1.6.


> Java: make Utf8 implement CharSequence
> --------------------------------------
>
>                 Key: AVRO-605
>                 URL: https://issues.apache.org/jira/browse/AVRO-605
>             Project: Avro
>          Issue Type: Improvement
>          Components: java
>            Reporter: Doug Cutting
>            Assignee: Doug Cutting
>             Fix For: 1.4.0
>
>         Attachments: AVRO-605.patch, AVRO-605.patch
>
>
> If Utf8 implemented CharSequence then interfaces could change to specify 
> CharSequence and accept Utf8 or String interchangeably.
> This would be mostly back-compatible, except the method signatures of 
> generated protocols would be different, so implementations would need to be 
> updated.

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

Reply via email to