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

Boolean#getBoolean is used to parse value

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.3.2, 1.4.2, 1.2.7
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      In HColumnDescriptor of branch-1:

                value.set(Bytes.toBytes(
                    Boolean.getBoolean(Bytes.toString(value.get()))
      

      According to https://docs.oracle.com/javase/7/docs/api/java/lang/Boolean.html#getBoolean(java.lang.String):

      Returns true if and only if the system property named by the argument exists and is equal to the string "true"
      

      This was not the intention of the quoted code.

      This was discovered by Fortify.

        Attachments

          Activity

            People

            • Assignee:
              gubjanos Janos Gub
              Reporter:
              yuzhihong@gmail.com Ted Yu
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: