Home Bug Reports

Documentation typo in 'Object Identity and Proxy Comparison in Java'

anesheretanesheret Member Andrei NeshcheretOrganization: Infinet WirelessProject: iCompany: internal system for production, etc.
Java Mapping for Interfaces - Ice 3.5 - ZeroC
Ice.ObjectPrx p1 = ...;        // Get a proxy...
Ice.ObjectPrx p2 = ...;        // Get another proxy...

if (p1.equals(p2)) {
    // p1 and p2 denote different objects       // WRONG!
} else {
    // p1 and p2 denote the same object         // Correct
}
should be
Ice.ObjectPrx p1 = ...;        // Get a proxy...
Ice.ObjectPrx p2 = ...;        // Get another proxy...

if (!p1.equals(p2)) {
    // p1 and p2 denote different objects       // WRONG!
} else {
    // p1 and p2 denote the same object         // Correct
}

Comments

  • matthewmatthew NL, CanadaMember Matthew NewhookOrganization: ZeroC, Inc.Project: Internet Communications Engine ✭✭✭
    Thanks for that!
Sign In or Register to comment.