diff --git a/src/main/java/com/sun/syndication/feed/synd/SyndFeedImpl.java b/src/main/java/com/sun/syndication/feed/synd/SyndFeedImpl.java index 64d8848..5da72a9 100644 --- a/src/main/java/com/sun/syndication/feed/synd/SyndFeedImpl.java +++ b/src/main/java/com/sun/syndication/feed/synd/SyndFeedImpl.java @@ -17,7 +17,6 @@ package com.sun.syndication.feed.synd; import com.sun.syndication.feed.CopyFrom; -import com.sun.syndication.feed.atom.Person; import com.sun.syndication.feed.impl.ObjectBean; import com.sun.syndication.feed.impl.CopyFromHelper; import com.sun.syndication.feed.WireFeed; @@ -169,16 +168,15 @@ public class SyndFeedImpl implements Serializable, SyndFeed { * */ public boolean equals(Object other) { - if (other == null) { + if (other == null || !(other instanceof SyndFeedImpl)) { return false; } - // can't use foreign markup in equals, due to JDOM equals impl - List fm = getForeignMarkup(); - setForeignMarkup(((SyndFeedImpl)other).getForeignMarkup()); - boolean ret = _objBean.equals(other); - // restore foreign markup - setForeignMarkup(fm); - return ret; + // can't use foreign markup in equals, due to JDOM equals impl + List fm = getForeignMarkup(); + setForeignMarkup(((SyndFeedImpl)other).getForeignMarkup()); + boolean ret = _objBean.equals(other); + setForeignMarkup(fm); // restore foreign markup + return ret; } /**