Re: Deleted objects showing up a serialized data context

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Wed Jul 26 2006 - 19:33:21 EDT

  • Next message: Mike Kienenberger: "Re: Deleted objects showing up a serialized data context"

    +1 with this modification:

    public String toString() {
       return getClass().getName() + .. + System.identityHashCode(this);
    }

    On Jul 26, 2006, at 6:57 PM, Mike Kienenberger wrote:

    > Here's a proposal for a slightly-better toString() with no side
    > effects:
    >
    > private int unresolvedHashCode() {
    > return 15 + objectList.hashCode();
    > }
    >
    > public String toString() {
    > return getClass().getName() + .. +
    > Integer.toHexString(unresolvedHashCode());
    > }
    >
    >
    > On 7/26/06, Mike Kienenberger <mkienen..mail.com> wrote:
    >> On 7/26/06, Andrus Adamchik <andru..bjectstyle.org> wrote:
    >> > BTW LinkedList is hard to debug as it only shows one element at a
    >> > time, hiding the rest of the chain.
    >>
    >> Another thing that makes debugging ToManyList hard is that it calls
    >> resolvedObjectList() in all of the standard methods.
    >>
    >> I think we want to consider creating a custom toString() method that
    >> shows the object state as-is instead of using the default toString()
    >> which calls hashCode().
    >>
    >



    This archive was generated by hypermail 2.0.0 : Wed Jul 26 2006 - 19:33:42 EDT