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

equals() in ResourceStreamRequestTarget compares the wrong filename

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 1.2.6
    • 1.2.7, 1.3.0-beta2
    • wicket
    • None

    Description

      In ResourceStreamRequestTarget, the equals() method is:

      public boolean equals(Object obj)
      {
      if (obj instanceof ResourceStreamRequestTarget)

      { ResourceStreamRequestTarget that = (ResourceStreamRequestTarget)obj; return resourceStream.equals(that.resourceStream) && ((fileName != null) ? fileName.equals(this.fileName) : true); }

      return false;
      }

      Note that the fileName is comparing to itself. It should really be:

      fileName.equals(that.fileName)

      Attachments

        Activity

          People

            jcompagner Johan Compagner
            freemant Kent Tong
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: