Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-2738

Text is not subclassable because set(Text) and compareTo(Object) access the other instance's private members directly

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 0.16.0
    • 0.17.0
    • io
    • None

    Description

      Text objects should not access other Text objects private members directly. Both set(Text) and compareTo(Object) do.
      Because these two methods access private members of the other object, Text is not subclassable. Either these two methods should be modified to use the accessors that are already available, or Text should be declared as a final class, because as it exists today it is not subclassable.

      Attachments

        1. patch.txt
          1 kB
          Jim Kellerman

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            jimk Jim Kellerman
            jimk Jim Kellerman
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment