Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-1290

PrependingStringBuffer.equals(Object obj) is not reflexive

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.3.1
    • wicket
    • None

    Description

      PrependingStringBuffer.equals(Object obj) is not reflexive

      TestCase showing this:

      svn diff
      Index: jdk-1.4/wicket/src/test/java/org/apache/wicket/util/string/PrependingStringBufferTest.java
      ===================================================================
      — jdk-1.4/wicket/src/test/java/org/apache/wicket/util/string/PrependingStringBufferTest.java (Revision 612392)
      +++ jdk-1.4/wicket/src/test/java/org/apache/wicket/util/string/PrependingStringBufferTest.java (Arbeitskopie)
      @@ -56,4 +56,17 @@
      psb.prepend('1');
      assertEquals("1234567890", psb.toString());
      }
      +
      + /**
      + * Test <a
      + * href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#equals(java.lang.Object)">reflexivity<a>
      + * of the equals implementation.
      + *
      + * @throws Exception
      + */
      + public void testEqualsReflexive() throws Exception
      +

      { + PrependingStringBuffer psb = new PrependingStringBuffer("foo"); + assertTrue(psb.equals(psb)); + }

      }

      Attachments

        Activity

          People

            ivaynberg Igor Vaynberg
            funkattack Martin Funk
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: