Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-4422

Using equals() with different object types

    XMLWordPrintableJSON

Details

    Description

      In the RunningService.java the equals methods is "buggy":

          public boolean equals(Object o) {
              if (o != null && o instanceof RunningService) {
                  RunningService x = (RunningService) o;
                  if (this.model.equals(x) && this.mode == x.getMode() && this.startStamp.equals(x.getStartStamp())) {
                      return true;
                  }
              }
              return false;
          }
      

      this.model.equals compares to different classes.

      Attachments

        1. OFBIZ-4422.patch
          0.8 kB
          Dimitri Unruh

        Activity

          People

            sascha Sascha Schumann
            dunruh Dimitri Unruh
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: