#20 PKey.equals() returns wrong result

Rel_1.4.x
closed-fixed
Generator (29)
7
2005-03-24
2005-03-23
vpussel
No

Error in Java Code:

when comparing date fields, test of equality must call
date1.equals(date2). equals() works O.K. for string fields.

Example: wirkab is Date, rkSkz is char

return wirkab == pkey.getWirkab() && rkSkz ==
pkey.getRkSkz();

should be

return (wirkab == pkey.getWirkab() || wirkab.equals(
pkey.getWirkab()) ) && rkSkz == pkey.getRkSkz();

Discussion

  • vpussel

    vpussel - 2005-03-23
    • priority: 5 --> 3
     
  • vpussel

    vpussel - 2005-03-23

    Logged In: YES
    user_id=1205850

    work around: patch generated code

     
  • vpussel

    vpussel - 2005-03-23
    • priority: 3 --> 7
     
  • Dieter Moroff

    Dieter Moroff - 2005-03-24

    Logged In: YES
    user_id=555111

    Fixed in Rel 1.4.4

     
  • Dieter Moroff

    Dieter Moroff - 2005-03-24
    • status: open --> closed-fixed
     

Log in to post a comment.