Hadoop Common
  1. Hadoop Common
  2. HADOOP-5823

Handling javac "deprecated" warning for using UTF8

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.20.0
    • Fix Version/s: 0.21.0
    • Component/s: build
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      o.a.h.io.UTF8 is deprecated but is still used in multiple places. FSEditLog.java has 40 UTF8 related warnings. I don't think it is feasible to avoid using UTF8 in FSEditLog.java.

      Two options to get rid of these warnings :
      1. use @SupressWarnings at each use of UTF or for enclosing class.
      2. define a wrapper class DeprecatedUTF8 that is not @deprecated.

      I prefer the second option in this case since it keeps FSEditLog.java and other places clean and still makes it explicit that a deprecated class is used.

      This is part of spring cleaning effort to remove warnings in javac. I will attach a patch for the second option.

      1. HADOOP-5823.patch
        8 kB
        Raghu Angadi
      2. HADOOP-5823.patch
        8 kB
        Raghu Angadi

        Issue Links

          Activity

          Raghu Angadi created issue -
          Raghu Angadi made changes -
          Field Original Value New Value
          Attachment HADOOP-5823.patch [ 12408049 ]
          Raghu Angadi made changes -
          Attachment HADOOP-5823.patch [ 12408061 ]
          Raghu Angadi made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Hadoop Flags [Reviewed]
          Tsz Wo Nicholas Sze made changes -
          Link This issue relates to HADOOP-414 [ HADOOP-414 ]
          Raghu Angadi made changes -
          Status Patch Available [ 10002 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Raghu Angadi made changes -
          Link This issue relates to HADOOP-5866 [ HADOOP-5866 ]
          Tom White made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

            • Assignee:
              Raghu Angadi
              Reporter:
              Raghu Angadi
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development