Uploaded image for project: 'Commons Lang'
  1. Commons Lang
  2. LANG-1081

DiffBuilder.append(String, Object left, Object right) does not do a left.equals(right) check

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 3.3.2
    • 3.4
    • lang.builder.*

    Description

      Only testing == without testing equals() seems wrong.
      Should an equals() test be added after determining that the parameters are not arrays?

      Attachments

        1. DiffBuilder-equals_test_in_append_Objects.patch
          0.4 kB
          Jonathan Baker
        2. DiffBuilderAppendsNonEqualObjectsFixed.java
          3 kB
          Jonathan Baker
        3. DiffBuilderAppendsNonEqualObjects.java
          2 kB
          Jonathan Baker

        Activity

          People

            britter Benedikt Ritter
            jbaker Jonathan Baker
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 1m
                1m
                Remaining:
                Remaining Estimate - 1m
                1m
                Logged:
                Time Spent - Not Specified
                Not Specified