https://bz.apache.org/bugzilla/show_bug.cgi?id=63234

--- Comment #5 from David Gauntt <[email protected]> ---
I found a bug in my proposed code for XSSFFont.equals.  If hashCode() had not
been called before calling equals(), a NullPointException would have been
thrown.

The code below replaces the reference to _hashCode with a call to hashCode()

        @Override
        public boolean equals(Object o) {
                if (this == o) {
                        return true;
                }
                if (!(o instanceof XSSFFont)) {
                        return false;
                }

                //if (_hashCode != o.hashCode()) {

                if (hashCode() != o.hashCode()) {
                        return false;
                }

                XSSFFont cf = (XSSFFont) o;
                return toString().equals(cf.toString());
        }

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to