Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-19985

Redundant instanceof check in ProtobufUtil#getServiceException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • 1.4.1
    • 1.4.3
    • None
    • None
    • Reviewed

    Description

        public static IOException getServiceException(ServiceException e) {
          Throwable t = e;
          if (e instanceof ServiceException) {
            t = e.getCause();
      

      The instanceof check would always return true.

      This was reported by https://builds.apache.org/job/PreCommit-HBASE-Build/11495/artifact/patchprocess/branch-findbugs-hbase-client-warnings.html#Warnings_STYLE

      Attachments

        1. HBASE-19985.branch-1.v01.patch
          0.9 kB
          Artem Ervits
        2. HBASE-19985.v01.patch
          0.9 kB
          Artem Ervits

        Activity

          People

            dbist13 Artem Ervits
            yuzhihong@gmail.com Ted Yu
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: