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

equals() in ResourceStreamRequestTarget compares the wrong filename

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 1.2.6
    • Fix Version/s: 1.2.7, 1.3.0-beta2
    • Component/s: wicket
    • Labels:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: