Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-3765

Fix findbugs the warning in YARN-2928 branch, TimelineMetric

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • None
    • None
    • None
    • None

    Description

      There is one warning about reversing the return value of comparisons in YARN-2928 branch. This is a valid warning. Quoting the findbugs warning message:

      RV_NEGATING_RESULT_OF_COMPARETO: Negating the result of compareTo()/compare()

      This code negatives the return value of a compareTo or compare method. This is a questionable or bad programming practice, since if the return value is Integer.MIN_VALUE, negating the return value won't negate the sign of the result. You can achieve the same intended result by reversing the order of the operands rather than by negating the results.

      Attachments

        Issue Links

          Activity

            People

              gtcarrera9 Li Lu
              gtcarrera9 Li Lu
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: