Re: Deleted objects showing up a serialized data context

From: Mike Kienenberger (mkienen..mail.com)
Date: Wed Jul 26 2006 - 18:57:03 EDT

  • Next message: Andrus Adamchik: "Re: Deleted objects showing up a serialized data context"

    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 - 18:57:32 EDT