[jdom-interest] Fun with IDEs

Bradley S. Huffman hip at cs.okstate.edu
Sat Jul 5 07:39:41 PDT 2003


I was looking at ElementFilter today and ran across this in it's equals method.

    public boolean equals(Object obj) {
        // Generated by IntelliJ
        if (this == obj) return true;
        if (!(obj instanceof ElementFilter)) return false;

        final ElementFilter filter = (ElementFilter) obj;

        if (name != null ? !name.equals(filter.name) : filter.name != null) return false;
        if (namespace != null ? !namespace.equals(filter.namespace) : filter.namespace != null) return false;

        return true;
    }

Looks like a canidate for a obfuscated code contest :-)

Brad



More information about the jdom-interest mailing list