diff --git a/cleanup.xml b/cleanup.xml new file mode 100644 index 0000000..40f9b7a --- /dev/null +++ b/cleanup.xml @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/formatter.xml b/formatter.xml new file mode 100644 index 0000000..e7ba7aa --- /dev/null +++ b/formatter.xml @@ -0,0 +1,291 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/java/com/sun/syndication/feed/WireFeed.java b/src/main/java/com/sun/syndication/feed/WireFeed.java index 2415b48..0a050e4 100644 --- a/src/main/java/com/sun/syndication/feed/WireFeed.java +++ b/src/main/java/com/sun/syndication/feed/WireFeed.java @@ -43,11 +43,11 @@ import com.sun.syndication.feed.module.impl.ModuleUtils; * */ public abstract class WireFeed implements Cloneable, Serializable, Extendable { - private final ObjectBean _objBean; - private String _feedType; - private String _encoding; - private List _modules; - private List _foreignMarkup; + private final ObjectBean objBean; + private String feedType; + private String encoding; + private List modules; + private List foreignMarkup; /** * Default constructor, for bean cloning purposes only. @@ -55,7 +55,7 @@ public abstract class WireFeed implements Cloneable, Serializable, Extendable { * */ protected WireFeed() { - this._objBean = new ObjectBean(this.getClass(), this); + objBean = new ObjectBean(this.getClass(), this); } /** @@ -67,7 +67,7 @@ public abstract class WireFeed implements Cloneable, Serializable, Extendable { */ protected WireFeed(final String type) { this(); - this._feedType = type; + feedType = type; } /** @@ -81,7 +81,7 @@ public abstract class WireFeed implements Cloneable, Serializable, Extendable { */ @Override public Object clone() throws CloneNotSupportedException { - return this._objBean.clone(); + return objBean.clone(); } /** @@ -104,7 +104,7 @@ public abstract class WireFeed implements Cloneable, Serializable, Extendable { // can't use foreign markup in equals, due to JDOM equals impl final List fm = getForeignMarkup(); setForeignMarkup(((WireFeed) other).getForeignMarkup()); - final boolean ret = this._objBean.equals(other); + final boolean ret = objBean.equals(other); // restore foreign markup setForeignMarkup(fm); return ret; @@ -121,7 +121,7 @@ public abstract class WireFeed implements Cloneable, Serializable, Extendable { */ @Override public int hashCode() { - return this._objBean.hashCode(); + return objBean.hashCode(); } /** @@ -133,7 +133,7 @@ public abstract class WireFeed implements Cloneable, Serializable, Extendable { */ @Override public String toString() { - return this._objBean.toString(); + return objBean.toString(); } /** @@ -145,7 +145,7 @@ public abstract class WireFeed implements Cloneable, Serializable, Extendable { * */ public void setFeedType(final String feedType) { - this._feedType = feedType; + this.feedType = feedType; } /** @@ -154,7 +154,7 @@ public abstract class WireFeed implements Cloneable, Serializable, Extendable { * @return the type of the feed. */ public String getFeedType() { - return this._feedType; + return feedType; } /** @@ -168,7 +168,7 @@ public abstract class WireFeed implements Cloneable, Serializable, Extendable { * */ public String getEncoding() { - return this._encoding; + return encoding; } /** @@ -182,7 +182,7 @@ public abstract class WireFeed implements Cloneable, Serializable, Extendable { * */ public void setEncoding(final String encoding) { - this._encoding = encoding; + this.encoding = encoding; } /** @@ -195,7 +195,7 @@ public abstract class WireFeed implements Cloneable, Serializable, Extendable { */ @Override public List getModules() { - return this._modules == null ? (this._modules = new ArrayList()) : this._modules; + return modules == null ? (modules = new ArrayList()) : modules; } /** @@ -208,7 +208,7 @@ public abstract class WireFeed implements Cloneable, Serializable, Extendable { */ @Override public void setModules(final List modules) { - this._modules = modules; + this.modules = modules; } /** @@ -220,7 +220,7 @@ public abstract class WireFeed implements Cloneable, Serializable, Extendable { */ @Override public Module getModule(final String uri) { - return ModuleUtils.getModule(this._modules, uri); + return ModuleUtils.getModule(modules, uri); } /** @@ -231,7 +231,7 @@ public abstract class WireFeed implements Cloneable, Serializable, Extendable { * */ public List getForeignMarkup() { - return this._foreignMarkup == null ? (this._foreignMarkup = new ArrayList()) : this._foreignMarkup; + return foreignMarkup == null ? (foreignMarkup = new ArrayList()) : foreignMarkup; } /** @@ -242,6 +242,6 @@ public abstract class WireFeed implements Cloneable, Serializable, Extendable { * */ public void setForeignMarkup(final List foreignMarkup) { - this._foreignMarkup = foreignMarkup; + this.foreignMarkup = foreignMarkup; } } diff --git a/src/main/java/com/sun/syndication/feed/atom/Category.java b/src/main/java/com/sun/syndication/feed/atom/Category.java index 8df3f8f..5cf0e73 100644 --- a/src/main/java/com/sun/syndication/feed/atom/Category.java +++ b/src/main/java/com/sun/syndication/feed/atom/Category.java @@ -28,12 +28,12 @@ import com.sun.syndication.feed.impl.ObjectBean; */ public class Category implements Cloneable, Serializable { - private final ObjectBean _objBean; + private final ObjectBean objBean; - private String _term; - private String _scheme; - private String _schemeResolved; - private String _label; + private String term; + private String scheme; + private String schemeResolved; + private String label; /** * Default constructor. All properties are set to null. @@ -41,7 +41,7 @@ public class Category implements Cloneable, Serializable { * */ public Category() { - this._objBean = new ObjectBean(this.getClass(), this); + objBean = new ObjectBean(this.getClass(), this); } /** @@ -55,7 +55,7 @@ public class Category implements Cloneable, Serializable { */ @Override public Object clone() throws CloneNotSupportedException { - return this._objBean.clone(); + return objBean.clone(); } /** @@ -72,7 +72,7 @@ public class Category implements Cloneable, Serializable { if (!(other instanceof Category)) { return false; } - return this._objBean.equals(other); + return objBean.equals(other); } /** @@ -86,7 +86,7 @@ public class Category implements Cloneable, Serializable { */ @Override public int hashCode() { - return this._objBean.hashCode(); + return objBean.hashCode(); } /** @@ -98,7 +98,7 @@ public class Category implements Cloneable, Serializable { */ @Override public String toString() { - return this._objBean.toString(); + return objBean.toString(); } /** @@ -108,7 +108,7 @@ public class Category implements Cloneable, Serializable { * @return Label for category. */ public String getLabel() { - return this._label; + return label; } /** @@ -118,7 +118,7 @@ public class Category implements Cloneable, Serializable { * @param label Label for category. */ public void setLabel(final String label) { - this._label = label; + this.label = label; } /** @@ -128,7 +128,7 @@ public class Category implements Cloneable, Serializable { * @return Scheme URI for category. */ public String getScheme() { - return this._scheme; + return scheme; } /** @@ -138,15 +138,15 @@ public class Category implements Cloneable, Serializable { * @param scheme Scheme URI for category. */ public void setScheme(final String scheme) { - this._scheme = scheme; + this.scheme = scheme; } public void setSchemeResolved(final String schemeResolved) { - this._schemeResolved = schemeResolved; + this.schemeResolved = schemeResolved; } public String getSchemeResolved() { - return this._schemeResolved != null ? this._schemeResolved : this._scheme; + return schemeResolved != null ? schemeResolved : scheme; } /** @@ -156,7 +156,7 @@ public class Category implements Cloneable, Serializable { * @return Term for category. */ public String getTerm() { - return this._term; + return term; } /** @@ -166,6 +166,6 @@ public class Category implements Cloneable, Serializable { * @param term Term for category. */ public void setTerm(final String term) { - this._term = term; + this.term = term; } } diff --git a/src/main/java/com/sun/syndication/feed/atom/Content.java b/src/main/java/com/sun/syndication/feed/atom/Content.java index 43c752a..88bd8ee 100644 --- a/src/main/java/com/sun/syndication/feed/atom/Content.java +++ b/src/main/java/com/sun/syndication/feed/atom/Content.java @@ -31,11 +31,11 @@ import com.sun.syndication.feed.impl.ObjectBean; */ public class Content implements Cloneable, Serializable { - private final ObjectBean _objBean; + private final ObjectBean objBean; - private String _type; - private String _value; - private String _src; + private String type; + private String value; + private String src; /** @since Atom 1.0 */ public static final String TEXT = "text"; @@ -55,7 +55,7 @@ public class Content implements Cloneable, Serializable { /** Atom 0.3 only */ public static final String ESCAPED = "escaped"; - private String _mode; + private String mode; private static final Set MODES = new HashSet(); static { MODES.add(XML); @@ -69,7 +69,7 @@ public class Content implements Cloneable, Serializable { * */ public Content() { - this._objBean = new ObjectBean(this.getClass(), this); + objBean = new ObjectBean(this.getClass(), this); } /** @@ -83,7 +83,7 @@ public class Content implements Cloneable, Serializable { */ @Override public Object clone() throws CloneNotSupportedException { - return this._objBean.clone(); + return objBean.clone(); } /** @@ -100,7 +100,7 @@ public class Content implements Cloneable, Serializable { if (!(other instanceof Content)) { return false; } - return this._objBean.equals(other); + return objBean.equals(other); } /** @@ -114,7 +114,7 @@ public class Content implements Cloneable, Serializable { */ @Override public int hashCode() { - return this._objBean.hashCode(); + return objBean.hashCode(); } /** @@ -126,7 +126,7 @@ public class Content implements Cloneable, Serializable { */ @Override public String toString() { - return this._objBean.toString(); + return objBean.toString(); } /** @@ -138,7 +138,7 @@ public class Content implements Cloneable, Serializable { * @since Atom 1.0 */ public String getType() { - return this._type; + return type; } /** @@ -150,7 +150,7 @@ public class Content implements Cloneable, Serializable { * @since Atom 1.0 */ public void setType(final String type) { - this._type = type; + this.type = type; } /** @@ -162,7 +162,7 @@ public class Content implements Cloneable, Serializable { * @return the content mode, null if none. */ public String getMode() { - return this._mode; + return mode; } /** @@ -178,7 +178,7 @@ public class Content implements Cloneable, Serializable { if (mode == null || !MODES.contains(mode)) { throw new IllegalArgumentException("Invalid mode [" + mode + "]"); } - this._mode = mode; + this.mode = mode; } /** @@ -191,7 +191,7 @@ public class Content implements Cloneable, Serializable { * */ public String getValue() { - return this._value; + return value; } /** @@ -204,7 +204,7 @@ public class Content implements Cloneable, Serializable { * */ public void setValue(final String value) { - this._value = value; + this.value = value; } /** @@ -215,7 +215,7 @@ public class Content implements Cloneable, Serializable { * @since Atom 1.0 */ public String getSrc() { - return this._src; + return src; } /** @@ -226,6 +226,6 @@ public class Content implements Cloneable, Serializable { * @since Atom 1.0 */ public void setSrc(final String src) { - this._src = src; + this.src = src; } } diff --git a/src/main/java/com/sun/syndication/feed/atom/Entry.java b/src/main/java/com/sun/syndication/feed/atom/Entry.java index aec7cff..d2ab156 100644 --- a/src/main/java/com/sun/syndication/feed/atom/Entry.java +++ b/src/main/java/com/sun/syndication/feed/atom/Entry.java @@ -36,24 +36,24 @@ import com.sun.syndication.feed.module.impl.ModuleUtils; * @author Dave Johnson (updated for Atom 1.0) */ public class Entry implements Cloneable, Serializable, Extendable { - private Content _summary; - private Content _title; - private Date _created; // Atom 0.3 only - private Date _published; // AKA issued - private Date _updated; // AKA modified - private Feed _source; - private List _alternateLinks; - private List _authors; - private List _categories; - private List _contents; - private List _contributors; - private List _foreignMarkup; - private List _modules; - private List _otherLinks; - private final ObjectBean _objBean; - private String _id; - private String _rights; - private String _xmlBase; + private Content summary; + private Content title; + private Date created; // Atom 0.3 only + private Date published; // AKA issued + private Date updated; // AKA modified + private Feed source; + private List alternateLinks; + private List authors; + private List categories; + private List contents; + private List contributors; + private List foreignMarkup; + private List modules; + private List otherLinks; + private final ObjectBean objBean; + private String id; + private String rights; + private String xmlBase; /** * Default constructor. All properties are set to null. @@ -61,7 +61,7 @@ public class Entry implements Cloneable, Serializable, Extendable { * */ public Entry() { - this._objBean = new ObjectBean(this.getClass(), this); + objBean = new ObjectBean(this.getClass(), this); } /** @@ -72,7 +72,7 @@ public class Entry implements Cloneable, Serializable, Extendable { * links to set, an empty list or null if none. */ public void setAlternateLinks(final List alternateLinks) { - this._alternateLinks = alternateLinks; + this.alternateLinks = alternateLinks; } /** @@ -83,7 +83,7 @@ public class Entry implements Cloneable, Serializable, Extendable { * list if none. */ public List getAlternateLinks() { - return this._alternateLinks == null ? (this._alternateLinks = new ArrayList()) : this._alternateLinks; + return alternateLinks == null ? (alternateLinks = new ArrayList()) : alternateLinks; } /** @@ -94,7 +94,7 @@ public class Entry implements Cloneable, Serializable, Extendable { * */ public void setAuthors(final List authors) { - this._authors = authors; + this.authors = authors; } /** @@ -105,7 +105,7 @@ public class Entry implements Cloneable, Serializable, Extendable { * */ public List getAuthors() { - return this._authors == null ? (this._authors = new ArrayList()) : this._authors; + return authors == null ? (authors = new ArrayList()) : authors; } /** @@ -116,7 +116,7 @@ public class Entry implements Cloneable, Serializable, Extendable { * @since Atom 1.0 */ public void setCategories(final List categories) { - this._categories = categories; + this.categories = categories; } /** @@ -127,7 +127,7 @@ public class Entry implements Cloneable, Serializable, Extendable { * @since Atom 1.0 */ public List getCategories() { - return this._categories == null ? (this._categories = new ArrayList()) : this._categories; + return categories == null ? (categories = new ArrayList()) : categories; } /** @@ -138,7 +138,7 @@ public class Entry implements Cloneable, Serializable, Extendable { * set, an empty list or null if none. */ public void setContents(final List contents) { - this._contents = contents; + this.contents = contents; } /** @@ -149,7 +149,7 @@ public class Entry implements Cloneable, Serializable, Extendable { * if none. */ public List getContents() { - return this._contents == null ? (this._contents = new ArrayList()) : this._contents; + return contents == null ? (contents = new ArrayList()) : contents; } /** @@ -161,7 +161,7 @@ public class Entry implements Cloneable, Serializable, Extendable { * */ public void setContributors(final List contributors) { - this._contributors = contributors; + this.contributors = contributors; } /** @@ -173,7 +173,7 @@ public class Entry implements Cloneable, Serializable, Extendable { * */ public List getContributors() { - return this._contributors == null ? (this._contributors = new ArrayList()) : this._contributors; + return contributors == null ? (contributors = new ArrayList()) : contributors; } /** @@ -183,7 +183,7 @@ public class Entry implements Cloneable, Serializable, Extendable { * @param created the entry created date, null if none. */ public void setCreated(final Date created) { - this._created = new Date(created.getTime()); + this.created = new Date(created.getTime()); } /** @@ -193,7 +193,7 @@ public class Entry implements Cloneable, Serializable, Extendable { * @return the entry created date, null if none. */ public Date getCreated() { - return this._created == null ? null : new Date(this._created.getTime()); + return created == null ? null : new Date(created.getTime()); } /** @@ -204,7 +204,7 @@ public class Entry implements Cloneable, Serializable, Extendable { * */ public void setForeignMarkup(final List foreignMarkup) { - this._foreignMarkup = foreignMarkup; + this.foreignMarkup = foreignMarkup; } /** @@ -215,7 +215,7 @@ public class Entry implements Cloneable, Serializable, Extendable { * */ public List getForeignMarkup() { - return this._foreignMarkup == null ? (this._foreignMarkup = new ArrayList()) : this._foreignMarkup; + return foreignMarkup == null ? (foreignMarkup = new ArrayList()) : foreignMarkup; } /** @@ -226,7 +226,7 @@ public class Entry implements Cloneable, Serializable, Extendable { * */ public void setId(final String id) { - this._id = id; + this.id = id; } /** @@ -237,7 +237,7 @@ public class Entry implements Cloneable, Serializable, Extendable { * */ public String getId() { - return this._id; + return id; } /** @@ -248,7 +248,7 @@ public class Entry implements Cloneable, Serializable, Extendable { * @param issued the entry issued date, null if none. */ public void setIssued(final Date issued) { - this._published = issued == null ? null : new Date(issued.getTime()); + published = issued == null ? null : new Date(issued.getTime()); } /** @@ -259,7 +259,7 @@ public class Entry implements Cloneable, Serializable, Extendable { * @return the entry issued date, null if none. */ public Date getIssued() { - return this._published == null ? null : new Date(this._published.getTime()); + return published == null ? null : new Date(published.getTime()); } /** @@ -290,7 +290,7 @@ public class Entry implements Cloneable, Serializable, Extendable { * @param modified the entry modified date, null if none. */ public void setModified(final Date modified) { - this._updated = modified == null ? null : new Date(modified.getTime()); + updated = modified == null ? null : new Date(modified.getTime()); } /** @@ -301,7 +301,7 @@ public class Entry implements Cloneable, Serializable, Extendable { * @return the entry modified date, null if none. */ public Date getModified() { - return this._updated == null ? null : new Date(this._updated.getTime()); + return updated == null ? null : new Date(updated.getTime()); } /** @@ -313,7 +313,7 @@ public class Entry implements Cloneable, Serializable, Extendable { */ @Override public Module getModule(final String uri) { - return ModuleUtils.getModule(this._modules, uri); + return ModuleUtils.getModule(modules, uri); } /** @@ -326,7 +326,7 @@ public class Entry implements Cloneable, Serializable, Extendable { */ @Override public void setModules(final List modules) { - this._modules = modules; + this.modules = modules; } /** @@ -339,7 +339,7 @@ public class Entry implements Cloneable, Serializable, Extendable { */ @Override public List getModules() { - return this._modules == null ? (this._modules = new ArrayList()) : this._modules; + return modules == null ? (modules = new ArrayList()) : modules; } /** @@ -350,7 +350,7 @@ public class Entry implements Cloneable, Serializable, Extendable { * links to set, an empty list or null if none. */ public void setOtherLinks(final List otherLinks) { - this._otherLinks = otherLinks; + this.otherLinks = otherLinks; } /** @@ -361,7 +361,7 @@ public class Entry implements Cloneable, Serializable, Extendable { * set, an empty list if none. */ public List getOtherLinks() { - return this._otherLinks == null ? (this._otherLinks = new ArrayList()) : this._otherLinks; + return otherLinks == null ? (otherLinks = new ArrayList()) : otherLinks; } /** @@ -372,7 +372,7 @@ public class Entry implements Cloneable, Serializable, Extendable { * @since Atom 1.0 */ public void setPublished(final Date published) { - this._published = published == null ? null : new Date(published.getTime()); + this.published = published == null ? null : new Date(published.getTime()); } /** @@ -383,7 +383,7 @@ public class Entry implements Cloneable, Serializable, Extendable { * @since Atom 1.0 */ public Date getPublished() { - return this._published == null ? null : new Date(this._published.getTime()); + return published == null ? null : new Date(published.getTime()); } /** @@ -394,7 +394,7 @@ public class Entry implements Cloneable, Serializable, Extendable { * @since Atom 1.0 */ public void setRights(final String rights) { - this._rights = rights; + this.rights = rights; } /** @@ -405,7 +405,7 @@ public class Entry implements Cloneable, Serializable, Extendable { * @since Atom 1.0 */ public String getRights() { - return this._rights; + return rights; } /** @@ -415,7 +415,7 @@ public class Entry implements Cloneable, Serializable, Extendable { * @param source The source to set. */ public void setSource(final Feed source) { - this._source = source; + this.source = source; } /** @@ -425,7 +425,7 @@ public class Entry implements Cloneable, Serializable, Extendable { * @return Returns the source. */ public Feed getSource() { - return this._source; + return source; } /** @@ -436,7 +436,7 @@ public class Entry implements Cloneable, Serializable, Extendable { * */ public void setSummary(final Content summary) { - this._summary = summary; + this.summary = summary; } /** @@ -447,7 +447,7 @@ public class Entry implements Cloneable, Serializable, Extendable { * */ public Content getSummary() { - return this._summary; + return summary; } /** @@ -458,11 +458,11 @@ public class Entry implements Cloneable, Serializable, Extendable { * */ public void setTitle(final String title) { - if (this._title == null) { - this._title = new Content(); + if (this.title == null) { + this.title = new Content(); } - this._title.setValue(title); + this.title.setValue(title); } /** @@ -473,8 +473,8 @@ public class Entry implements Cloneable, Serializable, Extendable { * */ public String getTitle() { - if (this._title != null) { - return this._title.getValue(); + if (title != null) { + return title.getValue(); } return null; @@ -488,7 +488,7 @@ public class Entry implements Cloneable, Serializable, Extendable { * */ public void setTitleEx(final Content title) { - this._title = title; + this.title = title; } /** @@ -499,7 +499,7 @@ public class Entry implements Cloneable, Serializable, Extendable { * */ public Content getTitleEx() { - return this._title; + return title; } /** @@ -510,7 +510,7 @@ public class Entry implements Cloneable, Serializable, Extendable { * @since Atom 1.0 */ public void setUpdated(final Date updated) { - this._updated = updated == null ? null : new Date(updated.getTime()); + this.updated = updated == null ? null : new Date(updated.getTime()); } /** @@ -521,7 +521,7 @@ public class Entry implements Cloneable, Serializable, Extendable { * @since Atom 1.0 */ public Date getUpdated() { - return this._updated == null ? null : new Date(this._updated.getTime()); + return updated == null ? null : new Date(updated.getTime()); } /** @@ -532,7 +532,7 @@ public class Entry implements Cloneable, Serializable, Extendable { * @since Atom 1.0 */ public void setXmlBase(final String xmlBase) { - this._xmlBase = xmlBase; + this.xmlBase = xmlBase; } /** @@ -543,7 +543,7 @@ public class Entry implements Cloneable, Serializable, Extendable { * @since Atom 1.0 */ public String getXmlBase() { - return this._xmlBase; + return xmlBase; } /** @@ -557,7 +557,7 @@ public class Entry implements Cloneable, Serializable, Extendable { */ @Override public Object clone() throws CloneNotSupportedException { - return this._objBean.clone(); + return objBean.clone(); } /** @@ -581,7 +581,7 @@ public class Entry implements Cloneable, Serializable, Extendable { final List fm = getForeignMarkup(); setForeignMarkup(((Entry) other).getForeignMarkup()); - final boolean ret = this._objBean.equals(other); + final boolean ret = objBean.equals(other); // restore foreign markup setForeignMarkup(fm); @@ -599,7 +599,7 @@ public class Entry implements Cloneable, Serializable, Extendable { */ @Override public int hashCode() { - return this._objBean.hashCode(); + return objBean.hashCode(); } /** @@ -611,11 +611,11 @@ public class Entry implements Cloneable, Serializable, Extendable { */ @Override public String toString() { - return this._objBean.toString(); + return objBean.toString(); } public Link findRelatedLink(final String relation) { - for (final Link l : this._otherLinks) { + for (final Link l : otherLinks) { if (relation.equals(l.getRel())) { return l; } diff --git a/src/main/java/com/sun/syndication/feed/atom/Feed.java b/src/main/java/com/sun/syndication/feed/atom/Feed.java index 1edf82f..a9b4d74 100644 --- a/src/main/java/com/sun/syndication/feed/atom/Feed.java +++ b/src/main/java/com/sun/syndication/feed/atom/Feed.java @@ -35,26 +35,26 @@ import com.sun.syndication.feed.module.impl.ModuleUtils; */ public class Feed extends WireFeed { - private String _xmlBase; - private List _categories; - private List _authors; - private List _contributors; - private Generator _generator; - private String _icon; - private String _id; - private String _logo; - private String _rights; // AKA copyright - private Content _subtitle; // AKA tagline - private Content _title; - private Date _updated; // AKA modified - private List _alternateLinks; - private List _otherLinks; - private List _entries; + private String xmlBase; + private List categories; + private List authors; + private List contributors; + private Generator generator; + private String icon; + private String id; + private String logo; + private String rights; // AKA copyright + private Content subtitle; // AKA tagline + private Content title; + private Date updated; // AKA modified + private List alternateLinks; + private List otherLinks; + private List entries; - private List _modules; + private List modules; - private Content _info; // Atom 0.3 only - private String _language; // Atom 0.3 only + private Content info; // Atom 0.3 only + private String language; // Atom 0.3 only /** * Default constructor, for bean cloning purposes only. @@ -83,7 +83,7 @@ public class Feed extends WireFeed { * */ public String getLanguage() { - return this._language; + return language; } /** @@ -94,7 +94,7 @@ public class Feed extends WireFeed { * */ public void setLanguage(final String language) { - this._language = language; + this.language = language; } /** @@ -105,8 +105,8 @@ public class Feed extends WireFeed { * */ public String getTitle() { - if (this._title != null) { - return this._title.getValue(); + if (title != null) { + return title.getValue(); } return null; } @@ -119,10 +119,10 @@ public class Feed extends WireFeed { * */ public void setTitle(final String title) { - if (this._title == null) { - this._title = new Content(); + if (this.title == null) { + this.title = new Content(); } - this._title.setValue(title); + this.title.setValue(title); } /** @@ -133,7 +133,7 @@ public class Feed extends WireFeed { * */ public Content getTitleEx() { - return this._title; + return title; } /** @@ -144,7 +144,7 @@ public class Feed extends WireFeed { * */ public void setTitleEx(final Content title) { - this._title = title; + this.title = title; } /** @@ -155,7 +155,7 @@ public class Feed extends WireFeed { * list if none. */ public List getAlternateLinks() { - return this._alternateLinks == null ? (this._alternateLinks = new ArrayList()) : this._alternateLinks; + return alternateLinks == null ? (alternateLinks = new ArrayList()) : alternateLinks; } /** @@ -166,7 +166,7 @@ public class Feed extends WireFeed { * links to set, an empty list or null if none. */ public void setAlternateLinks(final List alternateLinks) { - this._alternateLinks = alternateLinks; + this.alternateLinks = alternateLinks; } /** @@ -177,7 +177,7 @@ public class Feed extends WireFeed { * ones), an empty list if none. */ public List getOtherLinks() { - return this._otherLinks == null ? (this._otherLinks = new ArrayList()) : this._otherLinks; + return otherLinks == null ? (otherLinks = new ArrayList()) : otherLinks; } /** @@ -189,7 +189,7 @@ public class Feed extends WireFeed { * none. */ public void setOtherLinks(final List otherLinks) { - this._otherLinks = otherLinks; + this.otherLinks = otherLinks; } /** @@ -200,7 +200,7 @@ public class Feed extends WireFeed { * */ public List getAuthors() { - return this._authors == null ? (this._authors = new ArrayList()) : this._authors; + return authors == null ? (authors = new ArrayList()) : authors; } /** @@ -211,7 +211,7 @@ public class Feed extends WireFeed { * */ public void setAuthors(final List authors) { - this._authors = authors; + this.authors = authors; } /** @@ -223,7 +223,7 @@ public class Feed extends WireFeed { * */ public List getContributors() { - return this._contributors == null ? (this._contributors = new ArrayList()) : this._contributors; + return contributors == null ? (contributors = new ArrayList()) : contributors; } /** @@ -235,7 +235,7 @@ public class Feed extends WireFeed { * */ public void setContributors(final List contributors) { - this._contributors = contributors; + this.contributors = contributors; } /** @@ -245,7 +245,7 @@ public class Feed extends WireFeed { * @return the feed tag line, null if none. */ public Content getTagline() { - return this._subtitle; + return subtitle; } /** @@ -256,7 +256,7 @@ public class Feed extends WireFeed { * @param tagline the feed tagline to set, null if none. */ public void setTagline(final Content tagline) { - this._subtitle = tagline; + subtitle = tagline; } /** @@ -267,7 +267,7 @@ public class Feed extends WireFeed { * */ public String getId() { - return this._id; + return id; } /** @@ -278,7 +278,7 @@ public class Feed extends WireFeed { * */ public void setId(final String id) { - this._id = id; + this.id = id; } /** @@ -289,7 +289,7 @@ public class Feed extends WireFeed { * */ public Generator getGenerator() { - return this._generator; + return generator; } /** @@ -300,7 +300,7 @@ public class Feed extends WireFeed { * */ public void setGenerator(final Generator generator) { - this._generator = generator; + this.generator = generator; } /** @@ -310,7 +310,7 @@ public class Feed extends WireFeed { * @return the feed copyright, null if none. */ public String getCopyright() { - return this._rights; + return rights; } /** @@ -321,7 +321,7 @@ public class Feed extends WireFeed { * @param copyright the feed copyright to set, null if none. */ public void setCopyright(final String copyright) { - this._rights = copyright; + rights = copyright; } /** @@ -331,7 +331,7 @@ public class Feed extends WireFeed { * @return the feed info, null if none. */ public Content getInfo() { - return this._info; + return info; } /** @@ -341,7 +341,7 @@ public class Feed extends WireFeed { * @param info the feed info to set, null if none. */ public void setInfo(final Content info) { - this._info = info; + this.info = info; } /** @@ -351,7 +351,7 @@ public class Feed extends WireFeed { * @return the feed modified date, null if none. */ public Date getModified() { - return this._updated; + return updated; } /** @@ -362,7 +362,7 @@ public class Feed extends WireFeed { * @param modified the feed modified date to set, null if none. */ public void setModified(final Date modified) { - this._updated = modified; + updated = modified; } /** @@ -374,7 +374,7 @@ public class Feed extends WireFeed { * */ public List getEntries() { - return this._entries == null ? (this._entries = new ArrayList()) : this._entries; + return entries == null ? (entries = new ArrayList()) : entries; } /** @@ -386,7 +386,7 @@ public class Feed extends WireFeed { * */ public void setEntries(final List entries) { - this._entries = entries; + this.entries = entries; } /** @@ -399,7 +399,7 @@ public class Feed extends WireFeed { */ @Override public List getModules() { - return this._modules == null ? (this._modules = new ArrayList()) : this._modules; + return modules == null ? (modules = new ArrayList()) : modules; } /** @@ -412,7 +412,7 @@ public class Feed extends WireFeed { */ @Override public void setModules(final List modules) { - this._modules = modules; + this.modules = modules; } /** @@ -424,7 +424,7 @@ public class Feed extends WireFeed { */ @Override public Module getModule(final String uri) { - return ModuleUtils.getModule(this._modules, uri); + return ModuleUtils.getModule(modules, uri); } /** @@ -435,7 +435,7 @@ public class Feed extends WireFeed { * @since Atom 1.0 */ public List getCategories() { - return this._categories == null ? (this._categories = new ArrayList()) : this._categories; + return categories == null ? (categories = new ArrayList()) : categories; } /** @@ -446,7 +446,7 @@ public class Feed extends WireFeed { * @since Atom 1.0 */ public void setCategories(final List categories) { - this._categories = categories; + this.categories = categories; } /** @@ -457,7 +457,7 @@ public class Feed extends WireFeed { * @since Atom 1.0 */ public String getIcon() { - return this._icon; + return icon; } /** @@ -468,7 +468,7 @@ public class Feed extends WireFeed { * @since Atom 1.0 */ public void setIcon(final String icon) { - this._icon = icon; + this.icon = icon; } /** @@ -479,7 +479,7 @@ public class Feed extends WireFeed { * @since Atom 1.0 */ public String getLogo() { - return this._logo; + return logo; } /** @@ -490,7 +490,7 @@ public class Feed extends WireFeed { * @since Atom 1.0 */ public void setLogo(final String logo) { - this._logo = logo; + this.logo = logo; } /** @@ -501,7 +501,7 @@ public class Feed extends WireFeed { * @since Atom 1.0 */ public String getRights() { - return this._rights; + return rights; } /** @@ -512,7 +512,7 @@ public class Feed extends WireFeed { * @since Atom 1.0 */ public void setRights(final String rights) { - this._rights = rights; + this.rights = rights; } /** @@ -523,7 +523,7 @@ public class Feed extends WireFeed { * @since Atom 1.0 */ public Content getSubtitle() { - return this._subtitle; + return subtitle; } /** @@ -534,7 +534,7 @@ public class Feed extends WireFeed { * @since Atom 1.0 */ public void setSubtitle(final Content subtitle) { - this._subtitle = subtitle; + this.subtitle = subtitle; } /** @@ -545,7 +545,7 @@ public class Feed extends WireFeed { * @since Atom 1.0 */ public Date getUpdated() { - return this._updated; + return updated; } /** @@ -556,7 +556,7 @@ public class Feed extends WireFeed { * @since Atom 1.0 */ public void setUpdated(final Date updated) { - this._updated = updated; + this.updated = updated; } /** @@ -567,7 +567,7 @@ public class Feed extends WireFeed { * @since Atom 1.0 */ public String getXmlBase() { - return this._xmlBase; + return xmlBase; } /** @@ -578,6 +578,6 @@ public class Feed extends WireFeed { * @since Atom 1.0 */ public void setXmlBase(final String xmlBase) { - this._xmlBase = xmlBase; + this.xmlBase = xmlBase; } } diff --git a/src/main/java/com/sun/syndication/feed/atom/Generator.java b/src/main/java/com/sun/syndication/feed/atom/Generator.java index b7938ff..09e698c 100644 --- a/src/main/java/com/sun/syndication/feed/atom/Generator.java +++ b/src/main/java/com/sun/syndication/feed/atom/Generator.java @@ -28,10 +28,10 @@ import com.sun.syndication.feed.impl.ObjectBean; * */ public class Generator implements Cloneable, Serializable { - private final ObjectBean _objBean; - private String _url; - private String _version; - private String _value; + private final ObjectBean objBean; + private String url; + private String version; + private String value; /** * Default constructor. All properties are set to null. @@ -39,7 +39,7 @@ public class Generator implements Cloneable, Serializable { * */ public Generator() { - this._objBean = new ObjectBean(this.getClass(), this); + objBean = new ObjectBean(this.getClass(), this); } /** @@ -53,7 +53,7 @@ public class Generator implements Cloneable, Serializable { */ @Override public Object clone() throws CloneNotSupportedException { - return this._objBean.clone(); + return objBean.clone(); } /** @@ -70,7 +70,7 @@ public class Generator implements Cloneable, Serializable { if (!(other instanceof Generator)) { return false; } - return this._objBean.equals(other); + return objBean.equals(other); } /** @@ -84,7 +84,7 @@ public class Generator implements Cloneable, Serializable { */ @Override public int hashCode() { - return this._objBean.hashCode(); + return objBean.hashCode(); } /** @@ -96,7 +96,7 @@ public class Generator implements Cloneable, Serializable { */ @Override public String toString() { - return this._objBean.toString(); + return objBean.toString(); } /** @@ -107,7 +107,7 @@ public class Generator implements Cloneable, Serializable { * */ public String getUrl() { - return this._url; + return url; } /** @@ -118,7 +118,7 @@ public class Generator implements Cloneable, Serializable { * */ public void setUrl(final String url) { - this._url = url; + this.url = url; } /** @@ -129,7 +129,7 @@ public class Generator implements Cloneable, Serializable { * */ public String getVersion() { - return this._version; + return version; } /** @@ -140,7 +140,7 @@ public class Generator implements Cloneable, Serializable { * */ public void setVersion(final String version) { - this._version = version; + this.version = version; } /** @@ -151,7 +151,7 @@ public class Generator implements Cloneable, Serializable { * */ public String getValue() { - return this._value; + return value; } /** @@ -162,7 +162,7 @@ public class Generator implements Cloneable, Serializable { * */ public void setValue(final String value) { - this._value = value; + this.value = value; } } diff --git a/src/main/java/com/sun/syndication/feed/atom/Link.java b/src/main/java/com/sun/syndication/feed/atom/Link.java index a98f500..72fa493 100644 --- a/src/main/java/com/sun/syndication/feed/atom/Link.java +++ b/src/main/java/com/sun/syndication/feed/atom/Link.java @@ -29,15 +29,15 @@ import com.sun.syndication.feed.impl.ObjectBean; */ public class Link implements Cloneable, Serializable { - private final ObjectBean _objBean; + private final ObjectBean objBean; - private String _href; - private String _hrefResolved; - private String _rel = "alternate"; - private String _type; - private String _hreflang; - private String _title; - private long _length; + private String href; + private String hrefResolved; + private String rel = "alternate"; + private String type; + private String hreflang; + private String title; + private long length; /** * Default constructor. All properties are set to null. @@ -45,7 +45,7 @@ public class Link implements Cloneable, Serializable { * */ public Link() { - this._objBean = new ObjectBean(this.getClass(), this); + objBean = new ObjectBean(this.getClass(), this); } /** @@ -59,7 +59,7 @@ public class Link implements Cloneable, Serializable { */ @Override public Object clone() throws CloneNotSupportedException { - return this._objBean.clone(); + return objBean.clone(); } /** @@ -73,7 +73,7 @@ public class Link implements Cloneable, Serializable { */ @Override public boolean equals(final Object other) { - return this._objBean.equals(other); + return objBean.equals(other); } /** @@ -87,7 +87,7 @@ public class Link implements Cloneable, Serializable { */ @Override public int hashCode() { - return this._objBean.hashCode(); + return objBean.hashCode(); } /** @@ -99,7 +99,7 @@ public class Link implements Cloneable, Serializable { */ @Override public String toString() { - return this._objBean.toString(); + return objBean.toString(); } /** @@ -110,7 +110,7 @@ public class Link implements Cloneable, Serializable { * */ public String getRel() { - return this._rel; + return rel; } /** @@ -122,7 +122,7 @@ public class Link implements Cloneable, Serializable { */ public void setRel(final String rel) { // TODO add check, ask P@ about the check - this._rel = rel; + this.rel = rel; } /** @@ -133,7 +133,7 @@ public class Link implements Cloneable, Serializable { * */ public String getType() { - return this._type; + return type; } /** @@ -144,7 +144,7 @@ public class Link implements Cloneable, Serializable { * */ public void setType(final String type) { - this._type = type; + this.type = type; } /** @@ -155,7 +155,7 @@ public class Link implements Cloneable, Serializable { * */ public String getHref() { - return this._href; + return href; } /** @@ -166,15 +166,15 @@ public class Link implements Cloneable, Serializable { * */ public void setHref(final String href) { - this._href = href; + this.href = href; } public void setHrefResolved(final String hrefResolved) { - this._hrefResolved = hrefResolved; + this.hrefResolved = hrefResolved; } public String getHrefResolved() { - return this._hrefResolved != null ? this._hrefResolved : this._href; + return hrefResolved != null ? hrefResolved : href; } /** @@ -185,7 +185,7 @@ public class Link implements Cloneable, Serializable { * */ public String getTitle() { - return this._title; + return title; } /** @@ -196,7 +196,7 @@ public class Link implements Cloneable, Serializable { * */ public void setTitle(final String title) { - this._title = title; + this.title = title; } /** @@ -207,7 +207,7 @@ public class Link implements Cloneable, Serializable { * @since Atom 1.0 */ public String getHreflang() { - return this._hreflang; + return hreflang; } /** @@ -218,7 +218,7 @@ public class Link implements Cloneable, Serializable { * @since Atom 1.0 */ public void setHreflang(final String hreflang) { - this._hreflang = hreflang; + this.hreflang = hreflang; } /** @@ -228,7 +228,7 @@ public class Link implements Cloneable, Serializable { * @return Returns the length. */ public long getLength() { - return this._length; + return length; } /** @@ -238,6 +238,6 @@ public class Link implements Cloneable, Serializable { * @param length The length to set. */ public void setLength(final long length) { - this._length = length; + this.length = length; } } diff --git a/src/main/java/com/sun/syndication/feed/atom/Person.java b/src/main/java/com/sun/syndication/feed/atom/Person.java index 3a0fdbb..76bbc71 100644 --- a/src/main/java/com/sun/syndication/feed/atom/Person.java +++ b/src/main/java/com/sun/syndication/feed/atom/Person.java @@ -34,13 +34,13 @@ import com.sun.syndication.feed.module.impl.ModuleUtils; */ public class Person implements Cloneable, Serializable, Extendable { - private final ObjectBean _objBean; + private final ObjectBean objBean; - private String _name; - private String _uri; // since Atom 1.0 (was called url) - private String _uriResolved; - private String _email; - private List _modules; + private String name; + private String uri; // since Atom 1.0 (was called url) + private String uriResolved; + private String email; + private List modules; /** * Default constructor. All properties are set to null. @@ -48,7 +48,7 @@ public class Person implements Cloneable, Serializable, Extendable { * */ public Person() { - this._objBean = new ObjectBean(this.getClass(), this); + objBean = new ObjectBean(this.getClass(), this); } /** @@ -62,7 +62,7 @@ public class Person implements Cloneable, Serializable, Extendable { */ @Override public Object clone() throws CloneNotSupportedException { - return this._objBean.clone(); + return objBean.clone(); } /** @@ -76,7 +76,7 @@ public class Person implements Cloneable, Serializable, Extendable { */ @Override public boolean equals(final Object other) { - return this._objBean.equals(other); + return objBean.equals(other); } /** @@ -90,7 +90,7 @@ public class Person implements Cloneable, Serializable, Extendable { */ @Override public int hashCode() { - return this._objBean.hashCode(); + return objBean.hashCode(); } /** @@ -102,7 +102,7 @@ public class Person implements Cloneable, Serializable, Extendable { */ @Override public String toString() { - return this._objBean.toString(); + return objBean.toString(); } /** @@ -113,7 +113,7 @@ public class Person implements Cloneable, Serializable, Extendable { * */ public String getName() { - return this._name; + return name; } /** @@ -124,7 +124,7 @@ public class Person implements Cloneable, Serializable, Extendable { * */ public void setName(final String name) { - this._name = name; + this.name = name; } /** @@ -134,7 +134,7 @@ public class Person implements Cloneable, Serializable, Extendable { * @return the person URL, null if none. */ public String getUrl() { - return this._uri; + return uri; } /** @@ -144,15 +144,15 @@ public class Person implements Cloneable, Serializable, Extendable { * @param url the person URL, null if none. */ public void setUrl(final String url) { - this._uri = url; + uri = url; } public void setUriResolved(final String uriResolved) { - this._uriResolved = uriResolved; + this.uriResolved = uriResolved; } public String getUriResolved(final String resolveURI) { - return this._uriResolved != null ? this._uriResolved : this._uri; + return uriResolved != null ? uriResolved : uri; } /** @@ -163,7 +163,7 @@ public class Person implements Cloneable, Serializable, Extendable { * */ public String getEmail() { - return this._email; + return email; } /** @@ -174,7 +174,7 @@ public class Person implements Cloneable, Serializable, Extendable { * */ public void setEmail(final String email) { - this._email = email; + this.email = email; } /** @@ -185,7 +185,7 @@ public class Person implements Cloneable, Serializable, Extendable { * @since Atom 1.0 */ public String getUri() { - return this._uri; + return uri; } /** @@ -196,7 +196,7 @@ public class Person implements Cloneable, Serializable, Extendable { * @since Atom 1.0 */ public void setUri(final String uri) { - this._uri = uri; + this.uri = uri; } /** @@ -209,7 +209,7 @@ public class Person implements Cloneable, Serializable, Extendable { */ @Override public List getModules() { - return this._modules == null ? (this._modules = new ArrayList()) : this._modules; + return modules == null ? (modules = new ArrayList()) : modules; } /** @@ -222,7 +222,7 @@ public class Person implements Cloneable, Serializable, Extendable { */ @Override public void setModules(final List modules) { - this._modules = modules; + this.modules = modules; } /** @@ -234,7 +234,7 @@ public class Person implements Cloneable, Serializable, Extendable { */ @Override public Module getModule(final String uri) { - return ModuleUtils.getModule(this._modules, uri); + return ModuleUtils.getModule(modules, uri); } } diff --git a/src/main/java/com/sun/syndication/feed/impl/BeanIntrospector.java b/src/main/java/com/sun/syndication/feed/impl/BeanIntrospector.java index 2800f84..43c1430 100644 --- a/src/main/java/com/sun/syndication/feed/impl/BeanIntrospector.java +++ b/src/main/java/com/sun/syndication/feed/impl/BeanIntrospector.java @@ -41,13 +41,13 @@ import java.util.Set; */ public class BeanIntrospector { - private static final Map _introspected = new HashMap(); + private static final Map introspected = new HashMap(); public static synchronized PropertyDescriptor[] getPropertyDescriptors(final Class klass) throws IntrospectionException { - PropertyDescriptor[] descriptors = (PropertyDescriptor[]) _introspected.get(klass); + PropertyDescriptor[] descriptors = (PropertyDescriptor[]) introspected.get(klass); if (descriptors == null) { descriptors = getPDs(klass); - _introspected.put(klass, descriptors); + introspected.put(klass, descriptors); } return descriptors; } diff --git a/src/main/java/com/sun/syndication/feed/impl/CloneableBean.java b/src/main/java/com/sun/syndication/feed/impl/CloneableBean.java index 26fec20..afc9dc6 100644 --- a/src/main/java/com/sun/syndication/feed/impl/CloneableBean.java +++ b/src/main/java/com/sun/syndication/feed/impl/CloneableBean.java @@ -45,8 +45,8 @@ public class CloneableBean implements Serializable, Cloneable { private static final Class[] NO_PARAMS_DEF = new Class[0]; private static final Object[] NO_PARAMS = new Object[0]; - private final Object _obj; - private Set _ignoreProperties; + private final Object obj; + private Set ignoreProperties; /** * Default constructor. @@ -56,7 +56,7 @@ public class CloneableBean implements Serializable, Cloneable { * */ protected CloneableBean() { - this._obj = this; + obj = this; } /** @@ -66,14 +66,14 @@ public class CloneableBean implements Serializable, Cloneable { *

* * public class Foo implements Cloneable { - * private CloneableBean _cloneableBean; + * private CloneableBean cloneableBean; * * public Foo() { - * _cloneableBean = new CloneableBean(this); + * cloneableBean = new CloneableBean(this); * } * * public Object clone() throws CloneNotSupportedException { - * return _cloneableBean.beanClone(); + * return cloneableBean.beanClone(); * } * * } @@ -104,8 +104,8 @@ public class CloneableBean implements Serializable, Cloneable { * */ public CloneableBean(final Object obj, final Set ignoreProperties) { - this._obj = obj; - this._ignoreProperties = ignoreProperties != null ? ignoreProperties : Collections.EMPTY_SET; + this.obj = obj; + this.ignoreProperties = ignoreProperties != null ? ignoreProperties : Collections.EMPTY_SET; } /** @@ -142,8 +142,8 @@ public class CloneableBean implements Serializable, Cloneable { public Object beanClone() throws CloneNotSupportedException { Object clonedBean; try { - clonedBean = this._obj.getClass().newInstance(); - final PropertyDescriptor[] pds = BeanIntrospector.getPropertyDescriptors(this._obj.getClass()); + clonedBean = obj.getClass().newInstance(); + final PropertyDescriptor[] pds = BeanIntrospector.getPropertyDescriptors(obj.getClass()); if (pds != null) { for (int i = 0; i < pds.length; i++) { final Method pReadMethod = pds[i].getReadMethod(); @@ -154,7 +154,7 @@ public class CloneableBean implements Serializable, Cloneable { // and // setter // methods - !this._ignoreProperties.contains(pds[i].getName()) && // is + !ignoreProperties.contains(pds[i].getName()) && // is // not // in // the @@ -173,7 +173,7 @@ public class CloneableBean implements Serializable, Cloneable { // that // take // parameters - Object value = pReadMethod.invoke(this._obj, NO_PARAMS); + Object value = pReadMethod.invoke(obj, NO_PARAMS); if (value != null) { value = doClone(value); pWriteMethod.invoke(clonedBean, new Object[] { value }); @@ -186,7 +186,7 @@ public class CloneableBean implements Serializable, Cloneable { } catch (final Exception ex) { System.out.println(ex); ex.printStackTrace(System.out); - throw new CloneNotSupportedException("Cannot clone a " + this._obj.getClass() + " object"); + throw new CloneNotSupportedException("Cannot clone a " + obj.getClass() + " object"); } return clonedBean; } diff --git a/src/main/java/com/sun/syndication/feed/impl/CopyFromHelper.java b/src/main/java/com/sun/syndication/feed/impl/CopyFromHelper.java index 09cfd08..084fa6a 100644 --- a/src/main/java/com/sun/syndication/feed/impl/CopyFromHelper.java +++ b/src/main/java/com/sun/syndication/feed/impl/CopyFromHelper.java @@ -36,19 +36,19 @@ import com.sun.syndication.feed.CopyFrom; public class CopyFromHelper { private static final Object[] NO_PARAMS = new Object[0]; - private final Class _beanInterfaceClass; - private final Map _baseInterfaceMap; // ENTRIES(propertyName,interface.class) - private final Map _baseImplMap; // ENTRIES(interface.class,implementation.class) + private final Class beanInterfaceClass; + private final Map baseInterfaceMap; // ENTRIES(propertyName,interface.class) + private final Map baseImplMap; // ENTRIES(interface.class,implementation.class) public CopyFromHelper(final Class beanInterfaceClass, final Map basePropInterfaceMap, final Map basePropClassImplMap) { - this._beanInterfaceClass = beanInterfaceClass; - this._baseInterfaceMap = basePropInterfaceMap; - this._baseImplMap = basePropClassImplMap; + this.beanInterfaceClass = beanInterfaceClass; + baseInterfaceMap = basePropInterfaceMap; + baseImplMap = basePropClassImplMap; } public void copy(final Object target, final Object source) { try { - final PropertyDescriptor[] pds = BeanIntrospector.getPropertyDescriptors(this._beanInterfaceClass); + final PropertyDescriptor[] pds = BeanIntrospector.getPropertyDescriptors(beanInterfaceClass); if (pds != null) { for (final PropertyDescriptor pd : pds) { final String propertyName = pd.getName(); @@ -70,7 +70,7 @@ public class CopyFromHelper { // that // take // parameters - this._baseInterfaceMap.containsKey(propertyName)) { // only + baseInterfaceMap.containsKey(propertyName)) { // only // copies // properties // defined @@ -78,7 +78,7 @@ public class CopyFromHelper { // copyFrom-able Object value = pReadMethod.invoke(source, NO_PARAMS); if (value != null) { - final Class baseInterface = (Class) this._baseInterfaceMap.get(propertyName); + final Class baseInterface = (Class) baseInterfaceMap.get(propertyName); value = doCopy(value, baseInterface); pWriteMethod.invoke(target, new Object[] { value }); } @@ -91,10 +91,10 @@ public class CopyFromHelper { } private CopyFrom createInstance(final Class interfaceClass) throws Exception { - if (this._baseImplMap.get(interfaceClass) == null) { + if (baseImplMap.get(interfaceClass) == null) { return null; } else { - return (CopyFrom) ((Class) this._baseImplMap.get(interfaceClass)).newInstance(); + return (CopyFrom) ((Class) baseImplMap.get(interfaceClass)).newInstance(); } } diff --git a/src/main/java/com/sun/syndication/feed/impl/EqualsBean.java b/src/main/java/com/sun/syndication/feed/impl/EqualsBean.java index ea192a7..cea3f78 100644 --- a/src/main/java/com/sun/syndication/feed/impl/EqualsBean.java +++ b/src/main/java/com/sun/syndication/feed/impl/EqualsBean.java @@ -40,8 +40,8 @@ public class EqualsBean implements Serializable { private static final Object[] NO_PARAMS = new Object[0]; - private final Class _beanClass; - private final Object _obj; + private final Class beanClass; + private final Object obj; /** * Default constructor. @@ -53,8 +53,8 @@ public class EqualsBean implements Serializable { * */ protected EqualsBean(final Class beanClass) { - this._beanClass = beanClass; - this._obj = this; + this.beanClass = beanClass; + obj = this; } /** @@ -64,18 +64,18 @@ public class EqualsBean implements Serializable { *

* * public class Foo implements FooI { - * private EqualsBean _equalsBean; + * private EqualsBean equalsBean; * * public Foo() { - * _equalsBean = new EqualsBean(FooI.class); + * equalsBean = new EqualsBean(FooI.class); * } * * public boolean equals(Object obj) { - * return _equalsBean.beanEquals(obj); + * return equalsBean.beanEquals(obj); * } * * public int hashCode() { - * return _equalsBean.beanHashCode(); + * return equalsBean.beanHashCode(); * } * * } @@ -90,8 +90,8 @@ public class EqualsBean implements Serializable { if (!beanClass.isInstance(obj)) { throw new IllegalArgumentException(obj.getClass() + " is not instance of " + beanClass); } - this._beanClass = beanClass; - this._obj = obj; + this.beanClass = beanClass; + this.obj = obj; } /** @@ -127,7 +127,7 @@ public class EqualsBean implements Serializable { * */ public boolean beanEquals(final Object obj) { - final Object bean1 = this._obj; + final Object bean1 = this.obj; final Object bean2 = obj; boolean eq; if (bean1 == null && bean2 == null) { @@ -135,12 +135,12 @@ public class EqualsBean implements Serializable { } else if (bean1 == null || bean2 == null) { eq = false; } else { - if (!this._beanClass.isInstance(bean2)) { + if (!beanClass.isInstance(bean2)) { eq = false; } else { eq = true; try { - final PropertyDescriptor[] pds = BeanIntrospector.getPropertyDescriptors(this._beanClass); + final PropertyDescriptor[] pds = BeanIntrospector.getPropertyDescriptors(beanClass); if (pds != null) { for (int i = 0; eq && i < pds.length; i++) { final Method pReadMethod = pds[i].getReadMethod(); @@ -208,7 +208,7 @@ public class EqualsBean implements Serializable { * */ public int beanHashCode() { - return this._obj.toString().hashCode(); + return obj.toString().hashCode(); } private boolean doEquals(final Object obj1, final Object obj2) { diff --git a/src/main/java/com/sun/syndication/feed/impl/ObjectBean.java b/src/main/java/com/sun/syndication/feed/impl/ObjectBean.java index dfb12e2..47266af 100644 --- a/src/main/java/com/sun/syndication/feed/impl/ObjectBean.java +++ b/src/main/java/com/sun/syndication/feed/impl/ObjectBean.java @@ -43,9 +43,9 @@ import java.util.Set; * */ public class ObjectBean implements Serializable, Cloneable { - private final EqualsBean _equalsBean; - private final ToStringBean _toStringBean; - private final CloneableBean _cloneableBean; + private final EqualsBean equalsBean; + private final ToStringBean toStringBean; + private final CloneableBean cloneableBean; /** * Constructor. @@ -75,9 +75,9 @@ public class ObjectBean implements Serializable, Cloneable { * */ public ObjectBean(final Class beanClass, final Object obj, final Set ignoreProperties) { - this._equalsBean = new EqualsBean(beanClass, obj); - this._toStringBean = new ToStringBean(beanClass, obj); - this._cloneableBean = new CloneableBean(obj, ignoreProperties); + equalsBean = new EqualsBean(beanClass, obj); + toStringBean = new ToStringBean(beanClass, obj); + cloneableBean = new CloneableBean(obj, ignoreProperties); } /** @@ -91,7 +91,7 @@ public class ObjectBean implements Serializable, Cloneable { */ @Override public Object clone() throws CloneNotSupportedException { - return this._cloneableBean.beanClone(); + return cloneableBean.beanClone(); } /** @@ -105,7 +105,7 @@ public class ObjectBean implements Serializable, Cloneable { */ @Override public boolean equals(final Object other) { - return this._equalsBean.beanEquals(other); + return equalsBean.beanEquals(other); } /** @@ -119,7 +119,7 @@ public class ObjectBean implements Serializable, Cloneable { */ @Override public int hashCode() { - return this._equalsBean.beanHashCode(); + return equalsBean.beanHashCode(); } /** @@ -131,7 +131,7 @@ public class ObjectBean implements Serializable, Cloneable { */ @Override public String toString() { - return this._toStringBean.toString(); + return toStringBean.toString(); } } diff --git a/src/main/java/com/sun/syndication/feed/impl/ToStringBean.java b/src/main/java/com/sun/syndication/feed/impl/ToStringBean.java index 7fa45c3..33dd9f0 100644 --- a/src/main/java/com/sun/syndication/feed/impl/ToStringBean.java +++ b/src/main/java/com/sun/syndication/feed/impl/ToStringBean.java @@ -51,8 +51,8 @@ public class ToStringBean implements Serializable { private static final Object[] NO_PARAMS = new Object[0]; - private final Class _beanClass; - private final Object _obj; + private final Class beanClass; + private final Object obj; /** * Default constructor. @@ -65,8 +65,8 @@ public class ToStringBean implements Serializable { * */ protected ToStringBean(final Class beanClass) { - this._beanClass = beanClass; - this._obj = this; + this.beanClass = beanClass; + obj = this; } /** @@ -96,8 +96,8 @@ public class ToStringBean implements Serializable { * */ public ToStringBean(final Class beanClass, final Object obj) { - this._beanClass = beanClass; - this._obj = obj; + this.beanClass = beanClass; + this.obj = obj; } /** @@ -115,7 +115,7 @@ public class ToStringBean implements Serializable { final String[] tsInfo = (String[]) (stack.isEmpty() ? null : stack.peek()); String prefix; if (tsInfo == null) { - final String className = this._obj.getClass().getName(); + final String className = obj.getClass().getName(); prefix = className.substring(className.lastIndexOf(".") + 1); } else { prefix = tsInfo[0]; @@ -135,7 +135,7 @@ public class ToStringBean implements Serializable { private String toString(final String prefix) { final StringBuffer sb = new StringBuffer(128); try { - final PropertyDescriptor[] pds = BeanIntrospector.getPropertyDescriptors(this._beanClass); + final PropertyDescriptor[] pds = BeanIntrospector.getPropertyDescriptors(beanClass); if (pds != null) { for (final PropertyDescriptor pd : pds) { final String pName = pd.getName(); @@ -151,13 +151,13 @@ public class ToStringBean implements Serializable { // that // take // parameters - final Object value = pReadMethod.invoke(this._obj, NO_PARAMS); + final Object value = pReadMethod.invoke(obj, NO_PARAMS); printProperty(sb, prefix + "." + pName, value); } } } } catch (final Exception ex) { - sb.append("\n\nEXCEPTION: Could not complete " + this._obj.getClass() + ".toString(): " + ex.getMessage() + "\n"); + sb.append("\n\nEXCEPTION: Could not complete " + obj.getClass() + ".toString(): " + ex.getMessage() + "\n"); } return sb.toString(); } diff --git a/src/main/java/com/sun/syndication/feed/module/DCModuleImpl.java b/src/main/java/com/sun/syndication/feed/module/DCModuleImpl.java index fd07683..d659de9 100644 --- a/src/main/java/com/sun/syndication/feed/module/DCModuleImpl.java +++ b/src/main/java/com/sun/syndication/feed/module/DCModuleImpl.java @@ -39,22 +39,22 @@ import com.sun.syndication.feed.impl.ObjectBean; * */ public class DCModuleImpl extends ModuleImpl implements DCModule { - private final ObjectBean _objBean; - private List _title; - private List _creator; - private List _subject; - private List _description; - private List _publisher; - private List _contributors; - private List _date; - private List _type; - private List _format; - private List _identifier; - private List _source; - private List _language; - private List _relation; - private List _coverage; - private List _rights; + private final ObjectBean objBean; + private List title; + private List creator; + private List subject; + private List description; + private List publisher; + private List contributors; + private List date; + private List type; + private List format; + private List identifier; + private List source; + private List language; + private List relation; + private List coverage; + private List rights; /** * Properties to be ignored when cloning. @@ -95,7 +95,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { */ public DCModuleImpl() { super(DCModule.class, URI); - this._objBean = new ObjectBean(DCModule.class, this, CONVENIENCE_PROPERTIES); + objBean = new ObjectBean(DCModule.class, this, CONVENIENCE_PROPERTIES); } /** @@ -108,7 +108,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { */ @Override public List getTitles() { - return this._title == null ? (this._title = new ArrayList()) : this._title; + return title == null ? (title = new ArrayList()) : title; } /** @@ -121,7 +121,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { */ @Override public void setTitles(final List titles) { - this._title = titles; + title = titles; } /** @@ -133,7 +133,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { */ @Override public String getTitle() { - return this._title != null && this._title.size() > 0 ? (String) this._title.get(0) : null; + return title != null && title.size() > 0 ? (String) title.get(0) : null; } /** @@ -146,8 +146,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { */ @Override public void setTitle(final String title) { - this._title = new ArrayList(); - this._title.add(title); + this.title = new ArrayList(); + this.title.add(title); } /** @@ -160,7 +160,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { */ @Override public List getCreators() { - return this._creator == null ? (this._creator = new ArrayList()) : this._creator; + return creator == null ? (creator = new ArrayList()) : creator; } /** @@ -173,7 +173,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { */ @Override public void setCreators(final List creators) { - this._creator = creators; + creator = creators; } /** @@ -185,7 +185,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { */ @Override public String getCreator() { - return this._creator != null && this._creator.size() > 0 ? (String) this._creator.get(0) : null; + return creator != null && creator.size() > 0 ? (String) creator.get(0) : null; } /** @@ -198,8 +198,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { */ @Override public void setCreator(final String creator) { - this._creator = new ArrayList(); - this._creator.add(creator); + this.creator = new ArrayList(); + this.creator.add(creator); } /** @@ -212,7 +212,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { */ @Override public List getSubjects() { - return this._subject == null ? (this._subject = new ArrayList()) : this._subject; + return subject == null ? (subject = new ArrayList()) : subject; } /** @@ -225,7 +225,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { */ @Override public void setSubjects(final List subjects) { - this._subject = subjects; + subject = subjects; } /** @@ -237,7 +237,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { */ @Override public DCSubject getSubject() { - return this._subject != null && this._subject.size() > 0 ? (DCSubject) this._subject.get(0) : null; + return subject != null && subject.size() > 0 ? (DCSubject) subject.get(0) : null; } /** @@ -250,8 +250,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { */ @Override public void setSubject(final DCSubject subject) { - this._subject = new ArrayList(); - this._subject.add(subject); + this.subject = new ArrayList(); + this.subject.add(subject); } /** @@ -264,7 +264,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { */ @Override public List getDescriptions() { - return this._description == null ? (this._description = new ArrayList()) : this._description; + return description == null ? (description = new ArrayList()) : description; } /** @@ -277,7 +277,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { */ @Override public void setDescriptions(final List descriptions) { - this._description = descriptions; + description = descriptions; } /** @@ -289,7 +289,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { */ @Override public String getDescription() { - return this._description != null && this._description.size() > 0 ? (String) this._description.get(0) : null; + return description != null && description.size() > 0 ? (String) description.get(0) : null; } /** @@ -303,8 +303,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { */ @Override public void setDescription(final String description) { - this._description = new ArrayList(); - this._description.add(description); + this.description = new ArrayList(); + this.description.add(description); } /** @@ -317,7 +317,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { */ @Override public List getPublishers() { - return this._publisher == null ? (this._publisher = new ArrayList()) : this._publisher; + return publisher == null ? (publisher = new ArrayList()) : publisher; } /** @@ -330,7 +330,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { */ @Override public void setPublishers(final List publishers) { - this._publisher = publishers; + publisher = publishers; } /** @@ -342,7 +342,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { */ @Override public String getPublisher() { - return this._publisher != null && this._publisher.size() > 0 ? (String) this._publisher.get(0) : null; + return publisher != null && publisher.size() > 0 ? (String) publisher.get(0) : null; } /** @@ -356,8 +356,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { */ @Override public void setPublisher(final String publisher) { - this._publisher = new ArrayList(); - this._publisher.add(publisher); + this.publisher = new ArrayList(); + this.publisher.add(publisher); } /** @@ -370,7 +370,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { */ @Override public List getContributors() { - return this._contributors == null ? (this._contributors = new ArrayList()) : this._contributors; + return contributors == null ? (contributors = new ArrayList()) : contributors; } /** @@ -383,7 +383,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { */ @Override public void setContributors(final List contributors) { - this._contributors = contributors; + this.contributors = contributors; } /** @@ -395,7 +395,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { */ @Override public String getContributor() { - return this._contributors != null && this._contributors.size() > 0 ? (String) this._contributors.get(0) : null; + return contributors != null && contributors.size() > 0 ? (String) contributors.get(0) : null; } /** @@ -409,8 +409,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { */ @Override public void setContributor(final String contributor) { - this._contributors = new ArrayList(); - this._contributors.add(contributor); + contributors = new ArrayList(); + contributors.add(contributor); } /** @@ -423,7 +423,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { */ @Override public List getDates() { - return this._date == null ? (this._date = new ArrayList()) : this._date; + return date == null ? (date = new ArrayList()) : date; } /** @@ -436,7 +436,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { */ @Override public void setDates(final List dates) { - this._date = dates; + date = dates; } /** @@ -448,7 +448,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { */ @Override public Date getDate() { - return this._date != null && this._date.size() > 0 ? (Date) this._date.get(0) : null; + return date != null && date.size() > 0 ? (Date) date.get(0) : null; } /** @@ -461,8 +461,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { */ @Override public void setDate(final Date date) { - this._date = new ArrayList(); - this._date.add(date); + this.date = new ArrayList(); + this.date.add(date); } /** @@ -475,7 +475,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { */ @Override public List getTypes() { - return this._type == null ? (this._type = new ArrayList()) : this._type; + return type == null ? (type = new ArrayList()) : type; } /** @@ -488,7 +488,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { */ @Override public void setTypes(final List types) { - this._type = types; + type = types; } /** @@ -500,7 +500,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { */ @Override public String getType() { - return this._type != null && this._type.size() > 0 ? (String) this._type.get(0) : null; + return type != null && type.size() > 0 ? (String) type.get(0) : null; } /** @@ -513,8 +513,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { */ @Override public void setType(final String type) { - this._type = new ArrayList(); - this._type.add(type); + this.type = new ArrayList(); + this.type.add(type); } /** @@ -527,7 +527,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { */ @Override public List getFormats() { - return this._format == null ? (this._format = new ArrayList()) : this._format; + return format == null ? (format = new ArrayList()) : format; } /** @@ -540,7 +540,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { */ @Override public void setFormats(final List formats) { - this._format = formats; + format = formats; } /** @@ -552,7 +552,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { */ @Override public String getFormat() { - return this._format != null && this._format.size() > 0 ? (String) this._format.get(0) : null; + return format != null && format.size() > 0 ? (String) format.get(0) : null; } /** @@ -565,8 +565,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { */ @Override public void setFormat(final String format) { - this._format = new ArrayList(); - this._format.add(format); + this.format = new ArrayList(); + this.format.add(format); } /** @@ -579,7 +579,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { */ @Override public List getIdentifiers() { - return this._identifier == null ? (this._identifier = new ArrayList()) : this._identifier; + return identifier == null ? (identifier = new ArrayList()) : identifier; } /** @@ -592,7 +592,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { */ @Override public void setIdentifiers(final List identifiers) { - this._identifier = identifiers; + identifier = identifiers; } /** @@ -604,7 +604,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { */ @Override public String getIdentifier() { - return this._identifier != null && this._identifier.size() > 0 ? (String) this._identifier.get(0) : null; + return identifier != null && identifier.size() > 0 ? (String) identifier.get(0) : null; } /** @@ -618,8 +618,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { */ @Override public void setIdentifier(final String identifier) { - this._identifier = new ArrayList(); - this._identifier.add(identifier); + this.identifier = new ArrayList(); + this.identifier.add(identifier); } /** @@ -632,7 +632,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { */ @Override public List getSources() { - return this._source == null ? (this._source = new ArrayList()) : this._source; + return source == null ? (source = new ArrayList()) : source; } /** @@ -645,7 +645,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { */ @Override public void setSources(final List sources) { - this._source = sources; + source = sources; } /** @@ -657,7 +657,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { */ @Override public String getSource() { - return this._source != null && this._source.size() > 0 ? (String) this._source.get(0) : null; + return source != null && source.size() > 0 ? (String) source.get(0) : null; } /** @@ -670,8 +670,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { */ @Override public void setSource(final String source) { - this._source = new ArrayList(); - this._source.add(source); + this.source = new ArrayList(); + this.source.add(source); } /** @@ -684,7 +684,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { */ @Override public List getLanguages() { - return this._language == null ? (this._language = new ArrayList()) : this._language; + return language == null ? (language = new ArrayList()) : language; } /** @@ -697,7 +697,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { */ @Override public void setLanguages(final List languages) { - this._language = languages; + language = languages; } /** @@ -709,7 +709,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { */ @Override public String getLanguage() { - return this._language != null && this._language.size() > 0 ? (String) this._language.get(0) : null; + return language != null && language.size() > 0 ? (String) language.get(0) : null; } /** @@ -723,8 +723,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { */ @Override public void setLanguage(final String language) { - this._language = new ArrayList(); - this._language.add(language); + this.language = new ArrayList(); + this.language.add(language); } /** @@ -737,7 +737,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { */ @Override public List getRelations() { - return this._relation == null ? (this._relation = new ArrayList()) : this._relation; + return relation == null ? (relation = new ArrayList()) : relation; } /** @@ -750,7 +750,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { */ @Override public void setRelations(final List relations) { - this._relation = relations; + relation = relations; } /** @@ -762,7 +762,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { */ @Override public String getRelation() { - return this._relation != null && this._relation.size() > 0 ? (String) this._relation.get(0) : null; + return relation != null && relation.size() > 0 ? (String) relation.get(0) : null; } /** @@ -776,8 +776,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { */ @Override public void setRelation(final String relation) { - this._relation = new ArrayList(); - this._relation.add(relation); + this.relation = new ArrayList(); + this.relation.add(relation); } /** @@ -790,7 +790,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { */ @Override public List getCoverages() { - return this._coverage == null ? (this._coverage = new ArrayList()) : this._coverage; + return coverage == null ? (coverage = new ArrayList()) : coverage; } /** @@ -803,7 +803,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { */ @Override public void setCoverages(final List coverages) { - this._coverage = coverages; + coverage = coverages; } /** @@ -815,7 +815,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { */ @Override public String getCoverage() { - return this._coverage != null && this._coverage.size() > 0 ? (String) this._coverage.get(0) : null; + return coverage != null && coverage.size() > 0 ? (String) coverage.get(0) : null; } /** @@ -829,8 +829,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { */ @Override public void setCoverage(final String coverage) { - this._coverage = new ArrayList(); - this._coverage.add(coverage); + this.coverage = new ArrayList(); + this.coverage.add(coverage); } /** @@ -843,7 +843,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { */ @Override public List getRightsList() { - return this._rights == null ? (this._rights = new ArrayList()) : this._rights; + return rights == null ? (rights = new ArrayList()) : rights; } /** @@ -856,7 +856,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { */ @Override public void setRightsList(final List rights) { - this._rights = rights; + this.rights = rights; } /** @@ -868,7 +868,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { */ @Override public String getRights() { - return this._rights != null && this._rights.size() > 0 ? (String) this._rights.get(0) : null; + return rights != null && rights.size() > 0 ? (String) rights.get(0) : null; } /** @@ -881,8 +881,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { */ @Override public void setRights(final String rights) { - this._rights = new ArrayList(); - this._rights.add(rights); + this.rights = new ArrayList(); + this.rights.add(rights); } /** @@ -896,7 +896,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { */ @Override public final Object clone() throws CloneNotSupportedException { - return this._objBean.clone(); + return objBean.clone(); } /** @@ -910,7 +910,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { */ @Override public final boolean equals(final Object other) { - return this._objBean.equals(other); + return objBean.equals(other); } /** @@ -924,7 +924,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { */ @Override public final int hashCode() { - return this._objBean.hashCode(); + return objBean.hashCode(); } /** @@ -936,7 +936,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule { */ @Override public final String toString() { - return this._objBean.toString(); + return objBean.toString(); } @Override diff --git a/src/main/java/com/sun/syndication/feed/module/DCSubjectImpl.java b/src/main/java/com/sun/syndication/feed/module/DCSubjectImpl.java index e9b89c2..fe909dc 100644 --- a/src/main/java/com/sun/syndication/feed/module/DCSubjectImpl.java +++ b/src/main/java/com/sun/syndication/feed/module/DCSubjectImpl.java @@ -35,9 +35,9 @@ import com.sun.syndication.feed.impl.ObjectBean; * */ public class DCSubjectImpl implements Cloneable, Serializable, DCSubject { - private final ObjectBean _objBean; - private String _taxonomyUri; - private String _value; + private final ObjectBean objBean; + private String taxonomyUri; + private String value; /** * Default constructor. All properties are set to null. @@ -45,7 +45,7 @@ public class DCSubjectImpl implements Cloneable, Serializable, DCSubject { * */ public DCSubjectImpl() { - this._objBean = new ObjectBean(this.getClass(), this); + objBean = new ObjectBean(this.getClass(), this); } /** @@ -59,7 +59,7 @@ public class DCSubjectImpl implements Cloneable, Serializable, DCSubject { */ @Override public Object clone() throws CloneNotSupportedException { - return this._objBean.clone(); + return objBean.clone(); } /** @@ -76,7 +76,7 @@ public class DCSubjectImpl implements Cloneable, Serializable, DCSubject { if (!(other instanceof DCSubjectImpl)) { return false; } - return this._objBean.equals(other); + return objBean.equals(other); } /** @@ -90,7 +90,7 @@ public class DCSubjectImpl implements Cloneable, Serializable, DCSubject { */ @Override public int hashCode() { - return this._objBean.hashCode(); + return objBean.hashCode(); } /** @@ -102,7 +102,7 @@ public class DCSubjectImpl implements Cloneable, Serializable, DCSubject { */ @Override public String toString() { - return this._objBean.toString(); + return objBean.toString(); } /** @@ -114,7 +114,7 @@ public class DCSubjectImpl implements Cloneable, Serializable, DCSubject { */ @Override public String getTaxonomyUri() { - return this._taxonomyUri; + return taxonomyUri; } /** @@ -127,7 +127,7 @@ public class DCSubjectImpl implements Cloneable, Serializable, DCSubject { */ @Override public void setTaxonomyUri(final String taxonomyUri) { - this._taxonomyUri = taxonomyUri; + this.taxonomyUri = taxonomyUri; } /** @@ -139,7 +139,7 @@ public class DCSubjectImpl implements Cloneable, Serializable, DCSubject { */ @Override public String getValue() { - return this._value; + return value; } /** @@ -151,7 +151,7 @@ public class DCSubjectImpl implements Cloneable, Serializable, DCSubject { */ @Override public void setValue(final String value) { - this._value = value; + this.value = value; } @Override diff --git a/src/main/java/com/sun/syndication/feed/module/ModuleImpl.java b/src/main/java/com/sun/syndication/feed/module/ModuleImpl.java index 7f608d0..5e97b80 100644 --- a/src/main/java/com/sun/syndication/feed/module/ModuleImpl.java +++ b/src/main/java/com/sun/syndication/feed/module/ModuleImpl.java @@ -29,8 +29,8 @@ import com.sun.syndication.feed.impl.ObjectBean; * */ public abstract class ModuleImpl implements Cloneable, Serializable, Module { - private final ObjectBean _objBean; - private final String _uri; + private final ObjectBean objBean; + private final String uri; /** * Constructor. @@ -40,8 +40,8 @@ public abstract class ModuleImpl implements Cloneable, Serializable, Module { * */ protected ModuleImpl(final Class beanClass, final String uri) { - this._objBean = new ObjectBean(beanClass, this); - this._uri = uri; + objBean = new ObjectBean(beanClass, this); + this.uri = uri; } /** @@ -55,7 +55,7 @@ public abstract class ModuleImpl implements Cloneable, Serializable, Module { */ @Override public Object clone() throws CloneNotSupportedException { - return this._objBean.clone(); + return objBean.clone(); } /** @@ -72,7 +72,7 @@ public abstract class ModuleImpl implements Cloneable, Serializable, Module { if (!(other instanceof ModuleImpl)) { return false; } - return this._objBean.equals(other); + return objBean.equals(other); } /** @@ -86,7 +86,7 @@ public abstract class ModuleImpl implements Cloneable, Serializable, Module { */ @Override public int hashCode() { - return this._objBean.hashCode(); + return objBean.hashCode(); } /** @@ -98,7 +98,7 @@ public abstract class ModuleImpl implements Cloneable, Serializable, Module { */ @Override public String toString() { - return this._objBean.toString(); + return objBean.toString(); } /** @@ -110,7 +110,7 @@ public abstract class ModuleImpl implements Cloneable, Serializable, Module { */ @Override public String getUri() { - return this._uri; + return uri; } } diff --git a/src/main/java/com/sun/syndication/feed/module/SyModuleImpl.java b/src/main/java/com/sun/syndication/feed/module/SyModuleImpl.java index 1c0c7d9..95910dc 100644 --- a/src/main/java/com/sun/syndication/feed/module/SyModuleImpl.java +++ b/src/main/java/com/sun/syndication/feed/module/SyModuleImpl.java @@ -47,9 +47,9 @@ public class SyModuleImpl extends ModuleImpl implements SyModule { PERIODS.add(YEARLY); } - private String _updatePeriod; - private int _updateFrequency; - private Date _updateBase; + private String updatePeriod; + private int updateFrequency; + private Date updateBase; /** * Default constructor. All properties are set to null. @@ -69,7 +69,7 @@ public class SyModuleImpl extends ModuleImpl implements SyModule { */ @Override public String getUpdatePeriod() { - return this._updatePeriod; + return updatePeriod; } /** @@ -85,7 +85,7 @@ public class SyModuleImpl extends ModuleImpl implements SyModule { if (!PERIODS.contains(updatePeriod)) { throw new IllegalArgumentException("Invalid period [" + updatePeriod + "]"); } - this._updatePeriod = updatePeriod; + this.updatePeriod = updatePeriod; } /** @@ -97,7 +97,7 @@ public class SyModuleImpl extends ModuleImpl implements SyModule { */ @Override public int getUpdateFrequency() { - return this._updateFrequency; + return updateFrequency; } /** @@ -110,7 +110,7 @@ public class SyModuleImpl extends ModuleImpl implements SyModule { */ @Override public void setUpdateFrequency(final int updateFrequency) { - this._updateFrequency = updateFrequency; + this.updateFrequency = updateFrequency; } /** @@ -122,7 +122,7 @@ public class SyModuleImpl extends ModuleImpl implements SyModule { */ @Override public Date getUpdateBase() { - return new Date(this._updateBase.getTime()); + return new Date(updateBase.getTime()); } /** @@ -135,7 +135,7 @@ public class SyModuleImpl extends ModuleImpl implements SyModule { */ @Override public void setUpdateBase(final Date updateBase) { - this._updateBase = new Date(updateBase.getTime()); + this.updateBase = new Date(updateBase.getTime()); } @Override diff --git a/src/main/java/com/sun/syndication/feed/rss/Category.java b/src/main/java/com/sun/syndication/feed/rss/Category.java index 1b30857..3234567 100644 --- a/src/main/java/com/sun/syndication/feed/rss/Category.java +++ b/src/main/java/com/sun/syndication/feed/rss/Category.java @@ -29,9 +29,9 @@ import com.sun.syndication.feed.impl.ObjectBean; * */ public class Category implements Cloneable, Serializable { - private final ObjectBean _objBean; - private String _domain; - private String _value; + private final ObjectBean objBean; + private String domain; + private String value; /** * Default constructor. All properties are set to null. @@ -39,7 +39,7 @@ public class Category implements Cloneable, Serializable { * */ public Category() { - this._objBean = new ObjectBean(this.getClass(), this); + objBean = new ObjectBean(this.getClass(), this); } /** @@ -53,7 +53,7 @@ public class Category implements Cloneable, Serializable { */ @Override public Object clone() throws CloneNotSupportedException { - return this._objBean.clone(); + return objBean.clone(); } /** @@ -70,7 +70,7 @@ public class Category implements Cloneable, Serializable { if (!(other instanceof Category)) { return false; } - return this._objBean.equals(other); + return objBean.equals(other); } /** @@ -84,7 +84,7 @@ public class Category implements Cloneable, Serializable { */ @Override public int hashCode() { - return this._objBean.hashCode(); + return objBean.hashCode(); } /** @@ -96,7 +96,7 @@ public class Category implements Cloneable, Serializable { */ @Override public String toString() { - return this._objBean.toString(); + return objBean.toString(); } /** @@ -107,7 +107,7 @@ public class Category implements Cloneable, Serializable { * */ public String getDomain() { - return this._domain; + return domain; } /** @@ -118,7 +118,7 @@ public class Category implements Cloneable, Serializable { * */ public void setDomain(final String domain) { - this._domain = domain; + this.domain = domain; } /** @@ -129,7 +129,7 @@ public class Category implements Cloneable, Serializable { * */ public String getValue() { - return this._value; + return value; } /** @@ -140,7 +140,7 @@ public class Category implements Cloneable, Serializable { * */ public void setValue(final String value) { - this._value = value; + this.value = value; } } diff --git a/src/main/java/com/sun/syndication/feed/rss/Channel.java b/src/main/java/com/sun/syndication/feed/rss/Channel.java index 3abb08a..08b96ac 100644 --- a/src/main/java/com/sun/syndication/feed/rss/Channel.java +++ b/src/main/java/com/sun/syndication/feed/rss/Channel.java @@ -61,28 +61,28 @@ public class Channel extends WireFeed { DAYS = Collections.unmodifiableSet(days); } - private String _title; - private String _description; - private String _link; - private String _uri; - private Image _image; - private List _items; - private TextInput _textInput; - private String _language; - private String _rating; - private String _copyright; - private Date _pubDate; - private Date _lastBuildDate; - private String _docs; - private String _managingEditor; - private String _webMaster; - private List _skipHours; - private List _skipDays; - private Cloud _cloud; - private List _categories; - private String _generator; - private int _ttl = -1; - private List _modules; + private String title; + private String description; + private String link; + private String uri; + private Image image; + private List items; + private TextInput textInput; + private String language; + private String rating; + private String copyright; + private Date pubDate; + private Date lastBuildDate; + private String docs; + private String managingEditor; + private String webMaster; + private List skipHours; + private List skipDays; + private Cloud cloud; + private List categories; + private String generator; + private int ttl = -1; + private List modules; /** * Default constructor, for bean cloning purposes only. @@ -111,7 +111,7 @@ public class Channel extends WireFeed { * */ public String getTitle() { - return this._title; + return title; } /** @@ -122,7 +122,7 @@ public class Channel extends WireFeed { * */ public void setTitle(final String title) { - this._title = title; + this.title = title; } /** @@ -133,7 +133,7 @@ public class Channel extends WireFeed { * */ public String getDescription() { - return this._description; + return description; } /** @@ -144,7 +144,7 @@ public class Channel extends WireFeed { * */ public void setDescription(final String description) { - this._description = description; + this.description = description; } /** @@ -155,7 +155,7 @@ public class Channel extends WireFeed { * */ public String getLink() { - return this._link; + return link; } /** @@ -166,7 +166,7 @@ public class Channel extends WireFeed { * */ public void setLink(final String link) { - this._link = link; + this.link = link; } /** @@ -176,7 +176,7 @@ public class Channel extends WireFeed { * @return the channel uri, null if none. */ public String getUri() { - return this._uri; + return uri; } /** @@ -186,7 +186,7 @@ public class Channel extends WireFeed { * @param uri the channel uri, null if none. */ public void setUri(final String uri) { - this._uri = uri; + this.uri = uri; } /** @@ -197,7 +197,7 @@ public class Channel extends WireFeed { * */ public Image getImage() { - return this._image; + return image; } /** @@ -208,7 +208,7 @@ public class Channel extends WireFeed { * */ public void setImage(final Image image) { - this._image = image; + this.image = image; } /** @@ -220,7 +220,7 @@ public class Channel extends WireFeed { * */ public List getItems() { - return this._items == null ? (this._items = new ArrayList()) : this._items; + return items == null ? (items = new ArrayList()) : items; } /** @@ -232,7 +232,7 @@ public class Channel extends WireFeed { * */ public void setItems(final List items) { - this._items = items; + this.items = items; } /** @@ -243,7 +243,7 @@ public class Channel extends WireFeed { * */ public TextInput getTextInput() { - return this._textInput; + return textInput; } /** @@ -254,7 +254,7 @@ public class Channel extends WireFeed { * */ public void setTextInput(final TextInput textInput) { - this._textInput = textInput; + this.textInput = textInput; } /** @@ -265,7 +265,7 @@ public class Channel extends WireFeed { * */ public String getLanguage() { - return this._language; + return language; } /** @@ -276,7 +276,7 @@ public class Channel extends WireFeed { * */ public void setLanguage(final String language) { - this._language = language; + this.language = language; } /** @@ -287,7 +287,7 @@ public class Channel extends WireFeed { * */ public String getRating() { - return this._rating; + return rating; } /** @@ -298,7 +298,7 @@ public class Channel extends WireFeed { * */ public void setRating(final String rating) { - this._rating = rating; + this.rating = rating; } /** @@ -309,7 +309,7 @@ public class Channel extends WireFeed { * */ public String getCopyright() { - return this._copyright; + return copyright; } /** @@ -320,7 +320,7 @@ public class Channel extends WireFeed { * */ public void setCopyright(final String copyright) { - this._copyright = copyright; + this.copyright = copyright; } /** @@ -331,7 +331,7 @@ public class Channel extends WireFeed { * */ public Date getPubDate() { - return this._pubDate == null ? null : new Date(this._pubDate.getTime()); + return pubDate == null ? null : new Date(pubDate.getTime()); } /** @@ -342,7 +342,7 @@ public class Channel extends WireFeed { * */ public void setPubDate(final Date pubDate) { - this._pubDate = pubDate == null ? null : new Date(pubDate.getTime()); + this.pubDate = pubDate == null ? null : new Date(pubDate.getTime()); } /** @@ -353,7 +353,7 @@ public class Channel extends WireFeed { * */ public Date getLastBuildDate() { - return this._lastBuildDate == null ? null : new Date(this._lastBuildDate.getTime()); + return lastBuildDate == null ? null : new Date(lastBuildDate.getTime()); } /** @@ -365,7 +365,7 @@ public class Channel extends WireFeed { * */ public void setLastBuildDate(final Date lastBuildDate) { - this._lastBuildDate = lastBuildDate == null ? null : new Date(lastBuildDate.getTime()); + this.lastBuildDate = lastBuildDate == null ? null : new Date(lastBuildDate.getTime()); } /** @@ -376,7 +376,7 @@ public class Channel extends WireFeed { * */ public String getDocs() { - return this._docs; + return docs; } /** @@ -387,7 +387,7 @@ public class Channel extends WireFeed { * */ public void setDocs(final String docs) { - this._docs = docs; + this.docs = docs; } /** @@ -398,7 +398,7 @@ public class Channel extends WireFeed { * */ public String getManagingEditor() { - return this._managingEditor; + return managingEditor; } /** @@ -410,7 +410,7 @@ public class Channel extends WireFeed { * */ public void setManagingEditor(final String managingEditor) { - this._managingEditor = managingEditor; + this.managingEditor = managingEditor; } /** @@ -421,7 +421,7 @@ public class Channel extends WireFeed { * */ public String getWebMaster() { - return this._webMaster; + return webMaster; } /** @@ -432,7 +432,7 @@ public class Channel extends WireFeed { * */ public void setWebMaster(final String webMaster) { - this._webMaster = webMaster; + this.webMaster = webMaster; } /** @@ -444,7 +444,7 @@ public class Channel extends WireFeed { * */ public List getSkipHours() { - return this._skipHours != null ? this._skipHours : new ArrayList(); + return skipHours != null ? skipHours : new ArrayList(); } /** @@ -469,7 +469,7 @@ public class Channel extends WireFeed { } } } - this._skipHours = skipHours; + this.skipHours = skipHours; } /** @@ -481,7 +481,7 @@ public class Channel extends WireFeed { * */ public List getSkipDays() { - return this._skipDays != null ? this._skipDays : new ArrayList(); + return skipDays != null ? skipDays : new ArrayList(); } /** @@ -507,7 +507,7 @@ public class Channel extends WireFeed { } } } - this._skipDays = skipDays; + this.skipDays = skipDays; } /** @@ -518,7 +518,7 @@ public class Channel extends WireFeed { * */ public Cloud getCloud() { - return this._cloud; + return cloud; } /** @@ -529,7 +529,7 @@ public class Channel extends WireFeed { * */ public void setCloud(final Cloud cloud) { - this._cloud = cloud; + this.cloud = cloud; } /** @@ -541,7 +541,7 @@ public class Channel extends WireFeed { * */ public List getCategories() { - return this._categories == null ? (this._categories = new ArrayList()) : this._categories; + return categories == null ? (categories = new ArrayList()) : categories; } /** @@ -553,7 +553,7 @@ public class Channel extends WireFeed { * */ public void setCategories(final List categories) { - this._categories = categories; + this.categories = categories; } /** @@ -564,7 +564,7 @@ public class Channel extends WireFeed { * */ public String getGenerator() { - return this._generator; + return generator; } /** @@ -575,7 +575,7 @@ public class Channel extends WireFeed { * */ public void setGenerator(final String generator) { - this._generator = generator; + this.generator = generator; } /** @@ -586,7 +586,7 @@ public class Channel extends WireFeed { * */ public int getTtl() { - return this._ttl; + return ttl; } /** @@ -597,7 +597,7 @@ public class Channel extends WireFeed { * */ public void setTtl(final int ttl) { - this._ttl = ttl; + this.ttl = ttl; } /** @@ -610,7 +610,7 @@ public class Channel extends WireFeed { */ @Override public List getModules() { - return this._modules == null ? (this._modules = new ArrayList()) : this._modules; + return modules == null ? (modules = new ArrayList()) : modules; } /** @@ -623,7 +623,7 @@ public class Channel extends WireFeed { */ @Override public void setModules(final List modules) { - this._modules = modules; + this.modules = modules; } /** @@ -635,7 +635,7 @@ public class Channel extends WireFeed { */ @Override public Module getModule(final String uri) { - return ModuleUtils.getModule(this._modules, uri); + return ModuleUtils.getModule(modules, uri); } } diff --git a/src/main/java/com/sun/syndication/feed/rss/Cloud.java b/src/main/java/com/sun/syndication/feed/rss/Cloud.java index d912bbd..7d68334 100644 --- a/src/main/java/com/sun/syndication/feed/rss/Cloud.java +++ b/src/main/java/com/sun/syndication/feed/rss/Cloud.java @@ -29,12 +29,12 @@ import com.sun.syndication.feed.impl.ObjectBean; * */ public class Cloud implements Cloneable, Serializable { - private final ObjectBean _objBean; - private String _domain; - private int _port; - private String _path; - private String _registerProcedure; - private String _protocol; + private final ObjectBean objBean; + private String domain; + private int port; + private String path; + private String registerProcedure; + private String protocol; /** * Default constructor. All properties are set to null. @@ -42,7 +42,7 @@ public class Cloud implements Cloneable, Serializable { * */ public Cloud() { - this._objBean = new ObjectBean(this.getClass(), this); + objBean = new ObjectBean(this.getClass(), this); } /** @@ -56,7 +56,7 @@ public class Cloud implements Cloneable, Serializable { */ @Override public Object clone() throws CloneNotSupportedException { - return this._objBean.clone(); + return objBean.clone(); } /** @@ -70,7 +70,7 @@ public class Cloud implements Cloneable, Serializable { */ @Override public boolean equals(final Object other) { - return this._objBean.equals(other); + return objBean.equals(other); } /** @@ -84,7 +84,7 @@ public class Cloud implements Cloneable, Serializable { */ @Override public int hashCode() { - return this._objBean.hashCode(); + return objBean.hashCode(); } /** @@ -96,7 +96,7 @@ public class Cloud implements Cloneable, Serializable { */ @Override public String toString() { - return this._objBean.toString(); + return objBean.toString(); } /** @@ -107,7 +107,7 @@ public class Cloud implements Cloneable, Serializable { * */ public String getDomain() { - return this._domain; + return domain; } /** @@ -118,7 +118,7 @@ public class Cloud implements Cloneable, Serializable { * */ public void setDomain(final String domain) { - this._domain = domain; + this.domain = domain; } /** @@ -129,7 +129,7 @@ public class Cloud implements Cloneable, Serializable { * */ public int getPort() { - return this._port; + return port; } /** @@ -140,7 +140,7 @@ public class Cloud implements Cloneable, Serializable { * */ public void setPort(final int port) { - this._port = port; + this.port = port; } /** @@ -151,7 +151,7 @@ public class Cloud implements Cloneable, Serializable { * */ public String getPath() { - return this._path; + return path; } /** @@ -162,7 +162,7 @@ public class Cloud implements Cloneable, Serializable { * */ public void setPath(final String path) { - this._path = path; + this.path = path; } /** @@ -173,7 +173,7 @@ public class Cloud implements Cloneable, Serializable { * */ public String getRegisterProcedure() { - return this._registerProcedure; + return registerProcedure; } /** @@ -185,7 +185,7 @@ public class Cloud implements Cloneable, Serializable { * */ public void setRegisterProcedure(final String registerProcedure) { - this._registerProcedure = registerProcedure; + this.registerProcedure = registerProcedure; } /** @@ -196,7 +196,7 @@ public class Cloud implements Cloneable, Serializable { * */ public String getProtocol() { - return this._protocol; + return protocol; } /** @@ -207,7 +207,7 @@ public class Cloud implements Cloneable, Serializable { * */ public void setProtocol(final String protocol) { - this._protocol = protocol; + this.protocol = protocol; } } diff --git a/src/main/java/com/sun/syndication/feed/rss/Content.java b/src/main/java/com/sun/syndication/feed/rss/Content.java index 6e1ba6b..2b6e6cb 100644 --- a/src/main/java/com/sun/syndication/feed/rss/Content.java +++ b/src/main/java/com/sun/syndication/feed/rss/Content.java @@ -31,9 +31,9 @@ import com.sun.syndication.feed.impl.ObjectBean; public class Content implements Cloneable, Serializable { public static final String HTML = "html"; public static final String TEXT = "text"; - private final ObjectBean _objBean; - private String _type; - private String _value; + private final ObjectBean objBean; + private String type; + private String value; /** * Default constructor. All properties are set to null. @@ -41,7 +41,7 @@ public class Content implements Cloneable, Serializable { * */ public Content() { - this._objBean = new ObjectBean(this.getClass(), this); + objBean = new ObjectBean(this.getClass(), this); } /** @@ -52,7 +52,7 @@ public class Content implements Cloneable, Serializable { * */ public void setType(final String type) { - this._type = type; + this.type = type; } /** @@ -63,7 +63,7 @@ public class Content implements Cloneable, Serializable { * */ public String getType() { - return this._type; + return type; } /** @@ -74,7 +74,7 @@ public class Content implements Cloneable, Serializable { * */ public void setValue(final String value) { - this._value = value; + this.value = value; } /** @@ -85,7 +85,7 @@ public class Content implements Cloneable, Serializable { * */ public String getValue() { - return this._value; + return value; } /** @@ -99,7 +99,7 @@ public class Content implements Cloneable, Serializable { */ @Override public Object clone() throws CloneNotSupportedException { - return this._objBean.clone(); + return objBean.clone(); } /** @@ -117,7 +117,7 @@ public class Content implements Cloneable, Serializable { return false; } - return this._objBean.equals(other); + return objBean.equals(other); } /** @@ -131,7 +131,7 @@ public class Content implements Cloneable, Serializable { */ @Override public int hashCode() { - return this._objBean.hashCode(); + return objBean.hashCode(); } /** @@ -143,6 +143,6 @@ public class Content implements Cloneable, Serializable { */ @Override public String toString() { - return this._objBean.toString(); + return objBean.toString(); } } diff --git a/src/main/java/com/sun/syndication/feed/rss/Description.java b/src/main/java/com/sun/syndication/feed/rss/Description.java index 07679b9..53faec3 100644 --- a/src/main/java/com/sun/syndication/feed/rss/Description.java +++ b/src/main/java/com/sun/syndication/feed/rss/Description.java @@ -29,9 +29,9 @@ import com.sun.syndication.feed.impl.ObjectBean; * */ public class Description implements Cloneable, Serializable { - private final ObjectBean _objBean; - private String _type; - private String _value; + private final ObjectBean objBean; + private String type; + private String value; /** * Default constructor. All properties are set to null. @@ -39,7 +39,7 @@ public class Description implements Cloneable, Serializable { * */ public Description() { - this._objBean = new ObjectBean(this.getClass(), this); + objBean = new ObjectBean(this.getClass(), this); } /** @@ -53,7 +53,7 @@ public class Description implements Cloneable, Serializable { */ @Override public Object clone() throws CloneNotSupportedException { - return this._objBean.clone(); + return objBean.clone(); } /** @@ -70,7 +70,7 @@ public class Description implements Cloneable, Serializable { if (!(other instanceof Description)) { return false; } - return this._objBean.equals(other); + return objBean.equals(other); } /** @@ -84,7 +84,7 @@ public class Description implements Cloneable, Serializable { */ @Override public int hashCode() { - return this._objBean.hashCode(); + return objBean.hashCode(); } /** @@ -96,7 +96,7 @@ public class Description implements Cloneable, Serializable { */ @Override public String toString() { - return this._objBean.toString(); + return objBean.toString(); } /** @@ -107,7 +107,7 @@ public class Description implements Cloneable, Serializable { * */ public String getType() { - return this._type; + return type; } /** @@ -118,7 +118,7 @@ public class Description implements Cloneable, Serializable { * */ public void setType(final String type) { - this._type = type; + this.type = type; } /** @@ -129,7 +129,7 @@ public class Description implements Cloneable, Serializable { * */ public String getValue() { - return this._value; + return value; } /** @@ -140,7 +140,7 @@ public class Description implements Cloneable, Serializable { * */ public void setValue(final String value) { - this._value = value; + this.value = value; } } diff --git a/src/main/java/com/sun/syndication/feed/rss/Enclosure.java b/src/main/java/com/sun/syndication/feed/rss/Enclosure.java index 3bfe746..e4a5442 100644 --- a/src/main/java/com/sun/syndication/feed/rss/Enclosure.java +++ b/src/main/java/com/sun/syndication/feed/rss/Enclosure.java @@ -29,10 +29,10 @@ import com.sun.syndication.feed.impl.ObjectBean; * */ public class Enclosure implements Cloneable, Serializable { - private final ObjectBean _objBean; - private String _url; - private long _length; - private String _type; + private final ObjectBean objBean; + private String url; + private long length; + private String type; /** * Default constructor. All properties are set to null. @@ -40,7 +40,7 @@ public class Enclosure implements Cloneable, Serializable { * */ public Enclosure() { - this._objBean = new ObjectBean(this.getClass(), this); + objBean = new ObjectBean(this.getClass(), this); } /** @@ -54,7 +54,7 @@ public class Enclosure implements Cloneable, Serializable { */ @Override public Object clone() throws CloneNotSupportedException { - return this._objBean.clone(); + return objBean.clone(); } /** @@ -71,7 +71,7 @@ public class Enclosure implements Cloneable, Serializable { if (!(other instanceof Enclosure)) { return false; } - return this._objBean.equals(other); + return objBean.equals(other); } /** @@ -85,7 +85,7 @@ public class Enclosure implements Cloneable, Serializable { */ @Override public int hashCode() { - return this._objBean.hashCode(); + return objBean.hashCode(); } /** @@ -97,7 +97,7 @@ public class Enclosure implements Cloneable, Serializable { */ @Override public String toString() { - return this._objBean.toString(); + return objBean.toString(); } /** @@ -108,7 +108,7 @@ public class Enclosure implements Cloneable, Serializable { * */ public String getUrl() { - return this._url; + return url; } /** @@ -119,7 +119,7 @@ public class Enclosure implements Cloneable, Serializable { * */ public void setUrl(final String url) { - this._url = url; + this.url = url; } /** @@ -130,7 +130,7 @@ public class Enclosure implements Cloneable, Serializable { * */ public long getLength() { - return this._length; + return length; } /** @@ -141,7 +141,7 @@ public class Enclosure implements Cloneable, Serializable { * */ public void setLength(final long length) { - this._length = length; + this.length = length; } /** @@ -152,7 +152,7 @@ public class Enclosure implements Cloneable, Serializable { * */ public String getType() { - return this._type; + return type; } /** @@ -163,7 +163,7 @@ public class Enclosure implements Cloneable, Serializable { * */ public void setType(final String type) { - this._type = type; + this.type = type; } } diff --git a/src/main/java/com/sun/syndication/feed/rss/Guid.java b/src/main/java/com/sun/syndication/feed/rss/Guid.java index 1a081c8..1eb2c35 100644 --- a/src/main/java/com/sun/syndication/feed/rss/Guid.java +++ b/src/main/java/com/sun/syndication/feed/rss/Guid.java @@ -29,9 +29,9 @@ import com.sun.syndication.feed.impl.ObjectBean; * */ public class Guid implements Cloneable, Serializable { - private final ObjectBean _objBean; - private boolean _permaLink; - private String _value; + private final ObjectBean objBean; + private boolean permaLink; + private String value; /** * Default constructor. All properties are set to null. @@ -39,7 +39,7 @@ public class Guid implements Cloneable, Serializable { * */ public Guid() { - this._objBean = new ObjectBean(this.getClass(), this); + objBean = new ObjectBean(this.getClass(), this); } /** @@ -53,7 +53,7 @@ public class Guid implements Cloneable, Serializable { */ @Override public Object clone() throws CloneNotSupportedException { - return this._objBean.clone(); + return objBean.clone(); } /** @@ -70,7 +70,7 @@ public class Guid implements Cloneable, Serializable { if (!(other instanceof Guid)) { return false; } - return this._objBean.equals(other); + return objBean.equals(other); } /** @@ -84,7 +84,7 @@ public class Guid implements Cloneable, Serializable { */ @Override public int hashCode() { - return this._objBean.hashCode(); + return objBean.hashCode(); } /** @@ -96,7 +96,7 @@ public class Guid implements Cloneable, Serializable { */ @Override public String toString() { - return this._objBean.toString(); + return objBean.toString(); } /** @@ -107,7 +107,7 @@ public class Guid implements Cloneable, Serializable { * */ public boolean isPermaLink() { - return this._permaLink; + return permaLink; } /** @@ -118,7 +118,7 @@ public class Guid implements Cloneable, Serializable { * */ public void setPermaLink(final boolean permaLink) { - this._permaLink = permaLink; + this.permaLink = permaLink; } /** @@ -129,7 +129,7 @@ public class Guid implements Cloneable, Serializable { * */ public String getValue() { - return this._value; + return value; } /** @@ -140,7 +140,7 @@ public class Guid implements Cloneable, Serializable { * */ public void setValue(final String value) { - this._value = value; + this.value = value; } } diff --git a/src/main/java/com/sun/syndication/feed/rss/Image.java b/src/main/java/com/sun/syndication/feed/rss/Image.java index e990cfd..78830fc 100644 --- a/src/main/java/com/sun/syndication/feed/rss/Image.java +++ b/src/main/java/com/sun/syndication/feed/rss/Image.java @@ -28,13 +28,13 @@ import com.sun.syndication.feed.impl.ObjectBean; * */ public class Image implements Cloneable, Serializable { - private final ObjectBean _objBean; - private String _title; - private String _url; - private String _link; - private Integer _width = -1; - private Integer _height = -1; - private String _description; + private final ObjectBean objBean; + private String title; + private String url; + private String link; + private Integer width = -1; + private Integer height = -1; + private String description; /** * Default constructor. All properties are set to null. @@ -42,7 +42,7 @@ public class Image implements Cloneable, Serializable { * */ public Image() { - this._objBean = new ObjectBean(this.getClass(), this); + objBean = new ObjectBean(this.getClass(), this); } /** @@ -56,7 +56,7 @@ public class Image implements Cloneable, Serializable { */ @Override public Object clone() throws CloneNotSupportedException { - return this._objBean.clone(); + return objBean.clone(); } /** @@ -73,7 +73,7 @@ public class Image implements Cloneable, Serializable { if (!(other instanceof Image)) { return false; } - return this._objBean.equals(other); + return objBean.equals(other); } /** @@ -87,7 +87,7 @@ public class Image implements Cloneable, Serializable { */ @Override public int hashCode() { - return this._objBean.hashCode(); + return objBean.hashCode(); } /** @@ -99,7 +99,7 @@ public class Image implements Cloneable, Serializable { */ @Override public String toString() { - return this._objBean.toString(); + return objBean.toString(); } /** @@ -110,7 +110,7 @@ public class Image implements Cloneable, Serializable { * */ public String getTitle() { - return this._title; + return title; } /** @@ -121,7 +121,7 @@ public class Image implements Cloneable, Serializable { * */ public void setTitle(final String title) { - this._title = title; + this.title = title; } /** @@ -132,7 +132,7 @@ public class Image implements Cloneable, Serializable { * */ public String getUrl() { - return this._url; + return url; } /** @@ -143,7 +143,7 @@ public class Image implements Cloneable, Serializable { * */ public void setUrl(final String url) { - this._url = url; + this.url = url; } /** @@ -154,7 +154,7 @@ public class Image implements Cloneable, Serializable { * */ public String getLink() { - return this._link; + return link; } /** @@ -165,7 +165,7 @@ public class Image implements Cloneable, Serializable { * */ public void setLink(final String link) { - this._link = link; + this.link = link; } /** @@ -176,7 +176,7 @@ public class Image implements Cloneable, Serializable { * */ public Integer getWidth() { - return this._width; + return width; } /** @@ -187,7 +187,7 @@ public class Image implements Cloneable, Serializable { * */ public void setWidth(final Integer width) { - this._width = width; + this.width = width; } /** @@ -198,7 +198,7 @@ public class Image implements Cloneable, Serializable { * */ public Integer getHeight() { - return this._height; + return height; } /** @@ -209,7 +209,7 @@ public class Image implements Cloneable, Serializable { * */ public void setHeight(final Integer height) { - this._height = height; + this.height = height; } /** @@ -220,7 +220,7 @@ public class Image implements Cloneable, Serializable { * */ public String getDescription() { - return this._description; + return description; } /** @@ -231,7 +231,7 @@ public class Image implements Cloneable, Serializable { * */ public void setDescription(final String description) { - this._description = description; + this.description = description; } } diff --git a/src/main/java/com/sun/syndication/feed/rss/Item.java b/src/main/java/com/sun/syndication/feed/rss/Item.java index 2f95166..c878441 100644 --- a/src/main/java/com/sun/syndication/feed/rss/Item.java +++ b/src/main/java/com/sun/syndication/feed/rss/Item.java @@ -42,22 +42,22 @@ import com.sun.syndication.feed.module.impl.ModuleUtils; * */ public class Item implements Cloneable, Serializable, Extendable { - private final ObjectBean _objBean; - private String _title; - private String _link; - private String _uri; - private Description _description; - private Content _content; - private Source _source; - private List _enclosures; - private List _categories; - private Guid _guid; - private String _comments; - private String _author; - private Date _pubDate; - private Date _expirationDate; - private List _modules; - private List _foreignMarkup; + private final ObjectBean objBean; + private String title; + private String link; + private String uri; + private Description description; + private Content content; + private Source source; + private List enclosures; + private List categories; + private Guid guid; + private String comments; + private String author; + private Date pubDate; + private Date expirationDate; + private List modules; + private List foreignMarkup; /** * Default constructor. All properties are set to null. @@ -65,7 +65,7 @@ public class Item implements Cloneable, Serializable, Extendable { * */ public Item() { - this._objBean = new ObjectBean(this.getClass(), this); + objBean = new ObjectBean(this.getClass(), this); } /** @@ -79,7 +79,7 @@ public class Item implements Cloneable, Serializable, Extendable { */ @Override public Object clone() throws CloneNotSupportedException { - return this._objBean.clone(); + return objBean.clone(); } /** @@ -99,7 +99,7 @@ public class Item implements Cloneable, Serializable, Extendable { // can't use foreign markup in equals, due to JDOM equals impl final List fm = getForeignMarkup(); setForeignMarkup(((Item) other).getForeignMarkup()); - final boolean ret = this._objBean.equals(other); + final boolean ret = objBean.equals(other); // restore foreign markup setForeignMarkup(fm); return ret; @@ -116,7 +116,7 @@ public class Item implements Cloneable, Serializable, Extendable { */ @Override public int hashCode() { - return this._objBean.hashCode(); + return objBean.hashCode(); } /** @@ -128,7 +128,7 @@ public class Item implements Cloneable, Serializable, Extendable { */ @Override public String toString() { - return this._objBean.toString(); + return objBean.toString(); } /** @@ -139,7 +139,7 @@ public class Item implements Cloneable, Serializable, Extendable { * */ public String getTitle() { - return this._title; + return title; } /** @@ -150,7 +150,7 @@ public class Item implements Cloneable, Serializable, Extendable { * */ public void setTitle(final String title) { - this._title = title; + this.title = title; } /** @@ -161,7 +161,7 @@ public class Item implements Cloneable, Serializable, Extendable { * */ public String getLink() { - return this._link; + return link; } /** @@ -172,7 +172,7 @@ public class Item implements Cloneable, Serializable, Extendable { * */ public void setLink(final String link) { - this._link = link; + this.link = link; } /** @@ -182,7 +182,7 @@ public class Item implements Cloneable, Serializable, Extendable { * @return the item uri, null if none. */ public String getUri() { - return this._uri; + return uri; } /** @@ -192,7 +192,7 @@ public class Item implements Cloneable, Serializable, Extendable { * @param uri the item uri to set, null if none. */ public void setUri(final String uri) { - this._uri = uri; + this.uri = uri; } /** @@ -203,7 +203,7 @@ public class Item implements Cloneable, Serializable, Extendable { * */ public Description getDescription() { - return this._description; + return description; } /** @@ -214,7 +214,7 @@ public class Item implements Cloneable, Serializable, Extendable { * */ public void setDescription(final Description description) { - this._description = description; + this.description = description; } /** @@ -225,7 +225,7 @@ public class Item implements Cloneable, Serializable, Extendable { * */ public Content getContent() { - return this._content; + return content; } /** @@ -236,7 +236,7 @@ public class Item implements Cloneable, Serializable, Extendable { * */ public void setContent(final Content content) { - this._content = content; + this.content = content; } /** @@ -247,7 +247,7 @@ public class Item implements Cloneable, Serializable, Extendable { * */ public Source getSource() { - return this._source; + return source; } /** @@ -258,7 +258,7 @@ public class Item implements Cloneable, Serializable, Extendable { * */ public void setSource(final Source source) { - this._source = source; + this.source = source; } /** @@ -270,7 +270,7 @@ public class Item implements Cloneable, Serializable, Extendable { * */ public List getEnclosures() { - return this._enclosures == null ? (this._enclosures = new ArrayList()) : this._enclosures; + return enclosures == null ? (enclosures = new ArrayList()) : enclosures; } /** @@ -282,7 +282,7 @@ public class Item implements Cloneable, Serializable, Extendable { * */ public void setEnclosures(final List enclosures) { - this._enclosures = enclosures; + this.enclosures = enclosures; } /** @@ -294,7 +294,7 @@ public class Item implements Cloneable, Serializable, Extendable { * */ public List getCategories() { - return this._categories == null ? (this._categories = new ArrayList()) : this._categories; + return categories == null ? (categories = new ArrayList()) : categories; } /** @@ -306,7 +306,7 @@ public class Item implements Cloneable, Serializable, Extendable { * */ public void setCategories(final List categories) { - this._categories = categories; + this.categories = categories; } /** @@ -317,7 +317,7 @@ public class Item implements Cloneable, Serializable, Extendable { * */ public Guid getGuid() { - return this._guid; + return guid; } /** @@ -328,7 +328,7 @@ public class Item implements Cloneable, Serializable, Extendable { * */ public void setGuid(final Guid guid) { - this._guid = guid; + this.guid = guid; } /** @@ -339,7 +339,7 @@ public class Item implements Cloneable, Serializable, Extendable { * */ public String getComments() { - return this._comments; + return comments; } /** @@ -350,7 +350,7 @@ public class Item implements Cloneable, Serializable, Extendable { * */ public void setComments(final String comments) { - this._comments = comments; + this.comments = comments; } /** @@ -361,7 +361,7 @@ public class Item implements Cloneable, Serializable, Extendable { * */ public String getAuthor() { - return this._author; + return author; } /** @@ -372,7 +372,7 @@ public class Item implements Cloneable, Serializable, Extendable { * */ public void setAuthor(final String author) { - this._author = author; + this.author = author; } /** @@ -385,7 +385,7 @@ public class Item implements Cloneable, Serializable, Extendable { */ @Override public List getModules() { - return this._modules == null ? (this._modules = new ArrayList()) : this._modules; + return modules == null ? (modules = new ArrayList()) : modules; } /** @@ -398,7 +398,7 @@ public class Item implements Cloneable, Serializable, Extendable { */ @Override public void setModules(final List modules) { - this._modules = modules; + this.modules = modules; } /** @@ -410,7 +410,7 @@ public class Item implements Cloneable, Serializable, Extendable { */ @Override public Module getModule(final String uri) { - return ModuleUtils.getModule(this._modules, uri); + return ModuleUtils.getModule(modules, uri); } /** @@ -421,7 +421,7 @@ public class Item implements Cloneable, Serializable, Extendable { * */ public Date getPubDate() { - return this._pubDate == null ? null : new Date(this._pubDate.getTime()); + return pubDate == null ? null : new Date(pubDate.getTime()); } /** @@ -432,7 +432,7 @@ public class Item implements Cloneable, Serializable, Extendable { * */ public void setPubDate(final Date pubDate) { - this._pubDate = pubDate == null ? null : new Date(pubDate.getTime()); + this.pubDate = pubDate == null ? null : new Date(pubDate.getTime()); } /** @@ -443,7 +443,7 @@ public class Item implements Cloneable, Serializable, Extendable { * */ public Date getExpirationDate() { - return this._expirationDate == null ? null : new Date(this._expirationDate.getTime()); + return expirationDate == null ? null : new Date(expirationDate.getTime()); } /** @@ -455,7 +455,7 @@ public class Item implements Cloneable, Serializable, Extendable { * */ public void setExpirationDate(final Date expirationDate) { - this._expirationDate = expirationDate == null ? null : new Date(expirationDate.getTime()); + this.expirationDate = expirationDate == null ? null : new Date(expirationDate.getTime()); } /** @@ -466,7 +466,7 @@ public class Item implements Cloneable, Serializable, Extendable { * */ public List getForeignMarkup() { - return this._foreignMarkup == null ? (this._foreignMarkup = new ArrayList()) : this._foreignMarkup; + return foreignMarkup == null ? (foreignMarkup = new ArrayList()) : foreignMarkup; } /** @@ -477,7 +477,7 @@ public class Item implements Cloneable, Serializable, Extendable { * */ public void setForeignMarkup(final List foreignMarkup) { - this._foreignMarkup = foreignMarkup; + this.foreignMarkup = foreignMarkup; } } diff --git a/src/main/java/com/sun/syndication/feed/rss/Source.java b/src/main/java/com/sun/syndication/feed/rss/Source.java index 723e832..38a31f2 100644 --- a/src/main/java/com/sun/syndication/feed/rss/Source.java +++ b/src/main/java/com/sun/syndication/feed/rss/Source.java @@ -29,9 +29,9 @@ import com.sun.syndication.feed.impl.ObjectBean; * */ public class Source implements Cloneable, Serializable { - private final ObjectBean _objBean; - private String _url; - private String _value; + private final ObjectBean objBean; + private String url; + private String value; /** * Default constructor. All properties are set to null. @@ -39,7 +39,7 @@ public class Source implements Cloneable, Serializable { * */ public Source() { - this._objBean = new ObjectBean(this.getClass(), this); + objBean = new ObjectBean(this.getClass(), this); } /** @@ -53,7 +53,7 @@ public class Source implements Cloneable, Serializable { */ @Override public Object clone() throws CloneNotSupportedException { - return this._objBean.clone(); + return objBean.clone(); } /** @@ -70,7 +70,7 @@ public class Source implements Cloneable, Serializable { if (!(other instanceof Source)) { return false; } - return this._objBean.equals(other); + return objBean.equals(other); } /** @@ -84,7 +84,7 @@ public class Source implements Cloneable, Serializable { */ @Override public int hashCode() { - return this._objBean.hashCode(); + return objBean.hashCode(); } /** @@ -96,7 +96,7 @@ public class Source implements Cloneable, Serializable { */ @Override public String toString() { - return this._objBean.toString(); + return objBean.toString(); } /** @@ -107,7 +107,7 @@ public class Source implements Cloneable, Serializable { * */ public String getUrl() { - return this._url; + return url; } /** @@ -118,7 +118,7 @@ public class Source implements Cloneable, Serializable { * */ public void setUrl(final String url) { - this._url = url; + this.url = url; } /** @@ -129,7 +129,7 @@ public class Source implements Cloneable, Serializable { * */ public String getValue() { - return this._value; + return value; } /** @@ -140,6 +140,6 @@ public class Source implements Cloneable, Serializable { * */ public void setValue(final String value) { - this._value = value; + this.value = value; } } diff --git a/src/main/java/com/sun/syndication/feed/rss/TextInput.java b/src/main/java/com/sun/syndication/feed/rss/TextInput.java index eed49b5..606dc94 100644 --- a/src/main/java/com/sun/syndication/feed/rss/TextInput.java +++ b/src/main/java/com/sun/syndication/feed/rss/TextInput.java @@ -29,11 +29,11 @@ import com.sun.syndication.feed.impl.ObjectBean; * */ public class TextInput implements Cloneable, Serializable { - private final ObjectBean _objBean; - private String _title; - private String _description; - private String _name; - private String _link; + private final ObjectBean objBean; + private String title; + private String description; + private String name; + private String link; /** * Default constructor. All properties are set to null. @@ -41,7 +41,7 @@ public class TextInput implements Cloneable, Serializable { * */ public TextInput() { - this._objBean = new ObjectBean(this.getClass(), this); + objBean = new ObjectBean(this.getClass(), this); } /** @@ -55,7 +55,7 @@ public class TextInput implements Cloneable, Serializable { */ @Override public Object clone() throws CloneNotSupportedException { - return this._objBean.clone(); + return objBean.clone(); } /** @@ -72,7 +72,7 @@ public class TextInput implements Cloneable, Serializable { if (!(other instanceof TextInput)) { return false; } - return this._objBean.equals(other); + return objBean.equals(other); } /** @@ -86,7 +86,7 @@ public class TextInput implements Cloneable, Serializable { */ @Override public int hashCode() { - return this._objBean.hashCode(); + return objBean.hashCode(); } /** @@ -98,7 +98,7 @@ public class TextInput implements Cloneable, Serializable { */ @Override public String toString() { - return this._objBean.toString(); + return objBean.toString(); } /** @@ -109,7 +109,7 @@ public class TextInput implements Cloneable, Serializable { * */ public String getTitle() { - return this._title; + return title; } /** @@ -120,7 +120,7 @@ public class TextInput implements Cloneable, Serializable { * */ public void setTitle(final String title) { - this._title = title; + this.title = title; } /** @@ -131,7 +131,7 @@ public class TextInput implements Cloneable, Serializable { * */ public String getDescription() { - return this._description; + return description; } /** @@ -143,7 +143,7 @@ public class TextInput implements Cloneable, Serializable { * */ public void setDescription(final String description) { - this._description = description; + this.description = description; } /** @@ -154,7 +154,7 @@ public class TextInput implements Cloneable, Serializable { * */ public String getName() { - return this._name; + return name; } /** @@ -165,7 +165,7 @@ public class TextInput implements Cloneable, Serializable { * */ public void setName(final String name) { - this._name = name; + this.name = name; } /** @@ -176,7 +176,7 @@ public class TextInput implements Cloneable, Serializable { * */ public String getLink() { - return this._link; + return link; } /** @@ -187,7 +187,7 @@ public class TextInput implements Cloneable, Serializable { * */ public void setLink(final String link) { - this._link = link; + this.link = link; } } diff --git a/src/main/java/com/sun/syndication/feed/synd/SyndCategoryImpl.java b/src/main/java/com/sun/syndication/feed/synd/SyndCategoryImpl.java index df79686..0bb5192 100644 --- a/src/main/java/com/sun/syndication/feed/synd/SyndCategoryImpl.java +++ b/src/main/java/com/sun/syndication/feed/synd/SyndCategoryImpl.java @@ -34,8 +34,8 @@ import com.sun.syndication.feed.module.DCSubjectImpl; * */ public class SyndCategoryImpl implements Serializable, SyndCategory { - private final ObjectBean _objBean; - private final DCSubject _subject; + private final ObjectBean objBean; + private final DCSubject subject; /** * For implementations extending SyndContentImpl to be able to use the @@ -45,8 +45,8 @@ public class SyndCategoryImpl implements Serializable, SyndCategory { * @param subject the DC subject to wrap. */ SyndCategoryImpl(final DCSubject subject) { - this._objBean = new ObjectBean(SyndCategory.class, this); - this._subject = subject; + objBean = new ObjectBean(SyndCategory.class, this); + this.subject = subject; } /** @@ -60,7 +60,7 @@ public class SyndCategoryImpl implements Serializable, SyndCategory { */ @Override public Object clone() throws CloneNotSupportedException { - return this._objBean.clone(); + return objBean.clone(); } /** @@ -77,7 +77,7 @@ public class SyndCategoryImpl implements Serializable, SyndCategory { if (!(other instanceof SyndCategoryImpl)) { return false; } - return this._objBean.equals(other); + return objBean.equals(other); } /** @@ -91,7 +91,7 @@ public class SyndCategoryImpl implements Serializable, SyndCategory { */ @Override public int hashCode() { - return this._objBean.hashCode(); + return objBean.hashCode(); } /** @@ -103,7 +103,7 @@ public class SyndCategoryImpl implements Serializable, SyndCategory { */ @Override public String toString() { - return this._objBean.toString(); + return objBean.toString(); } /** @@ -114,7 +114,7 @@ public class SyndCategoryImpl implements Serializable, SyndCategory { * */ DCSubject getSubject() { - return this._subject; + return subject; } /** @@ -135,7 +135,7 @@ public class SyndCategoryImpl implements Serializable, SyndCategory { */ @Override public String getName() { - return this._subject.getValue(); + return subject.getValue(); } /** @@ -147,7 +147,7 @@ public class SyndCategoryImpl implements Serializable, SyndCategory { */ @Override public void setName(final String name) { - this._subject.setValue(name); + subject.setValue(name); } /** @@ -159,7 +159,7 @@ public class SyndCategoryImpl implements Serializable, SyndCategory { */ @Override public String getTaxonomyUri() { - return this._subject.getTaxonomyUri(); + return subject.getTaxonomyUri(); } /** @@ -171,7 +171,7 @@ public class SyndCategoryImpl implements Serializable, SyndCategory { */ @Override public void setTaxonomyUri(final String taxonomyUri) { - this._subject.setTaxonomyUri(taxonomyUri); + subject.setTaxonomyUri(taxonomyUri); } } @@ -195,7 +195,7 @@ public class SyndCategoryImpl implements Serializable, SyndCategory { * */ class SyndCategoryListFacade extends AbstractList { - private final List _subjects; + private final List subjects; /** * Default constructor. Creates and empty list. @@ -212,7 +212,7 @@ class SyndCategoryListFacade extends AbstractList { * */ public SyndCategoryListFacade(final List subjects) { - this._subjects = subjects; + this.subjects = subjects; } /** @@ -225,7 +225,7 @@ class SyndCategoryListFacade extends AbstractList { */ @Override public SyndCategory get(final int index) { - return new SyndCategoryImpl(this._subjects.get(index)); + return new SyndCategoryImpl(subjects.get(index)); } /** @@ -237,7 +237,7 @@ class SyndCategoryListFacade extends AbstractList { */ @Override public int size() { - return this._subjects.size(); + return subjects.size(); } /** @@ -254,7 +254,7 @@ class SyndCategoryListFacade extends AbstractList { public SyndCategory set(final int index, final SyndCategory obj) { final SyndCategoryImpl sCat = (SyndCategoryImpl) obj; DCSubject subject = sCat != null ? sCat.getSubject() : null; - subject = this._subjects.set(index, subject); + subject = subjects.set(index, subject); return subject != null ? new SyndCategoryImpl(subject) : null; } @@ -270,7 +270,7 @@ class SyndCategoryListFacade extends AbstractList { public void add(final int index, final SyndCategory obj) { final SyndCategoryImpl sCat = (SyndCategoryImpl) obj; final DCSubject subject = sCat != null ? sCat.getSubject() : null; - this._subjects.add(index, subject); + subjects.add(index, subject); } /** @@ -284,7 +284,7 @@ class SyndCategoryListFacade extends AbstractList { */ @Override public SyndCategory remove(final int index) { - final DCSubject subject = this._subjects.remove(index); + final DCSubject subject = subjects.remove(index); return subject != null ? new SyndCategoryImpl(subject) : null; } diff --git a/src/main/java/com/sun/syndication/feed/synd/SyndContentImpl.java b/src/main/java/com/sun/syndication/feed/synd/SyndContentImpl.java index e5f44b6..6f0c7df 100644 --- a/src/main/java/com/sun/syndication/feed/synd/SyndContentImpl.java +++ b/src/main/java/com/sun/syndication/feed/synd/SyndContentImpl.java @@ -33,10 +33,10 @@ import com.sun.syndication.feed.impl.ObjectBean; * */ public class SyndContentImpl implements Serializable, SyndContent { - private final ObjectBean _objBean; - private String _type; - private String _value; - private String _mode; + private final ObjectBean objBean; + private String type; + private String value; + private String mode; /** * Default constructor. All properties are set to null. @@ -44,7 +44,7 @@ public class SyndContentImpl implements Serializable, SyndContent { * */ public SyndContentImpl() { - this._objBean = new ObjectBean(SyndContent.class, this); + objBean = new ObjectBean(SyndContent.class, this); } /** @@ -58,7 +58,7 @@ public class SyndContentImpl implements Serializable, SyndContent { */ @Override public Object clone() throws CloneNotSupportedException { - return this._objBean.clone(); + return objBean.clone(); } /** @@ -72,7 +72,7 @@ public class SyndContentImpl implements Serializable, SyndContent { */ @Override public boolean equals(final Object other) { - return this._objBean.equals(other); + return objBean.equals(other); } /** @@ -86,7 +86,7 @@ public class SyndContentImpl implements Serializable, SyndContent { */ @Override public int hashCode() { - return this._objBean.hashCode(); + return objBean.hashCode(); } /** @@ -98,7 +98,7 @@ public class SyndContentImpl implements Serializable, SyndContent { */ @Override public String toString() { - return this._objBean.toString(); + return objBean.toString(); } /** @@ -113,7 +113,7 @@ public class SyndContentImpl implements Serializable, SyndContent { */ @Override public String getType() { - return this._type; + return type; } /** @@ -128,7 +128,7 @@ public class SyndContentImpl implements Serializable, SyndContent { */ @Override public void setType(final String type) { - this._type = type; + this.type = type; } /** @@ -139,7 +139,7 @@ public class SyndContentImpl implements Serializable, SyndContent { */ @Override public String getMode() { - return this._mode; + return mode; } /** @@ -150,7 +150,7 @@ public class SyndContentImpl implements Serializable, SyndContent { */ @Override public void setMode(final String mode) { - this._mode = mode; + this.mode = mode; } /** @@ -162,7 +162,7 @@ public class SyndContentImpl implements Serializable, SyndContent { */ @Override public String getValue() { - return this._value; + return value; } /** @@ -174,7 +174,7 @@ public class SyndContentImpl implements Serializable, SyndContent { */ @Override public void setValue(final String value) { - this._value = value; + this.value = value; } @Override diff --git a/src/main/java/com/sun/syndication/feed/synd/SyndEnclosureImpl.java b/src/main/java/com/sun/syndication/feed/synd/SyndEnclosureImpl.java index 3fe2b34..c8b1482 100644 --- a/src/main/java/com/sun/syndication/feed/synd/SyndEnclosureImpl.java +++ b/src/main/java/com/sun/syndication/feed/synd/SyndEnclosureImpl.java @@ -13,10 +13,10 @@ import com.sun.syndication.feed.impl.ObjectBean; * @author Alejandro Abdelnur */ public class SyndEnclosureImpl implements Serializable, SyndEnclosure { - private final ObjectBean _objBean; - private String _url; - private String _type; - private long _length; + private final ObjectBean objBean; + private String url; + private String type; + private long length; /** * Default constructor. All properties are set to null. @@ -24,7 +24,7 @@ public class SyndEnclosureImpl implements Serializable, SyndEnclosure { * */ public SyndEnclosureImpl() { - this._objBean = new ObjectBean(SyndEnclosure.class, this); + objBean = new ObjectBean(SyndEnclosure.class, this); } /** @@ -38,7 +38,7 @@ public class SyndEnclosureImpl implements Serializable, SyndEnclosure { */ @Override public Object clone() throws CloneNotSupportedException { - return this._objBean.clone(); + return objBean.clone(); } /** @@ -52,7 +52,7 @@ public class SyndEnclosureImpl implements Serializable, SyndEnclosure { */ @Override public boolean equals(final Object other) { - return this._objBean.equals(other); + return objBean.equals(other); } /** @@ -66,7 +66,7 @@ public class SyndEnclosureImpl implements Serializable, SyndEnclosure { */ @Override public int hashCode() { - return this._objBean.hashCode(); + return objBean.hashCode(); } /** @@ -78,7 +78,7 @@ public class SyndEnclosureImpl implements Serializable, SyndEnclosure { */ @Override public String toString() { - return this._objBean.toString(); + return objBean.toString(); } /** @@ -89,7 +89,7 @@ public class SyndEnclosureImpl implements Serializable, SyndEnclosure { */ @Override public String getUrl() { - return this._url; + return url; } /** @@ -100,7 +100,7 @@ public class SyndEnclosureImpl implements Serializable, SyndEnclosure { */ @Override public void setUrl(final String url) { - this._url = url; + this.url = url; } /** @@ -111,7 +111,7 @@ public class SyndEnclosureImpl implements Serializable, SyndEnclosure { */ @Override public long getLength() { - return this._length; + return length; } /** @@ -122,7 +122,7 @@ public class SyndEnclosureImpl implements Serializable, SyndEnclosure { */ @Override public void setLength(final long length) { - this._length = length; + this.length = length; } /** @@ -133,7 +133,7 @@ public class SyndEnclosureImpl implements Serializable, SyndEnclosure { */ @Override public String getType() { - return this._type; + return type; } /** @@ -144,7 +144,7 @@ public class SyndEnclosureImpl implements Serializable, SyndEnclosure { */ @Override public void setType(final String type) { - this._type = type; + this.type = type; } @Override diff --git a/src/main/java/com/sun/syndication/feed/synd/SyndEntryImpl.java b/src/main/java/com/sun/syndication/feed/synd/SyndEntryImpl.java index 0a336c5..0b91e87 100644 --- a/src/main/java/com/sun/syndication/feed/synd/SyndEntryImpl.java +++ b/src/main/java/com/sun/syndication/feed/synd/SyndEntryImpl.java @@ -47,25 +47,25 @@ import com.sun.syndication.feed.synd.impl.URINormalizer; * */ public class SyndEntryImpl implements Serializable, SyndEntry { - private final ObjectBean _objBean; - private String _uri; - private String _link; - private Date _updatedDate; - private SyndContent _title; - private SyndContent _description; - private List _links; - private List _contents; // deprecated by Atom 1.0 - private List _modules; - private List _enclosures; - private List _authors; - private List _contributors; - private SyndFeed _source; - private List _foreignMarkup; + private final ObjectBean objBean; + private String uri; + private String link; + private Date updatedDate; + private SyndContent title; + private SyndContent description; + private List links; + private List contents; // deprecated by Atom 1.0 + private List modules; + private List enclosures; + private List authors; + private List contributors; + private SyndFeed source; + private List foreignMarkup; private Object wireEntry; // com.sun.syndication.feed.atom.Entry or // com.sun.syndication.feed.rss.Item // ISSUE: some converters assume this is never null - private List _categories = new ArrayList(); + private List categories = new ArrayList(); private static final Set IGNORE_PROPERTIES = new HashSet(); @@ -95,7 +95,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry { * */ protected SyndEntryImpl(final Class beanClass, final Set convenienceProperties) { - this._objBean = new ObjectBean(beanClass, this, convenienceProperties); + objBean = new ObjectBean(beanClass, this, convenienceProperties); } /** @@ -118,7 +118,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry { */ @Override public Object clone() throws CloneNotSupportedException { - return this._objBean.clone(); + return objBean.clone(); } /** @@ -144,7 +144,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry { // can't use foreign markup in equals, due to JDOM equals impl final List fm = getForeignMarkup(); setForeignMarkup(((SyndEntryImpl) other).getForeignMarkup()); - final boolean ret = this._objBean.equals(other); + final boolean ret = objBean.equals(other); // restore foreign markup setForeignMarkup(fm); return ret; @@ -161,7 +161,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry { */ @Override public int hashCode() { - return this._objBean.hashCode(); + return objBean.hashCode(); } /** @@ -173,7 +173,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry { */ @Override public String toString() { - return this._objBean.toString(); + return objBean.toString(); } /** @@ -193,7 +193,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry { */ @Override public String getUri() { - return this._uri; + return uri; } /** @@ -211,7 +211,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry { */ @Override public void setUri(final String uri) { - this._uri = URINormalizer.normalize(uri); + this.uri = URINormalizer.normalize(uri); } /** @@ -223,8 +223,8 @@ public class SyndEntryImpl implements Serializable, SyndEntry { */ @Override public String getTitle() { - if (this._title != null) { - return this._title.getValue(); + if (title != null) { + return title.getValue(); } return null; } @@ -238,10 +238,10 @@ public class SyndEntryImpl implements Serializable, SyndEntry { */ @Override public void setTitle(final String title) { - if (this._title == null) { - this._title = new SyndContentImpl(); + if (this.title == null) { + this.title = new SyndContentImpl(); } - this._title.setValue(title); + this.title.setValue(title); } /** @@ -253,7 +253,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry { */ @Override public SyndContent getTitleEx() { - return this._title; + return title; } /** @@ -265,7 +265,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry { */ @Override public void setTitleEx(final SyndContent title) { - this._title = title; + this.title = title; } /** @@ -277,7 +277,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry { */ @Override public String getLink() { - return this._link; + return link; } /** @@ -289,7 +289,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry { */ @Override public void setLink(final String link) { - this._link = link; + this.link = link; } /** @@ -301,7 +301,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry { */ @Override public SyndContent getDescription() { - return this._description; + return description; } /** @@ -313,7 +313,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry { */ @Override public void setDescription(final SyndContent description) { - this._description = description; + this.description = description; } /** @@ -326,7 +326,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry { */ @Override public List getContents() { - return this._contents == null ? (this._contents = new ArrayList()) : this._contents; + return contents == null ? (contents = new ArrayList()) : contents; } /** @@ -339,7 +339,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry { */ @Override public void setContents(final List contents) { - this._contents = contents; + this.contents = contents; } /** @@ -352,7 +352,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry { */ @Override public List getEnclosures() { - return this._enclosures == null ? (this._enclosures = new ArrayList()) : this._enclosures; + return enclosures == null ? (enclosures = new ArrayList()) : enclosures; } /** @@ -365,7 +365,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry { */ @Override public void setEnclosures(final List enclosures) { - this._enclosures = enclosures; + this.enclosures = enclosures; } /** @@ -409,7 +409,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry { */ @Override public List getCategories() { - return this._categories; + return categories; } /** @@ -425,7 +425,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry { */ @Override public void setCategories(final List categories) { - this._categories = categories; + this.categories = categories; } /** @@ -438,13 +438,13 @@ public class SyndEntryImpl implements Serializable, SyndEntry { */ @Override public List getModules() { - if (this._modules == null) { - this._modules = new ArrayList(); + if (modules == null) { + modules = new ArrayList(); } - if (ModuleUtils.getModule(this._modules, DCModule.URI) == null) { - this._modules.add(new DCModuleImpl()); + if (ModuleUtils.getModule(modules, DCModule.URI) == null) { + modules.add(new DCModuleImpl()); } - return this._modules; + return modules; } /** @@ -457,7 +457,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry { */ @Override public void setModules(final List modules) { - this._modules = modules; + this.modules = modules; } /** @@ -522,7 +522,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry { */ @Override public List getLinks() { - return this._links == null ? (this._links = new ArrayList()) : this._links; + return links == null ? (links = new ArrayList()) : links; } /** @@ -533,7 +533,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry { */ @Override public void setLinks(final List links) { - this._links = links; + this.links = links; } /** @@ -544,7 +544,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry { */ @Override public Date getUpdatedDate() { - return this._updatedDate == null ? null : new Date(this._updatedDate.getTime()); + return updatedDate == null ? null : new Date(updatedDate.getTime()); } /** @@ -555,12 +555,12 @@ public class SyndEntryImpl implements Serializable, SyndEntry { */ @Override public void setUpdatedDate(final Date updatedDate) { - this._updatedDate = new Date(updatedDate.getTime()); + this.updatedDate = new Date(updatedDate.getTime()); } @Override public List getAuthors() { - return this._authors == null ? (this._authors = new ArrayList()) : this._authors; + return authors == null ? (authors = new ArrayList()) : authors; } /* @@ -569,7 +569,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry { */ @Override public void setAuthors(final List authors) { - this._authors = authors; + this.authors = authors; } /** @@ -586,10 +586,10 @@ public class SyndEntryImpl implements Serializable, SyndEntry { public String getAuthor() { String author; - // Start out looking for one or more authors in _authors. For non-Atom - // feeds, _authors may actually be null. - if (this._authors != null && this._authors.size() > 0) { - author = this._authors.get(0).getName(); + // Start out looking for one or more authors in authors. For non-Atom + // feeds, authors may actually be null. + if (authors != null && authors.size() > 0) { + author = authors.get(0).getName(); } else { author = getDCModule().getCreator(); } @@ -624,7 +624,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry { @Override public List getContributors() { - return this._contributors == null ? (this._contributors = new ArrayList()) : this._contributors; + return contributors == null ? (contributors = new ArrayList()) : contributors; } /* @@ -634,17 +634,17 @@ public class SyndEntryImpl implements Serializable, SyndEntry { */ @Override public void setContributors(final List contributors) { - this._contributors = contributors; + this.contributors = contributors; } @Override public SyndFeed getSource() { - return this._source; + return source; } @Override public void setSource(final SyndFeed source) { - this._source = source; + this.source = source; } /** @@ -657,7 +657,7 @@ public class SyndEntryImpl implements Serializable, SyndEntry { */ @Override public List getForeignMarkup() { - return this._foreignMarkup == null ? (this._foreignMarkup = new ArrayList()) : this._foreignMarkup; + return foreignMarkup == null ? (foreignMarkup = new ArrayList()) : foreignMarkup; } /** @@ -670,12 +670,12 @@ public class SyndEntryImpl implements Serializable, SyndEntry { */ @Override public void setForeignMarkup(final List foreignMarkup) { - this._foreignMarkup = foreignMarkup; + this.foreignMarkup = foreignMarkup; } @Override public Object getWireEntry() { - return this.wireEntry; + return wireEntry; } public void setWireEntry(final Object wireEntry) { 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 28ada2b..335f86e 100644 --- a/src/main/java/com/sun/syndication/feed/synd/SyndFeedImpl.java +++ b/src/main/java/com/sun/syndication/feed/synd/SyndFeedImpl.java @@ -53,21 +53,21 @@ import com.sun.syndication.feed.synd.impl.URINormalizer; */ public class SyndFeedImpl implements Serializable, SyndFeed { - private final ObjectBean _objBean; + private final ObjectBean objBean; - private String _encoding; - private String _uri; - private SyndContent _title; - private SyndContent _description; - private String _feedType; - private String _link; - private List _links; - private SyndImage _image; - private List _entries; - private List _modules; - private List _authors; - private List _contributors; - private List _foreignMarkup; + private String encoding; + private String uri; + private SyndContent title; + private SyndContent description; + private String feedType; + private String link; + private List links; + private SyndImage image; + private List entries; + private List modules; + private List authors; + private List contributors; + private List foreignMarkup; private WireFeed wireFeed = null; private boolean preserveWireFeed = false; @@ -118,7 +118,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed { * */ protected SyndFeedImpl(final Class beanClass, final Set convenienceProperties) { - this._objBean = new ObjectBean(beanClass, this, convenienceProperties); + objBean = new ObjectBean(beanClass, this, convenienceProperties); } /** @@ -155,15 +155,15 @@ public class SyndFeedImpl implements Serializable, SyndFeed { this(SyndFeed.class, IGNORE_PROPERTIES); if (preserveWireFeed) { - this.wireFeed = feed; + wireFeed = feed; this.preserveWireFeed = preserveWireFeed; } if (feed != null) { - this._feedType = feed.getFeedType(); - final Converter converter = CONVERTERS.getConverter(this._feedType); + feedType = feed.getFeedType(); + final Converter converter = CONVERTERS.getConverter(feedType); if (converter == null) { - throw new IllegalArgumentException("Invalid feed type [" + this._feedType + "]"); + throw new IllegalArgumentException("Invalid feed type [" + feedType + "]"); } converter.copyInto(feed, this); } @@ -181,7 +181,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed { */ @Override public Object clone() throws CloneNotSupportedException { - return this._objBean.clone(); + return objBean.clone(); } /** @@ -201,7 +201,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed { // can't use foreign markup in equals, due to JDOM equals impl final List fm = getForeignMarkup(); setForeignMarkup(((SyndFeedImpl) other).getForeignMarkup()); - final boolean ret = this._objBean.equals(other); + final boolean ret = objBean.equals(other); setForeignMarkup(fm); // restore foreign markup return ret; } @@ -217,7 +217,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed { */ @Override public int hashCode() { - return this._objBean.hashCode(); + return objBean.hashCode(); } /** @@ -229,7 +229,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed { */ @Override public String toString() { - return this._objBean.toString(); + return objBean.toString(); } /** @@ -244,7 +244,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed { */ @Override public WireFeed createWireFeed() { - return this.createWireFeed(this._feedType); + return this.createWireFeed(feedType); } /** @@ -281,7 +281,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed { */ @Override public WireFeed originalWireFeed() { - return this.wireFeed; + return wireFeed; } /** @@ -294,7 +294,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed { */ @Override public String getFeedType() { - return this._feedType; + return feedType; } /** @@ -306,7 +306,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed { */ @Override public void setFeedType(final String feedType) { - this._feedType = feedType; + this.feedType = feedType; } /** @@ -319,7 +319,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed { */ @Override public String getEncoding() { - return this._encoding; + return encoding; } /** @@ -331,7 +331,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed { */ @Override public void setEncoding(final String encoding) { - this._encoding = encoding; + this.encoding = encoding; } /** @@ -363,7 +363,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed { */ @Override public String getUri() { - return this._uri; + return uri; } /** @@ -393,7 +393,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed { */ @Override public void setUri(final String uri) { - this._uri = URINormalizer.normalize(uri); + this.uri = URINormalizer.normalize(uri); } /** @@ -405,8 +405,8 @@ public class SyndFeedImpl implements Serializable, SyndFeed { */ @Override public String getTitle() { - if (this._title != null) { - return this._title.getValue(); + if (title != null) { + return title.getValue(); } return null; } @@ -420,10 +420,10 @@ public class SyndFeedImpl implements Serializable, SyndFeed { */ @Override public void setTitle(final String title) { - if (this._title == null) { - this._title = new SyndContentImpl(); + if (this.title == null) { + this.title = new SyndContentImpl(); } - this._title.setValue(title); + this.title.setValue(title); } /** @@ -435,7 +435,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed { */ @Override public SyndContent getTitleEx() { - return this._title; + return title; } /** @@ -447,7 +447,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed { */ @Override public void setTitleEx(final SyndContent title) { - this._title = title; + this.title = title; } /** @@ -471,7 +471,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed { */ @Override public String getLink() { - return this._link; + return link; } /** @@ -495,7 +495,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed { */ @Override public void setLink(final String link) { - this._link = link; + this.link = link; } /** @@ -507,8 +507,8 @@ public class SyndFeedImpl implements Serializable, SyndFeed { */ @Override public String getDescription() { - if (this._description != null) { - return this._description.getValue(); + if (description != null) { + return description.getValue(); } return null; } @@ -522,10 +522,10 @@ public class SyndFeedImpl implements Serializable, SyndFeed { */ @Override public void setDescription(final String description) { - if (this._description == null) { - this._description = new SyndContentImpl(); + if (this.description == null) { + this.description = new SyndContentImpl(); } - this._description.setValue(description); + this.description.setValue(description); } /** @@ -537,7 +537,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed { */ @Override public SyndContent getDescriptionEx() { - return this._description; + return description; } /** @@ -549,7 +549,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed { */ @Override public void setDescriptionEx(final SyndContent description) { - this._description = description; + this.description = description; } /** @@ -621,7 +621,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed { */ @Override public SyndImage getImage() { - return this._image; + return image; } /** @@ -633,7 +633,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed { */ @Override public void setImage(final SyndImage image) { - this._image = image; + this.image = image; } /** @@ -678,7 +678,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed { */ @Override public List getEntries() { - return this._entries == null ? (this._entries = new ArrayList()) : this._entries; + return entries == null ? (entries = new ArrayList()) : entries; } /** @@ -691,7 +691,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed { */ @Override public void setEntries(final List entries) { - this._entries = entries; + this.entries = entries; } /** @@ -734,13 +734,13 @@ public class SyndFeedImpl implements Serializable, SyndFeed { */ @Override public List getModules() { - if (this._modules == null) { - this._modules = new ArrayList(); + if (modules == null) { + modules = new ArrayList(); } - if (ModuleUtils.getModule(this._modules, DCModule.URI) == null) { - this._modules.add(new DCModuleImpl()); + if (ModuleUtils.getModule(modules, DCModule.URI) == null) { + modules.add(new DCModuleImpl()); } - return this._modules; + return modules; } /** @@ -753,7 +753,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed { */ @Override public void setModules(final List modules) { - this._modules = modules; + this.modules = modules; } /** @@ -821,7 +821,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed { */ @Override public List getLinks() { - return this._links == null ? (this._links = new ArrayList()) : this._links; + return links == null ? (links = new ArrayList()) : links; } /** @@ -832,17 +832,17 @@ public class SyndFeedImpl implements Serializable, SyndFeed { */ @Override public void setLinks(final List links) { - this._links = links; + this.links = links; } @Override public List getAuthors() { - return this._authors == null ? (this._authors = new ArrayList()) : this._authors; + return authors == null ? (authors = new ArrayList()) : authors; } @Override public void setAuthors(final List authors) { - this._authors = authors; + this.authors = authors; } /** @@ -877,12 +877,12 @@ public class SyndFeedImpl implements Serializable, SyndFeed { @Override public List getContributors() { - return this._contributors == null ? (this._contributors = new ArrayList()) : this._contributors; + return contributors == null ? (contributors = new ArrayList()) : contributors; } @Override public void setContributors(final List contributors) { - this._contributors = contributors; + this.contributors = contributors; } /** @@ -894,7 +894,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed { */ @Override public List getForeignMarkup() { - return this._foreignMarkup == null ? (this._foreignMarkup = new ArrayList()) : this._foreignMarkup; + return foreignMarkup == null ? (foreignMarkup = new ArrayList()) : foreignMarkup; } /** @@ -906,11 +906,11 @@ public class SyndFeedImpl implements Serializable, SyndFeed { */ @Override public void setForeignMarkup(final List foreignMarkup) { - this._foreignMarkup = foreignMarkup; + this.foreignMarkup = foreignMarkup; } @Override public boolean isPreservingWireFeed() { - return this.preserveWireFeed; + return preserveWireFeed; } } diff --git a/src/main/java/com/sun/syndication/feed/synd/SyndImageImpl.java b/src/main/java/com/sun/syndication/feed/synd/SyndImageImpl.java index 7f5c972..ffba60d 100644 --- a/src/main/java/com/sun/syndication/feed/synd/SyndImageImpl.java +++ b/src/main/java/com/sun/syndication/feed/synd/SyndImageImpl.java @@ -33,11 +33,11 @@ import com.sun.syndication.feed.impl.ObjectBean; * */ public class SyndImageImpl implements Serializable, SyndImage { - private final ObjectBean _objBean; - private String _title; - private String _url; - private String _link; - private String _description; + private final ObjectBean objBean; + private String title; + private String url; + private String link; + private String description; /** * Default constructor. All properties are set to null. @@ -45,7 +45,7 @@ public class SyndImageImpl implements Serializable, SyndImage { * */ public SyndImageImpl() { - this._objBean = new ObjectBean(SyndImage.class, this); + objBean = new ObjectBean(SyndImage.class, this); } /** @@ -59,7 +59,7 @@ public class SyndImageImpl implements Serializable, SyndImage { */ @Override public Object clone() throws CloneNotSupportedException { - return this._objBean.clone(); + return objBean.clone(); } /** @@ -73,7 +73,7 @@ public class SyndImageImpl implements Serializable, SyndImage { */ @Override public boolean equals(final Object other) { - return this._objBean.equals(other); + return objBean.equals(other); } /** @@ -87,7 +87,7 @@ public class SyndImageImpl implements Serializable, SyndImage { */ @Override public int hashCode() { - return this._objBean.hashCode(); + return objBean.hashCode(); } /** @@ -99,7 +99,7 @@ public class SyndImageImpl implements Serializable, SyndImage { */ @Override public String toString() { - return this._objBean.toString(); + return objBean.toString(); } /** @@ -111,7 +111,7 @@ public class SyndImageImpl implements Serializable, SyndImage { */ @Override public String getTitle() { - return this._title; + return title; } /** @@ -123,7 +123,7 @@ public class SyndImageImpl implements Serializable, SyndImage { */ @Override public void setTitle(final String title) { - this._title = title; + this.title = title; } /** @@ -135,7 +135,7 @@ public class SyndImageImpl implements Serializable, SyndImage { */ @Override public String getUrl() { - return this._url; + return url; } /** @@ -147,7 +147,7 @@ public class SyndImageImpl implements Serializable, SyndImage { */ @Override public void setUrl(final String url) { - this._url = url; + this.url = url; } /** @@ -159,7 +159,7 @@ public class SyndImageImpl implements Serializable, SyndImage { */ @Override public String getLink() { - return this._link; + return link; } /** @@ -171,7 +171,7 @@ public class SyndImageImpl implements Serializable, SyndImage { */ @Override public void setLink(final String link) { - this._link = link; + this.link = link; } /** @@ -183,7 +183,7 @@ public class SyndImageImpl implements Serializable, SyndImage { */ @Override public String getDescription() { - return this._description; + return description; } /** @@ -195,7 +195,7 @@ public class SyndImageImpl implements Serializable, SyndImage { */ @Override public void setDescription(final String description) { - this._description = description; + this.description = description; } @Override diff --git a/src/main/java/com/sun/syndication/feed/synd/SyndLinkImpl.java b/src/main/java/com/sun/syndication/feed/synd/SyndLinkImpl.java index b60a043..df9bc79 100644 --- a/src/main/java/com/sun/syndication/feed/synd/SyndLinkImpl.java +++ b/src/main/java/com/sun/syndication/feed/synd/SyndLinkImpl.java @@ -30,14 +30,14 @@ import com.sun.syndication.feed.impl.ObjectBean; */ public class SyndLinkImpl implements Cloneable, Serializable, SyndLink { - private final ObjectBean _objBean; + private final ObjectBean objBean; - private String _href; - private String _rel; - private String _type; - private String _hreflang; - private String _title; - private long _length; + private String href; + private String rel; + private String type; + private String hreflang; + private String title; + private long length; /** * Default constructor. All properties are set to null. @@ -45,7 +45,7 @@ public class SyndLinkImpl implements Cloneable, Serializable, SyndLink { * */ public SyndLinkImpl() { - this._objBean = new ObjectBean(this.getClass(), this); + objBean = new ObjectBean(this.getClass(), this); } /** @@ -59,7 +59,7 @@ public class SyndLinkImpl implements Cloneable, Serializable, SyndLink { */ @Override public Object clone() throws CloneNotSupportedException { - return this._objBean.clone(); + return objBean.clone(); } /** @@ -76,7 +76,7 @@ public class SyndLinkImpl implements Cloneable, Serializable, SyndLink { if (!(other instanceof SyndLinkImpl)) { return false; } - return this._objBean.equals(other); + return objBean.equals(other); } /** @@ -90,7 +90,7 @@ public class SyndLinkImpl implements Cloneable, Serializable, SyndLink { */ @Override public int hashCode() { - return this._objBean.hashCode(); + return objBean.hashCode(); } /** @@ -102,7 +102,7 @@ public class SyndLinkImpl implements Cloneable, Serializable, SyndLink { */ @Override public String toString() { - return this._objBean.toString(); + return objBean.toString(); } /** @@ -114,7 +114,7 @@ public class SyndLinkImpl implements Cloneable, Serializable, SyndLink { */ @Override public String getRel() { - return this._rel; + return rel; } /** @@ -127,7 +127,7 @@ public class SyndLinkImpl implements Cloneable, Serializable, SyndLink { @Override public void setRel(final String rel) { // TODO add check, ask P@ about the check - this._rel = rel; + this.rel = rel; } /** @@ -139,7 +139,7 @@ public class SyndLinkImpl implements Cloneable, Serializable, SyndLink { */ @Override public String getType() { - return this._type; + return type; } /** @@ -151,7 +151,7 @@ public class SyndLinkImpl implements Cloneable, Serializable, SyndLink { */ @Override public void setType(final String type) { - this._type = type; + this.type = type; } /** @@ -163,7 +163,7 @@ public class SyndLinkImpl implements Cloneable, Serializable, SyndLink { */ @Override public String getHref() { - return this._href; + return href; } /** @@ -175,7 +175,7 @@ public class SyndLinkImpl implements Cloneable, Serializable, SyndLink { */ @Override public void setHref(final String href) { - this._href = href; + this.href = href; } /** @@ -187,7 +187,7 @@ public class SyndLinkImpl implements Cloneable, Serializable, SyndLink { */ @Override public String getTitle() { - return this._title; + return title; } /** @@ -199,7 +199,7 @@ public class SyndLinkImpl implements Cloneable, Serializable, SyndLink { */ @Override public void setTitle(final String title) { - this._title = title; + this.title = title; } /** @@ -210,7 +210,7 @@ public class SyndLinkImpl implements Cloneable, Serializable, SyndLink { */ @Override public String getHreflang() { - return this._hreflang; + return hreflang; } /** @@ -221,7 +221,7 @@ public class SyndLinkImpl implements Cloneable, Serializable, SyndLink { */ @Override public void setHreflang(final String hreflang) { - this._hreflang = hreflang; + this.hreflang = hreflang; } /** @@ -232,7 +232,7 @@ public class SyndLinkImpl implements Cloneable, Serializable, SyndLink { */ @Override public long getLength() { - return this._length; + return length; } /** @@ -243,6 +243,6 @@ public class SyndLinkImpl implements Cloneable, Serializable, SyndLink { */ @Override public void setLength(final long length) { - this._length = length; + this.length = length; } } diff --git a/src/main/java/com/sun/syndication/feed/synd/SyndPersonImpl.java b/src/main/java/com/sun/syndication/feed/synd/SyndPersonImpl.java index 072a88e..3b992f3 100644 --- a/src/main/java/com/sun/syndication/feed/synd/SyndPersonImpl.java +++ b/src/main/java/com/sun/syndication/feed/synd/SyndPersonImpl.java @@ -33,18 +33,18 @@ import com.sun.syndication.feed.module.impl.ModuleUtils; * */ public class SyndPersonImpl implements Serializable, SyndPerson { - private final ObjectBean _objBean; - private String _name; - private String _uri; - private String _email; - private List _modules; + private final ObjectBean objBean; + private String name; + private String uri; + private String email; + private List modules; /** * For implementations extending SyndContentImpl to be able to use the * ObjectBean functionality with extended interfaces. */ public SyndPersonImpl() { - this._objBean = new ObjectBean(SyndPerson.class, this); + objBean = new ObjectBean(SyndPerson.class, this); } /** @@ -58,7 +58,7 @@ public class SyndPersonImpl implements Serializable, SyndPerson { */ @Override public Object clone() throws CloneNotSupportedException { - return this._objBean.clone(); + return objBean.clone(); } /** @@ -75,7 +75,7 @@ public class SyndPersonImpl implements Serializable, SyndPerson { if (!(other instanceof SyndPersonImpl)) { return false; } - return this._objBean.equals(other); + return objBean.equals(other); } /** @@ -89,7 +89,7 @@ public class SyndPersonImpl implements Serializable, SyndPerson { */ @Override public int hashCode() { - return this._objBean.hashCode(); + return objBean.hashCode(); } /** @@ -101,7 +101,7 @@ public class SyndPersonImpl implements Serializable, SyndPerson { */ @Override public String toString() { - return this._objBean.toString(); + return objBean.toString(); } /** @@ -113,7 +113,7 @@ public class SyndPersonImpl implements Serializable, SyndPerson { */ @Override public String getName() { - return this._name; + return name; } /** @@ -125,7 +125,7 @@ public class SyndPersonImpl implements Serializable, SyndPerson { */ @Override public void setName(final String name) { - this._name = name; + this.name = name; } /** @@ -137,7 +137,7 @@ public class SyndPersonImpl implements Serializable, SyndPerson { */ @Override public String getEmail() { - return this._email; + return email; } /** @@ -149,7 +149,7 @@ public class SyndPersonImpl implements Serializable, SyndPerson { */ @Override public void setEmail(final String email) { - this._email = email; + this.email = email; } /** @@ -161,7 +161,7 @@ public class SyndPersonImpl implements Serializable, SyndPerson { */ @Override public String getUri() { - return this._uri; + return uri; } /** @@ -173,7 +173,7 @@ public class SyndPersonImpl implements Serializable, SyndPerson { */ @Override public void setUri(final String uri) { - this._uri = uri; + this.uri = uri; } /** @@ -185,10 +185,10 @@ public class SyndPersonImpl implements Serializable, SyndPerson { */ @Override public List getModules() { - if (this._modules == null) { - this._modules = new ArrayList(); + if (modules == null) { + modules = new ArrayList(); } - return this._modules; + return modules; } /** @@ -201,7 +201,7 @@ public class SyndPersonImpl implements Serializable, SyndPerson { */ @Override public void setModules(final List modules) { - this._modules = modules; + this.modules = modules; } /** diff --git a/src/main/java/com/sun/syndication/feed/synd/impl/ConverterForAtom03.java b/src/main/java/com/sun/syndication/feed/synd/impl/ConverterForAtom03.java index 3c7cf93..de09bd5 100644 --- a/src/main/java/com/sun/syndication/feed/synd/impl/ConverterForAtom03.java +++ b/src/main/java/com/sun/syndication/feed/synd/impl/ConverterForAtom03.java @@ -44,19 +44,19 @@ import com.sun.syndication.feed.synd.SyndPersonImpl; /** */ public class ConverterForAtom03 implements Converter { - private final String _type; + private final String type; public ConverterForAtom03() { this("atom_0.3"); } protected ConverterForAtom03(final String type) { - this._type = type; + this.type = type; } @Override public String getType() { - return this._type; + return type; } @Override diff --git a/src/main/java/com/sun/syndication/feed/synd/impl/ConverterForAtom10.java b/src/main/java/com/sun/syndication/feed/synd/impl/ConverterForAtom10.java index 1ee4e48..f306666 100644 --- a/src/main/java/com/sun/syndication/feed/synd/impl/ConverterForAtom10.java +++ b/src/main/java/com/sun/syndication/feed/synd/impl/ConverterForAtom10.java @@ -46,19 +46,19 @@ import com.sun.syndication.feed.synd.SyndPerson; /** */ public class ConverterForAtom10 implements Converter { - private final String _type; + private final String type; public ConverterForAtom10() { this("atom_1.0"); } protected ConverterForAtom10(final String type) { - this._type = type; + this.type = type; } @Override public String getType() { - return this._type; + return type; } @Override diff --git a/src/main/java/com/sun/syndication/feed/synd/impl/ConverterForRSS090.java b/src/main/java/com/sun/syndication/feed/synd/impl/ConverterForRSS090.java index eb7241e..0c23cdc 100644 --- a/src/main/java/com/sun/syndication/feed/synd/impl/ConverterForRSS090.java +++ b/src/main/java/com/sun/syndication/feed/synd/impl/ConverterForRSS090.java @@ -34,19 +34,19 @@ import com.sun.syndication.feed.synd.SyndImageImpl; /** */ public class ConverterForRSS090 implements Converter { - private final String _type; + private final String type; public ConverterForRSS090() { this("rss_0.9"); } protected ConverterForRSS090(final String type) { - this._type = type; + this.type = type; } @Override public String getType() { - return this._type; + return type; } @Override diff --git a/src/main/java/com/sun/syndication/io/SAXBuilder.java b/src/main/java/com/sun/syndication/io/SAXBuilder.java index 310ffee..7582c1a 100644 --- a/src/main/java/com/sun/syndication/io/SAXBuilder.java +++ b/src/main/java/com/sun/syndication/io/SAXBuilder.java @@ -25,11 +25,11 @@ public class SAXBuilder extends org.jdom2.input.SAXBuilder { * * @deprecated use SAXBuilder(XMLReaderJDOMFactory) with either * XMLReaders.DTDVALIDATING or XMLReaders.NONVALIDATING - * @param _validate + * @param validate */ @Deprecated - public SAXBuilder(final boolean _validate) { - super(_validate ? XMLReaders.DTDVALIDATING : XMLReaders.NONVALIDATING); + public SAXBuilder(final boolean validate) { + super(validate ? XMLReaders.DTDVALIDATING : XMLReaders.NONVALIDATING); } @Override diff --git a/src/main/java/com/sun/syndication/io/SyndFeedInput.java b/src/main/java/com/sun/syndication/io/SyndFeedInput.java index 3f7f79e..601e741 100644 --- a/src/main/java/com/sun/syndication/io/SyndFeedInput.java +++ b/src/main/java/com/sun/syndication/io/SyndFeedInput.java @@ -38,7 +38,7 @@ import com.sun.syndication.feed.synd.SyndFeedImpl; * */ public class SyndFeedInput { - private final WireFeedInput _feedInput; + private final WireFeedInput feedInput; private boolean preserveWireFeed = false; /** @@ -59,7 +59,7 @@ public class SyndFeedInput { * */ public SyndFeedInput(final boolean validate) { - this._feedInput = new WireFeedInput(validate); + feedInput = new WireFeedInput(validate); } /** @@ -81,7 +81,7 @@ public class SyndFeedInput { * */ public void setXmlHealerOn(final boolean heals) { - this._feedInput.setXmlHealerOn(heals); + feedInput.setXmlHealerOn(heals); } /** @@ -104,7 +104,7 @@ public class SyndFeedInput { * */ public boolean getXmlHealerOn() { - return this._feedInput.getXmlHealerOn(); + return feedInput.getXmlHealerOn(); } /** @@ -121,7 +121,7 @@ public class SyndFeedInput { * */ public SyndFeed build(final File file) throws FileNotFoundException, IOException, IllegalArgumentException, FeedException { - return new SyndFeedImpl(this._feedInput.build(file), this.preserveWireFeed); + return new SyndFeedImpl(feedInput.build(file), preserveWireFeed); } /** @@ -136,7 +136,7 @@ public class SyndFeedInput { * */ public SyndFeed build(final Reader reader) throws IllegalArgumentException, FeedException { - return new SyndFeedImpl(this._feedInput.build(reader), this.preserveWireFeed); + return new SyndFeedImpl(feedInput.build(reader), preserveWireFeed); } /** @@ -151,7 +151,7 @@ public class SyndFeedInput { * */ public SyndFeed build(final InputSource is) throws IllegalArgumentException, FeedException { - return new SyndFeedImpl(this._feedInput.build(is), this.preserveWireFeed); + return new SyndFeedImpl(feedInput.build(is), preserveWireFeed); } /** @@ -166,7 +166,7 @@ public class SyndFeedInput { * */ public SyndFeed build(final org.w3c.dom.Document document) throws IllegalArgumentException, FeedException { - return new SyndFeedImpl(this._feedInput.build(document), this.preserveWireFeed); + return new SyndFeedImpl(feedInput.build(document), preserveWireFeed); } /** @@ -181,7 +181,7 @@ public class SyndFeedInput { * */ public SyndFeed build(final Document document) throws IllegalArgumentException, FeedException { - return new SyndFeedImpl(this._feedInput.build(document), this.preserveWireFeed); + return new SyndFeedImpl(feedInput.build(document), preserveWireFeed); } /** @@ -190,7 +190,7 @@ public class SyndFeedInput { * default. */ public boolean isPreserveWireFeed() { - return this.preserveWireFeed; + return preserveWireFeed; } /** diff --git a/src/main/java/com/sun/syndication/io/SyndFeedOutput.java b/src/main/java/com/sun/syndication/io/SyndFeedOutput.java index 698a1fc..01d715e 100644 --- a/src/main/java/com/sun/syndication/io/SyndFeedOutput.java +++ b/src/main/java/com/sun/syndication/io/SyndFeedOutput.java @@ -35,7 +35,7 @@ import com.sun.syndication.feed.synd.SyndFeed; * */ public class SyndFeedOutput { - private final WireFeedOutput _feedOutput; + private final WireFeedOutput feedOutput; /** * Creates a SyndFeedOutput instance. @@ -43,7 +43,7 @@ public class SyndFeedOutput { * */ public SyndFeedOutput() { - this._feedOutput = new WireFeedOutput(); + feedOutput = new WireFeedOutput(); } /** @@ -64,7 +64,7 @@ public class SyndFeedOutput { * */ public String outputString(final SyndFeed feed) throws FeedException { - return this._feedOutput.outputString(feed.createWireFeed()); + return feedOutput.outputString(feed.createWireFeed()); } /** @@ -86,7 +86,7 @@ public class SyndFeedOutput { * */ public String outputString(final SyndFeed feed, final boolean prettyPrint) throws FeedException { - return this._feedOutput.outputString(feed.createWireFeed(), prettyPrint); + return feedOutput.outputString(feed.createWireFeed(), prettyPrint); } /** @@ -110,7 +110,7 @@ public class SyndFeedOutput { * */ public void output(final SyndFeed feed, final File file) throws IOException, FeedException { - this._feedOutput.output(feed.createWireFeed(), file); + feedOutput.output(feed.createWireFeed(), file); } /** @@ -135,7 +135,7 @@ public class SyndFeedOutput { * */ public void output(final SyndFeed feed, final File file, final boolean prettyPrint) throws IOException, FeedException { - this._feedOutput.output(feed.createWireFeed(), file, prettyPrint); + feedOutput.output(feed.createWireFeed(), file, prettyPrint); } /** @@ -159,7 +159,7 @@ public class SyndFeedOutput { * */ public void output(final SyndFeed feed, final Writer writer) throws IOException, FeedException { - this._feedOutput.output(feed.createWireFeed(), writer); + feedOutput.output(feed.createWireFeed(), writer); } /** @@ -184,7 +184,7 @@ public class SyndFeedOutput { * */ public void output(final SyndFeed feed, final Writer writer, final boolean prettyPrint) throws IOException, FeedException { - this._feedOutput.output(feed.createWireFeed(), writer, prettyPrint); + feedOutput.output(feed.createWireFeed(), writer, prettyPrint); } /** @@ -202,7 +202,7 @@ public class SyndFeedOutput { * */ public org.w3c.dom.Document outputW3CDom(final SyndFeed feed) throws FeedException { - return this._feedOutput.outputW3CDom(feed.createWireFeed()); + return feedOutput.outputW3CDom(feed.createWireFeed()); } /** @@ -220,7 +220,7 @@ public class SyndFeedOutput { * */ public Document outputJDom(final SyndFeed feed) throws FeedException { - return this._feedOutput.outputJDom(feed.createWireFeed()); + return feedOutput.outputJDom(feed.createWireFeed()); } } diff --git a/src/main/java/com/sun/syndication/io/WireFeedInput.java b/src/main/java/com/sun/syndication/io/WireFeedInput.java index d7bca05..86edee4 100644 --- a/src/main/java/com/sun/syndication/io/WireFeedInput.java +++ b/src/main/java/com/sun/syndication/io/WireFeedInput.java @@ -83,9 +83,9 @@ public class WireFeedInput { } } - private final boolean _validate; + private final boolean validate; - private boolean _xmlHealerOn; + private boolean xmlHealerOn; /** * Returns the list of supported input feed types. @@ -118,8 +118,8 @@ public class WireFeedInput { * */ public WireFeedInput(final boolean validate) { - this._validate = false; // TODO FIX THIS THINGY - this._xmlHealerOn = true; + this.validate = false; // TODO FIX THIS THINGY + xmlHealerOn = true; } /** @@ -141,7 +141,7 @@ public class WireFeedInput { * */ public void setXmlHealerOn(final boolean heals) { - this._xmlHealerOn = heals; + xmlHealerOn = heals; } /** @@ -164,7 +164,7 @@ public class WireFeedInput { * */ public boolean getXmlHealerOn() { - return this._xmlHealerOn; + return xmlHealerOn; } /** @@ -186,7 +186,7 @@ public class WireFeedInput { public WireFeed build(final File file) throws FileNotFoundException, IOException, IllegalArgumentException, FeedException { WireFeed feed; Reader reader = new FileReader(file); - if (this._xmlHealerOn) { + if (xmlHealerOn) { reader = new XmlFixerReader(reader); } feed = this.build(reader); @@ -211,7 +211,7 @@ public class WireFeedInput { public WireFeed build(Reader reader) throws IllegalArgumentException, FeedException { final SAXBuilder saxBuilder = createSAXBuilder(); try { - if (this._xmlHealerOn) { + if (xmlHealerOn) { reader = new XmlFixerReader(reader); } final Document document = saxBuilder.build(reader); @@ -297,7 +297,7 @@ public class WireFeedInput { if (parser == null) { throw new IllegalArgumentException("Invalid document"); } - return parser.parse(document, this._validate); + return parser.parse(document, validate); } /** @@ -306,7 +306,7 @@ public class WireFeedInput { * @return a new org.jdom2.input.SAXBuilder object */ protected SAXBuilder createSAXBuilder() { - final SAXBuilder saxBuilder = new SAXBuilder(this._validate ? XMLReaders.DTDVALIDATING : XMLReaders.NONVALIDATING); + final SAXBuilder saxBuilder = new SAXBuilder(validate ? XMLReaders.DTDVALIDATING : XMLReaders.NONVALIDATING); saxBuilder.setEntityResolver(RESOLVER); // diff --git a/src/main/java/com/sun/syndication/io/XmlReader.java b/src/main/java/com/sun/syndication/io/XmlReader.java index d90866c..76a7669 100644 --- a/src/main/java/com/sun/syndication/io/XmlReader.java +++ b/src/main/java/com/sun/syndication/io/XmlReader.java @@ -67,11 +67,11 @@ public class XmlReader extends Reader { private static final String UTF_16LE = "UTF-16LE"; private static final String UTF_16 = "UTF-16"; - private static String _staticDefaultEncoding = null; + private static String staticDefaultEncoding = null; - private Reader _reader; - private String _encoding; - private final String _defaultEncoding; + private Reader reader; + private String encoding; + private final String defaultEncoding; /** * Sets the default encoding to use if none is set in HTTP content-type, XML @@ -85,7 +85,7 @@ public class XmlReader extends Reader { * @param encoding charset encoding to default to. */ public static void setDefaultEncoding(final String encoding) { - _staticDefaultEncoding = encoding; + staticDefaultEncoding = encoding; } /** @@ -98,7 +98,7 @@ public class XmlReader extends Reader { * @return the default encoding to use. */ public static String getDefaultEncoding() { - return _staticDefaultEncoding; + return staticDefaultEncoding; } /** @@ -167,7 +167,7 @@ public class XmlReader extends Reader { * */ public XmlReader(final InputStream is, final boolean lenient, final String defaultEncoding) throws IOException, XmlReaderException { - this._defaultEncoding = defaultEncoding == null ? _staticDefaultEncoding : defaultEncoding; + this.defaultEncoding = defaultEncoding == null ? staticDefaultEncoding : defaultEncoding; try { doRawStream(is, lenient); } catch (final XmlReaderException ex) { @@ -255,7 +255,7 @@ public class XmlReader extends Reader { * */ public XmlReader(final URLConnection conn) throws IOException { - this._defaultEncoding = _staticDefaultEncoding; + defaultEncoding = staticDefaultEncoding; final boolean lenient = true; if (conn instanceof HttpURLConnection) { try { @@ -338,7 +338,7 @@ public class XmlReader extends Reader { */ public XmlReader(final InputStream is, final String httpContentType, final boolean lenient, final String defaultEncoding) throws IOException, XmlReaderException { - this._defaultEncoding = defaultEncoding == null ? _staticDefaultEncoding : defaultEncoding; + this.defaultEncoding = defaultEncoding == null ? staticDefaultEncoding : defaultEncoding; try { doHttpStream(is, httpContentType, lenient); } catch (final XmlReaderException ex) { @@ -407,7 +407,7 @@ public class XmlReader extends Reader { encoding = ex.getContentTypeEncoding(); } if (encoding == null) { - encoding = this._defaultEncoding == null ? UTF_8 : this._defaultEncoding; + encoding = defaultEncoding == null ? UTF_8 : defaultEncoding; } prepareReader(ex.getInputStream(), encoding); } @@ -421,12 +421,12 @@ public class XmlReader extends Reader { * */ public String getEncoding() { - return this._encoding; + return encoding; } @Override public int read(final char[] buf, final int offset, final int len) throws IOException { - return this._reader.read(buf, offset, len); + return reader.read(buf, offset, len); } /** @@ -438,7 +438,7 @@ public class XmlReader extends Reader { */ @Override public void close() throws IOException { - this._reader.close(); + reader.close(); } private void doRawStream(final InputStream is, final boolean lenient) throws IOException { @@ -462,8 +462,8 @@ public class XmlReader extends Reader { } private void prepareReader(final InputStream is, final String encoding) throws IOException { - this._reader = new InputStreamReader(is, encoding); - this._encoding = encoding; + reader = new InputStreamReader(is, encoding); + this.encoding = encoding; } // InputStream is passed for XmlReaderException creation only @@ -471,7 +471,7 @@ public class XmlReader extends Reader { String encoding; if (bomEnc == null) { if (xmlGuessEnc == null || xmlEnc == null) { - encoding = this._defaultEncoding == null ? UTF_8 : this._defaultEncoding; + encoding = defaultEncoding == null ? UTF_8 : defaultEncoding; } else if (xmlEnc.equals(UTF_16) && (xmlGuessEnc.equals(UTF_16BE) || xmlGuessEnc.equals(UTF_16LE))) { encoding = xmlGuessEnc; } else { @@ -513,7 +513,7 @@ public class XmlReader extends Reader { if (appXml) { encoding = calculateRawEncoding(bomEnc, xmlGuessEnc, xmlEnc, is); } else { - encoding = this._defaultEncoding == null ? US_ASCII : this._defaultEncoding; + encoding = defaultEncoding == null ? US_ASCII : defaultEncoding; } } else if (bomEnc != null && (cTEnc.equals(UTF_16BE) || cTEnc.equals(UTF_16LE))) { throw new XmlReaderException(HTTP_EX_1.format(new Object[] { cTMime, cTEnc, bomEnc, xmlGuessEnc, xmlEnc }), cTMime, cTEnc, bomEnc, diff --git a/src/main/java/com/sun/syndication/io/XmlReaderException.java b/src/main/java/com/sun/syndication/io/XmlReaderException.java index 5b4a012..509a06b 100644 --- a/src/main/java/com/sun/syndication/io/XmlReaderException.java +++ b/src/main/java/com/sun/syndication/io/XmlReaderException.java @@ -18,12 +18,12 @@ import java.io.InputStream; * */ public class XmlReaderException extends IOException { - private final String _bomEncoding; - private final String _xmlGuessEncoding; - private final String _xmlEncoding; - private final String _contentTypeMime; - private final String _contentTypeEncoding; - private final InputStream _is; + private final String bomEncoding; + private final String xmlGuessEncoding; + private final String xmlEncoding; + private final String contentTypeMime; + private final String contentTypeEncoding; + private final InputStream is; /** * Creates an exception instance if the charset encoding could not be @@ -62,12 +62,12 @@ public class XmlReaderException extends IOException { public XmlReaderException(final String msg, final String ctMime, final String ctEnc, final String bomEnc, final String xmlGuessEnc, final String xmlEnc, final InputStream is) { super(msg); - this._contentTypeMime = ctMime; - this._contentTypeEncoding = ctEnc; - this._bomEncoding = bomEnc; - this._xmlGuessEncoding = xmlGuessEnc; - this._xmlEncoding = xmlEnc; - this._is = is; + contentTypeMime = ctMime; + contentTypeEncoding = ctEnc; + bomEncoding = bomEnc; + xmlGuessEncoding = xmlGuessEnc; + xmlEncoding = xmlEnc; + this.is = is; } /** @@ -78,7 +78,7 @@ public class XmlReaderException extends IOException { * */ public String getBomEncoding() { - return this._bomEncoding; + return bomEncoding; } /** @@ -89,7 +89,7 @@ public class XmlReaderException extends IOException { * */ public String getXmlGuessEncoding() { - return this._xmlGuessEncoding; + return xmlGuessEncoding; } /** @@ -100,7 +100,7 @@ public class XmlReaderException extends IOException { * */ public String getXmlEncoding() { - return this._xmlEncoding; + return xmlEncoding; } /** @@ -113,7 +113,7 @@ public class XmlReaderException extends IOException { * */ public String getContentTypeMime() { - return this._contentTypeMime; + return contentTypeMime; } /** @@ -127,7 +127,7 @@ public class XmlReaderException extends IOException { * */ public String getContentTypeEncoding() { - return this._contentTypeEncoding; + return contentTypeEncoding; } /** @@ -139,6 +139,6 @@ public class XmlReaderException extends IOException { * */ public InputStream getInputStream() { - return this._is; + return is; } } diff --git a/src/main/java/com/sun/syndication/io/impl/Atom03Generator.java b/src/main/java/com/sun/syndication/io/impl/Atom03Generator.java index d5f426f..9988b2b 100644 --- a/src/main/java/com/sun/syndication/io/impl/Atom03Generator.java +++ b/src/main/java/com/sun/syndication/io/impl/Atom03Generator.java @@ -46,7 +46,7 @@ public class Atom03Generator extends BaseWireFeedGenerator { private static final String ATOM_03_URI = "http://purl.org/atom/ns#"; private static final Namespace ATOM_NS = Namespace.getNamespace(ATOM_03_URI); - private final String _version; + private final String version; public Atom03Generator() { this("atom_0.3", "0.3"); @@ -54,11 +54,11 @@ public class Atom03Generator extends BaseWireFeedGenerator { protected Atom03Generator(final String type, final String version) { super(type); - this._version = version; + this.version = version; } protected String getVersion() { - return this._version; + return version; } protected Namespace getFeedNamespace() { diff --git a/src/main/java/com/sun/syndication/io/impl/Atom10Generator.java b/src/main/java/com/sun/syndication/io/impl/Atom10Generator.java index 123e509..4ceea5b 100644 --- a/src/main/java/com/sun/syndication/io/impl/Atom10Generator.java +++ b/src/main/java/com/sun/syndication/io/impl/Atom10Generator.java @@ -53,7 +53,7 @@ public class Atom10Generator extends BaseWireFeedGenerator { private static final String ATOM_10_URI = "http://www.w3.org/2005/Atom"; private static final Namespace ATOM_NS = Namespace.getNamespace(ATOM_10_URI); - private final String _version; + private final String version; public Atom10Generator() { this("atom_1.0", "1.0"); @@ -61,11 +61,11 @@ public class Atom10Generator extends BaseWireFeedGenerator { protected Atom10Generator(final String type, final String version) { super(type); - this._version = version; + this.version = version; } protected String getVersion() { - return this._version; + return version; } protected Namespace getFeedNamespace() { diff --git a/src/main/java/com/sun/syndication/io/impl/BaseWireFeedGenerator.java b/src/main/java/com/sun/syndication/io/impl/BaseWireFeedGenerator.java index dea124a..4d7fb69 100644 --- a/src/main/java/com/sun/syndication/io/impl/BaseWireFeedGenerator.java +++ b/src/main/java/com/sun/syndication/io/impl/BaseWireFeedGenerator.java @@ -31,55 +31,55 @@ public abstract class BaseWireFeedGenerator implements WireFeedGenerator { */ private static final String PERSON_MODULE_GENERATORS_POSFIX_KEY = ".person.ModuleGenerator.classes"; - private final String _type; - private final ModuleGenerators _feedModuleGenerators; - private final ModuleGenerators _itemModuleGenerators; - private final ModuleGenerators _personModuleGenerators; - private final Namespace[] _allModuleNamespaces; + private final String type; + private final ModuleGenerators feedModuleGenerators; + private final ModuleGenerators itemModuleGenerators; + private final ModuleGenerators personModuleGenerators; + private final Namespace[] allModuleNamespaces; protected BaseWireFeedGenerator(final String type) { - this._type = type; - this._feedModuleGenerators = new ModuleGenerators(type + FEED_MODULE_GENERATORS_POSFIX_KEY, this); - this._itemModuleGenerators = new ModuleGenerators(type + ITEM_MODULE_GENERATORS_POSFIX_KEY, this); - this._personModuleGenerators = new ModuleGenerators(type + PERSON_MODULE_GENERATORS_POSFIX_KEY, this); + this.type = type; + feedModuleGenerators = new ModuleGenerators(type + FEED_MODULE_GENERATORS_POSFIX_KEY, this); + itemModuleGenerators = new ModuleGenerators(type + ITEM_MODULE_GENERATORS_POSFIX_KEY, this); + personModuleGenerators = new ModuleGenerators(type + PERSON_MODULE_GENERATORS_POSFIX_KEY, this); final Set allModuleNamespaces = new HashSet(); - Iterator i = this._feedModuleGenerators.getAllNamespaces().iterator(); + Iterator i = feedModuleGenerators.getAllNamespaces().iterator(); while (i.hasNext()) { allModuleNamespaces.add(i.next()); } - i = this._itemModuleGenerators.getAllNamespaces().iterator(); + i = itemModuleGenerators.getAllNamespaces().iterator(); while (i.hasNext()) { allModuleNamespaces.add(i.next()); } - i = this._personModuleGenerators.getAllNamespaces().iterator(); + i = personModuleGenerators.getAllNamespaces().iterator(); while (i.hasNext()) { allModuleNamespaces.add(i.next()); } - this._allModuleNamespaces = new Namespace[allModuleNamespaces.size()]; - allModuleNamespaces.toArray(this._allModuleNamespaces); + this.allModuleNamespaces = new Namespace[allModuleNamespaces.size()]; + allModuleNamespaces.toArray(this.allModuleNamespaces); } @Override public String getType() { - return this._type; + return type; } protected void generateModuleNamespaceDefs(final Element root) { - for (final Namespace _allModuleNamespace : this._allModuleNamespaces) { + for (final Namespace _allModuleNamespace : allModuleNamespaces) { root.addNamespaceDeclaration(_allModuleNamespace); } } protected void generateFeedModules(final List modules, final Element feed) { - this._feedModuleGenerators.generateModules(modules, feed); + feedModuleGenerators.generateModules(modules, feed); } public void generateItemModules(final List modules, final Element item) { - this._itemModuleGenerators.generateModules(modules, item); + itemModuleGenerators.generateModules(modules, item); } public void generatePersonModules(final List modules, final Element person) { - this._personModuleGenerators.generateModules(modules, person); + personModuleGenerators.generateModules(modules, person); } protected void generateForeignMarkup(final Element e, final List foreignMarkup) { diff --git a/src/main/java/com/sun/syndication/io/impl/BaseWireFeedParser.java b/src/main/java/com/sun/syndication/io/impl/BaseWireFeedParser.java index 9834a7f..a00e190 100644 --- a/src/main/java/com/sun/syndication/io/impl/BaseWireFeedParser.java +++ b/src/main/java/com/sun/syndication/io/impl/BaseWireFeedParser.java @@ -35,18 +35,18 @@ public abstract class BaseWireFeedParser implements WireFeedParser { */ private static final String PERSON_MODULE_PARSERS_POSFIX_KEY = ".person.ModuleParser.classes"; - private final String _type; - private final ModuleParsers _feedModuleParsers; - private final ModuleParsers _itemModuleParsers; - private final ModuleParsers _personModuleParsers; - private final Namespace _namespace; + private final String type; + private final ModuleParsers feedModuleParsers; + private final ModuleParsers itemModuleParsers; + private final ModuleParsers personModuleParsers; + private final Namespace namespace; protected BaseWireFeedParser(final String type, final Namespace namespace) { - this._type = type; - this._namespace = namespace; - this._feedModuleParsers = new ModuleParsers(type + FEED_MODULE_PARSERS_POSFIX_KEY, this); - this._itemModuleParsers = new ModuleParsers(type + ITEM_MODULE_PARSERS_POSFIX_KEY, this); - this._personModuleParsers = new ModuleParsers(type + PERSON_MODULE_PARSERS_POSFIX_KEY, this); + this.type = type; + this.namespace = namespace; + feedModuleParsers = new ModuleParsers(type + FEED_MODULE_PARSERS_POSFIX_KEY, this); + itemModuleParsers = new ModuleParsers(type + ITEM_MODULE_PARSERS_POSFIX_KEY, this); + personModuleParsers = new ModuleParsers(type + PERSON_MODULE_PARSERS_POSFIX_KEY, this); } /** @@ -60,19 +60,19 @@ public abstract class BaseWireFeedParser implements WireFeedParser { */ @Override public String getType() { - return this._type; + return type; } protected List parseFeedModules(final Element feedElement) { - return this._feedModuleParsers.parseModules(feedElement); + return feedModuleParsers.parseModules(feedElement); } protected List parseItemModules(final Element itemElement) { - return this._itemModuleParsers.parseModules(itemElement); + return itemModuleParsers.parseModules(itemElement); } protected List parsePersonModules(final Element itemElement) { - return this._personModuleParsers.parseModules(itemElement); + return personModuleParsers.parseModules(itemElement); } protected List extractForeignMarkup(final Element e, final Extendable ext, final Namespace basens) { @@ -103,7 +103,7 @@ public abstract class BaseWireFeedParser implements WireFeedParser { protected Attribute getAttribute(final Element e, final String attributeName) { Attribute attribute = e.getAttribute(attributeName); if (attribute == null) { - attribute = e.getAttribute(attributeName, this._namespace); + attribute = e.getAttribute(attributeName, namespace); } return attribute; } diff --git a/src/main/java/com/sun/syndication/io/impl/ModuleGenerators.java b/src/main/java/com/sun/syndication/io/impl/ModuleGenerators.java index 4ae00b4..ff988d5 100644 --- a/src/main/java/com/sun/syndication/io/impl/ModuleGenerators.java +++ b/src/main/java/com/sun/syndication/io/impl/ModuleGenerators.java @@ -29,7 +29,7 @@ import com.sun.syndication.io.ModuleGenerator; /** */ public class ModuleGenerators extends PluginManager { - private Set _allNamespaces; + private Set allNamespaces; public ModuleGenerators(final String propertyKey, final BaseWireFeedGenerator parentGenerator) { super(propertyKey, null, parentGenerator); @@ -61,14 +61,14 @@ public class ModuleGenerators extends PluginManager { } public Set getAllNamespaces() { - if (this._allNamespaces == null) { - this._allNamespaces = new HashSet(); + if (allNamespaces == null) { + allNamespaces = new HashSet(); final List mUris = getModuleNamespaces(); for (int i = 0; i < mUris.size(); i++) { final ModuleGenerator mGen = getGenerator((String) mUris.get(i)); - this._allNamespaces.addAll(mGen.getNamespaces()); + allNamespaces.addAll(mGen.getNamespaces()); } } - return this._allNamespaces; + return allNamespaces; } } diff --git a/src/main/java/com/sun/syndication/io/impl/PluginManager.java b/src/main/java/com/sun/syndication/io/impl/PluginManager.java index 8fdbcf1..6f41d0d 100644 --- a/src/main/java/com/sun/syndication/io/impl/PluginManager.java +++ b/src/main/java/com/sun/syndication/io/impl/PluginManager.java @@ -35,12 +35,12 @@ import com.sun.syndication.io.WireFeedParser; * */ public abstract class PluginManager { - private final String[] _propertyValues; - private Map _pluginsMap; - private List _pluginsList; - private final List _keys; - private final WireFeedParser _parentParser; - private final WireFeedGenerator _parentGenerator; + private final String[] propertyValues; + private Map pluginsMap; + private List pluginsList; + private final List keys; + private final WireFeedParser parentParser; + private final WireFeedGenerator parentGenerator; /** * Creates a PluginManager @@ -54,39 +54,39 @@ public abstract class PluginManager { } protected PluginManager(final String propertyKey, final WireFeedParser parentParser, final WireFeedGenerator parentGenerator) { - this._parentParser = parentParser; - this._parentGenerator = parentGenerator; - this._propertyValues = PropertiesLoader.getPropertiesLoader().getTokenizedProperty(propertyKey, ", "); + this.parentParser = parentParser; + this.parentGenerator = parentGenerator; + propertyValues = PropertiesLoader.getPropertiesLoader().getTokenizedProperty(propertyKey, ", "); loadPlugins(); - this._pluginsMap = Collections.unmodifiableMap(this._pluginsMap); - this._pluginsList = Collections.unmodifiableList(this._pluginsList); - this._keys = Collections.unmodifiableList(new ArrayList(this._pluginsMap.keySet())); + pluginsMap = Collections.unmodifiableMap(pluginsMap); + pluginsList = Collections.unmodifiableList(pluginsList); + keys = Collections.unmodifiableList(new ArrayList(pluginsMap.keySet())); } protected abstract String getKey(Object obj); protected List getKeys() { - return this._keys; + return keys; } protected List getPlugins() { - return this._pluginsList; + return pluginsList; } protected Map getPluginMap() { - return this._pluginsMap; + return pluginsMap; } protected Object getPlugin(final String key) { - return this._pluginsMap.get(key); + return pluginsMap.get(key); } // PRIVATE - LOADER PART private void loadPlugins() { final List finalPluginsList = new ArrayList(); - this._pluginsList = new ArrayList(); - this._pluginsMap = new HashMap(); + pluginsList = new ArrayList(); + pluginsMap = new HashMap(); String className = null; try { final Class[] classes = getClasses(); @@ -94,24 +94,24 @@ public abstract class PluginManager { className = classe.getName(); final Object plugin = classe.newInstance(); if (plugin instanceof DelegatingModuleParser) { - ((DelegatingModuleParser) plugin).setFeedParser(this._parentParser); + ((DelegatingModuleParser) plugin).setFeedParser(parentParser); } if (plugin instanceof DelegatingModuleGenerator) { - ((DelegatingModuleGenerator) plugin).setFeedGenerator(this._parentGenerator); + ((DelegatingModuleGenerator) plugin).setFeedGenerator(parentGenerator); } - this._pluginsMap.put(getKey(plugin), plugin); - this._pluginsList.add(plugin); // to preserve the order of - // definition + pluginsMap.put(getKey(plugin), plugin); + pluginsList.add(plugin); // to preserve the order of + // definition // in the rome.properties files } - Iterator i = this._pluginsMap.values().iterator(); + Iterator i = pluginsMap.values().iterator(); while (i.hasNext()) { finalPluginsList.add(i.next()); // to remove overridden plugin // impls } - i = this._pluginsList.iterator(); + i = pluginsList.iterator(); while (i.hasNext()) { final Object plugin = i.next(); if (!finalPluginsList.contains(plugin)) { @@ -144,7 +144,7 @@ public abstract class PluginManager { final ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); final List classes = new ArrayList(); final boolean useLoadClass = Boolean.valueOf(System.getProperty("rome.pluginmanager.useloadclass", "false")).booleanValue(); - for (final String _propertyValue : this._propertyValues) { + for (final String _propertyValue : propertyValues) { final Class mClass = useLoadClass ? classLoader.loadClass(_propertyValue) : Class.forName(_propertyValue, true, classLoader); classes.add(mClass); } diff --git a/src/main/java/com/sun/syndication/io/impl/PropertiesLoader.java b/src/main/java/com/sun/syndication/io/impl/PropertiesLoader.java index 9493f56..862ec95 100644 --- a/src/main/java/com/sun/syndication/io/impl/PropertiesLoader.java +++ b/src/main/java/com/sun/syndication/io/impl/PropertiesLoader.java @@ -56,7 +56,7 @@ public class PropertiesLoader { } } - private final Properties[] _properties; + private final Properties[] properties; /** * Creates a PropertiesLoader. @@ -100,8 +100,8 @@ public class PropertiesLoader { propertiesList.add(p); } - this._properties = new Properties[propertiesList.size()]; - propertiesList.toArray(this._properties); + properties = new Properties[propertiesList.size()]; + propertiesList.toArray(properties); } /** @@ -119,8 +119,8 @@ public class PropertiesLoader { */ public String[] getTokenizedProperty(final String key, final String separator) { final List entriesList = new ArrayList(); - for (final Properties _propertie : this._properties) { - final String values = _propertie.getProperty(key); + for (final Properties property : properties) { + final String values = property.getProperty(key); if (values != null) { final StringTokenizer st = new StringTokenizer(values, separator); while (st.hasMoreTokens()) { @@ -147,8 +147,8 @@ public class PropertiesLoader { */ public String[] getProperty(final String key) { final List entriesList = new ArrayList(); - for (final Properties _propertie : this._properties) { - final String values = _propertie.getProperty(key); + for (final Properties property : properties) { + final String values = property.getProperty(key); if (values != null) { entriesList.add(values); } diff --git a/src/main/java/com/sun/syndication/io/impl/RSS091NetscapeGenerator.java b/src/main/java/com/sun/syndication/io/impl/RSS091NetscapeGenerator.java index 060c2ba..7462a98 100644 --- a/src/main/java/com/sun/syndication/io/impl/RSS091NetscapeGenerator.java +++ b/src/main/java/com/sun/syndication/io/impl/RSS091NetscapeGenerator.java @@ -28,7 +28,7 @@ import org.jdom2.Element; * */ public class RSS091NetscapeGenerator extends RSS091UserlandGenerator { - private String _version; + private String version; public RSS091NetscapeGenerator() { this("rss_0.91N", "0.91"); diff --git a/src/main/java/com/sun/syndication/io/impl/RSS091UserlandGenerator.java b/src/main/java/com/sun/syndication/io/impl/RSS091UserlandGenerator.java index cce9e7e..b7d25fa 100644 --- a/src/main/java/com/sun/syndication/io/impl/RSS091UserlandGenerator.java +++ b/src/main/java/com/sun/syndication/io/impl/RSS091UserlandGenerator.java @@ -38,7 +38,7 @@ import com.sun.syndication.io.FeedException; * */ public class RSS091UserlandGenerator extends RSS090Generator { - private final String _version; + private final String version; public RSS091UserlandGenerator() { this("rss_0.91U", "0.91"); @@ -46,7 +46,7 @@ public class RSS091UserlandGenerator extends RSS090Generator { protected RSS091UserlandGenerator(final String type, final String version) { super(type); - this._version = version; + this.version = version; } @Override @@ -62,7 +62,7 @@ public class RSS091UserlandGenerator extends RSS090Generator { } protected String getVersion() { - return this._version; + return version; } @Override diff --git a/src/main/java/com/sun/syndication/io/impl/XmlFixerReader.java b/src/main/java/com/sun/syndication/io/impl/XmlFixerReader.java index 89f1e9f..ebf78b3 100644 --- a/src/main/java/com/sun/syndication/io/impl/XmlFixerReader.java +++ b/src/main/java/com/sun/syndication/io/impl/XmlFixerReader.java @@ -33,14 +33,14 @@ public class XmlFixerReader extends Reader { public XmlFixerReader(final Reader in) { super(in); this.in = in; - this._buffer = new StringBuffer(); - this._state = 0; + buffer = new StringBuffer(); + state = 0; } private boolean trimmed; - private final StringBuffer _buffer; - private int _bufferPos; - private int _state = 0; + private final StringBuffer buffer; + private int bufferPos; + private int state = 0; private boolean trimStream() throws IOException { boolean hasContent = true; @@ -50,7 +50,7 @@ public class XmlFixerReader extends Reader { do { switch (state) { case 0: - c = this.in.read(); + c = in.read(); if (c == -1) { loop = false; hasContent = false; @@ -58,114 +58,114 @@ public class XmlFixerReader extends Reader { loop = true; } else if (c == '<') { state = 1; - this._buffer.setLength(0); - this._bufferPos = 0; - this._buffer.append((char) c); + buffer.setLength(0); + bufferPos = 0; + buffer.append((char) c); loop = true; } else { - this._buffer.setLength(0); - this._bufferPos = 0; - this._buffer.append((char) c); + buffer.setLength(0); + bufferPos = 0; + buffer.append((char) c); loop = false; hasContent = true; - this._state = 3; + this.state = 3; } break; case 1: - c = this.in.read(); + c = in.read(); if (c == -1) { loop = false; hasContent = true; - this._state = 3; + this.state = 3; } else if (c != '!') { - this._buffer.append((char) c); - this._state = 3; + buffer.append((char) c); + this.state = 3; loop = false; hasContent = true; - this._state = 3; + this.state = 3; } else { - this._buffer.append((char) c); + buffer.append((char) c); state = 2; loop = true; } break; case 2: - c = this.in.read(); + c = in.read(); if (c == -1) { loop = false; hasContent = true; - this._state = 3; + this.state = 3; } else if (c == '-') { - this._buffer.append((char) c); + buffer.append((char) c); state = 3; loop = true; } else { - this._buffer.append((char) c); + buffer.append((char) c); loop = false; hasContent = true; - this._state = 3; + this.state = 3; } break; case 3: - c = this.in.read(); + c = in.read(); if (c == -1) { loop = false; hasContent = true; - this._state = 3; + this.state = 3; } else if (c == '-') { - this._buffer.append((char) c); + buffer.append((char) c); state = 4; loop = true; } else { - this._buffer.append((char) c); + buffer.append((char) c); loop = false; hasContent = true; - this._state = 3; + this.state = 3; } break; case 4: - c = this.in.read(); + c = in.read(); if (c == -1) { loop = false; hasContent = true; - this._state = 3; + this.state = 3; } else if (c != '-') { - this._buffer.append((char) c); + buffer.append((char) c); loop = true; } else { - this._buffer.append((char) c); + buffer.append((char) c); state = 5; loop = true; } break; case 5: - c = this.in.read(); + c = in.read(); if (c == -1) { loop = false; hasContent = true; - this._state = 3; + this.state = 3; } else if (c != '-') { - this._buffer.append((char) c); + buffer.append((char) c); loop = true; state = 4; } else { - this._buffer.append((char) c); + buffer.append((char) c); state = 6; loop = true; } break; case 6: - c = this.in.read(); + c = in.read(); if (c == -1) { loop = false; hasContent = true; - this._state = 3; + this.state = 3; } else if (c != '>') { - this._buffer.append((char) c); + buffer.append((char) c); loop = true; state = 4; } else { - this._buffer.setLength(0); + buffer.setLength(0); state = 0; loop = true; } @@ -180,24 +180,24 @@ public class XmlFixerReader extends Reader { @Override public int read() throws IOException { boolean loop; - if (!this.trimmed) { // trims XML stream - this.trimmed = true; + if (!trimmed) { // trims XML stream + trimmed = true; if (!trimStream()) { return -1; } } int c; do { // converts literal entities to coded entities - switch (this._state) { + switch (state) { case 0: // reading chars from stream - c = this.in.read(); + c = in.read(); if (c > -1) { if (c == '&') { - this._state = 1; - this._buffer.setLength(0); - this._bufferPos = 0; - this._buffer.append((char) c); - this._state = 1; + state = 1; + buffer.setLength(0); + bufferPos = 0; + buffer.append((char) c); + state = 1; loop = true; } else { loop = false; @@ -207,49 +207,49 @@ public class XmlFixerReader extends Reader { } break; case 1: // reading entity from stream - c = this.in.read(); + c = in.read(); if (c > -1) { if (c == ';') { - this._buffer.append((char) c); - this._state = 2; + buffer.append((char) c); + state = 2; loop = true; } else if (c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' || c == '#' || c >= '0' && c <= '9') { - this._buffer.append((char) c); + buffer.append((char) c); loop = true; } else { // no ';' to match the '&' lets just make the '&' // a legal xml character entity '&' - this._buffer.insert(1, "amp;"); - this._buffer.append((char) c); - this._state = 3; + buffer.insert(1, "amp;"); + buffer.append((char) c); + state = 3; loop = true; } } else { // no ';' to match the '&' lets just make the '&' // a legal xml character entity '&' - this._buffer.insert(1, "amp;"); - this._state = 3; + buffer.insert(1, "amp;"); + state = 3; loop = true; } break; case 2: // replacing entity c = 0; - final String literalEntity = this._buffer.toString(); + final String literalEntity = buffer.toString(); final String codedEntity = CODED_ENTITIES.get(literalEntity); if (codedEntity != null) { - this._buffer.setLength(0); - this._buffer.append(codedEntity); + buffer.setLength(0); + buffer.append(codedEntity); } // else we leave what was in the stream - this._state = 3; + state = 3; loop = true; break; case 3: // consuming buffer - if (this._bufferPos < this._buffer.length()) { - c = this._buffer.charAt(this._bufferPos++); + if (bufferPos < buffer.length()) { + c = buffer.charAt(bufferPos++); loop = false; } else { c = 0; - this._state = 0; + state = 0; loop = true; } break; @@ -292,7 +292,7 @@ public class XmlFixerReader extends Reader { @Override public boolean ready() throws IOException { - return this._state != 0 || this.in.ready(); + return state != 0 || in.ready(); } @Override @@ -312,7 +312,7 @@ public class XmlFixerReader extends Reader { @Override public void close() throws IOException { - this.in.close(); + in.close(); } private static Map CODED_ENTITIES = new HashMap(); diff --git a/src/test/java/com/sun/syndication/unittest/FeedTest.java b/src/test/java/com/sun/syndication/unittest/FeedTest.java index aeb14a8..369e698 100644 --- a/src/test/java/com/sun/syndication/unittest/FeedTest.java +++ b/src/test/java/com/sun/syndication/unittest/FeedTest.java @@ -19,19 +19,19 @@ import com.sun.syndication.io.WireFeedInput; * */ public abstract class FeedTest extends TestCase { - private final String _feedFileName; - private Document _jDomDoc = null; - private WireFeed _wireFeed = null; - private SyndFeed _syndFeed = null; + private final String feedFileName; + private Document jDomDoc = null; + private WireFeed wireFeed = null; + private SyndFeed syndFeed = null; private boolean preservingWireFeed = false; protected FeedTest(final String feedFileName) { - this._feedFileName = feedFileName; + this.feedFileName = feedFileName; } protected String getFeedFileName() { - return this._feedFileName; + return feedFileName; } protected Reader getFeedReader() throws Exception { @@ -57,26 +57,26 @@ public abstract class FeedTest extends TestCase { } protected Document getCachedJDomDoc() throws Exception { - if (this._jDomDoc == null) { - this._jDomDoc = getJDomDoc(); + if (jDomDoc == null) { + jDomDoc = getJDomDoc(); } - return this._jDomDoc; + return jDomDoc; } protected WireFeed getCachedWireFeed() throws Exception { - if (this._wireFeed == null) { - this._wireFeed = getWireFeed(); + if (wireFeed == null) { + wireFeed = getWireFeed(); } - return this._wireFeed; + return wireFeed; } protected SyndFeed getCachedSyndFeed(final boolean preserveWireFeed) throws Exception { - if (this._syndFeed == null || this.preservingWireFeed != preserveWireFeed) { - this._syndFeed = getSyndFeed(preserveWireFeed); - this.preservingWireFeed = preserveWireFeed; + if (syndFeed == null || preservingWireFeed != preserveWireFeed) { + syndFeed = getSyndFeed(preserveWireFeed); + preservingWireFeed = preserveWireFeed; } - return this._syndFeed; + return syndFeed; } diff --git a/src/test/java/com/sun/syndication/unittest/SyndFeedTest.java b/src/test/java/com/sun/syndication/unittest/SyndFeedTest.java index 94b6f0e..236ef07 100644 --- a/src/test/java/com/sun/syndication/unittest/SyndFeedTest.java +++ b/src/test/java/com/sun/syndication/unittest/SyndFeedTest.java @@ -18,7 +18,7 @@ import com.sun.syndication.io.impl.DateParser; * */ public abstract class SyndFeedTest extends FeedTest { - private String _prefix = null; + private String prefix = null; protected SyndFeedTest(final String feedType) { this(feedType, feedType + ".xml"); @@ -26,11 +26,11 @@ public abstract class SyndFeedTest extends FeedTest { protected SyndFeedTest(final String feedType, final String feedFileName) { super(feedFileName); - this._prefix = feedType; + prefix = feedType; } protected String getPrefix() { - return this._prefix; + return prefix; } protected void assertProperty(final String property, final String value) { @@ -38,7 +38,7 @@ public abstract class SyndFeedTest extends FeedTest { } protected void assertEqualsStr(final String expected, final String actual) { - assertEquals(this._prefix + "." + expected, actual); + assertEquals(prefix + "." + expected, actual); } public void testPreserveWireFeed() throws Exception { diff --git a/src/test/java/com/sun/syndication/unittest/TestBase64.java b/src/test/java/com/sun/syndication/unittest/TestBase64.java index c3df536..9b0ef5e 100644 --- a/src/test/java/com/sun/syndication/unittest/TestBase64.java +++ b/src/test/java/com/sun/syndication/unittest/TestBase64.java @@ -6,24 +6,24 @@ import com.sun.syndication.io.impl.Base64; public class TestBase64 extends TestCase { - private void _testEncodeDecode(final String s) { + private void testEncodeDecode(final String s) { final String encoded = Base64.encode(s); final String decoded = Base64.decode(encoded); assertEquals(s, decoded); } public void testEncodeDecode() { - _testEncodeDecode(""); - _testEncodeDecode("A"); - _testEncodeDecode("AB"); - _testEncodeDecode("ABC"); - _testEncodeDecode("ABCD"); - _testEncodeDecode("ABCDE"); - _testEncodeDecode("&"); - _testEncodeDecode("a&"); - _testEncodeDecode("ab&"); - _testEncodeDecode("abc&"); - _testEncodeDecode("abcd&"); + testEncodeDecode(""); + testEncodeDecode("A"); + testEncodeDecode("AB"); + testEncodeDecode("ABC"); + testEncodeDecode("ABCD"); + testEncodeDecode("ABCDE"); + testEncodeDecode("&"); + testEncodeDecode("a&"); + testEncodeDecode("ab&"); + testEncodeDecode("abc&"); + testEncodeDecode("abcd&"); } diff --git a/src/test/java/com/sun/syndication/unittest/TestSyndFeedAtom03.java b/src/test/java/com/sun/syndication/unittest/TestSyndFeedAtom03.java index 817cf25..f180f79 100644 --- a/src/test/java/com/sun/syndication/unittest/TestSyndFeedAtom03.java +++ b/src/test/java/com/sun/syndication/unittest/TestSyndFeedAtom03.java @@ -52,7 +52,7 @@ public class TestSyndFeedAtom03 extends SyndFeedTest { assertEquals(this.getCachedSyndFeed().getPublishedDate(), d); } - protected void _testEntry(final int i) throws Exception { + protected void testEntry(final int i) throws Exception { final List items = this.getCachedSyndFeed().getEntries(); final SyndEntry entry = items.get(i); assertProperty(entry.getTitle(), "feed.entry[" + i + "].title"); @@ -66,11 +66,11 @@ public class TestSyndFeedAtom03 extends SyndFeedTest { } public void testEntry0() throws Exception { - _testEntry(0); + testEntry(0); } public void testEntry1() throws Exception { - _testEntry(1); + testEntry(1); } @Override diff --git a/src/test/java/com/sun/syndication/unittest/TestSyndFeedAtom03DCSyModules.java b/src/test/java/com/sun/syndication/unittest/TestSyndFeedAtom03DCSyModules.java index 64bd3b6..c42e5e2 100644 --- a/src/test/java/com/sun/syndication/unittest/TestSyndFeedAtom03DCSyModules.java +++ b/src/test/java/com/sun/syndication/unittest/TestSyndFeedAtom03DCSyModules.java @@ -43,10 +43,10 @@ public class TestSyndFeedAtom03DCSyModules extends TestSyndFeedAtom03 { public void testFeedDCModule() throws Exception { final DCModule dc = (DCModule) this.getCachedSyndFeed().getModule(DCModule.URI); - _testDCModule(dc, "feed.", false, 0); + testDCModule(dc, "feed.", false, 0); } - protected void _testDCModule(final DCModule dc, final String prefix, final boolean isEntry, final int index) throws Exception { + protected void testDCModule(final DCModule dc, final String prefix, final boolean isEntry, final int index) throws Exception { assertNotNull(dc); assertProperty(dc.getTitle(), prefix + "dc:title"); @@ -98,15 +98,15 @@ public class TestSyndFeedAtom03DCSyModules extends TestSyndFeedAtom03 { } public void testEntriesDCModule() throws Exception { - _testEntryDCModule(0); - _testEntryDCModule(1); + testEntryDCModule(0); + testEntryDCModule(1); } - protected void _testEntryDCModule(final int i) throws Exception { + protected void testEntryDCModule(final int i) throws Exception { final List entries = this.getCachedSyndFeed().getEntries(); final SyndEntry entry = entries.get(i); final DCModule dc = (DCModule) entry.getModule(DCModule.URI); - _testDCModule(dc, "feed.entry[" + i + "].", true, i); + testDCModule(dc, "feed.entry[" + i + "].", true, i); } diff --git a/src/test/java/com/sun/syndication/unittest/TestSyndFeedAtom10.java b/src/test/java/com/sun/syndication/unittest/TestSyndFeedAtom10.java index d2a4f93..cbb8d8f 100644 --- a/src/test/java/com/sun/syndication/unittest/TestSyndFeedAtom10.java +++ b/src/test/java/com/sun/syndication/unittest/TestSyndFeedAtom10.java @@ -73,7 +73,7 @@ public class TestSyndFeedAtom10 extends TestSyndFeedAtom03 { } @Override - protected void _testEntry(final int i) throws Exception { + protected void testEntry(final int i) throws Exception { final List items = this.getCachedSyndFeed().getEntries(); final SyndEntry entry = items.get(i); @@ -111,12 +111,12 @@ public class TestSyndFeedAtom10 extends TestSyndFeedAtom03 { @Override public void testEntry0() throws Exception { - _testEntry(0); + testEntry(0); } @Override public void testEntry1() throws Exception { - _testEntry(1); + testEntry(1); } @Override diff --git a/src/test/java/com/sun/syndication/unittest/TestSyndFeedRSS090.java b/src/test/java/com/sun/syndication/unittest/TestSyndFeedRSS090.java index e719029..95e5a3f 100644 --- a/src/test/java/com/sun/syndication/unittest/TestSyndFeedRSS090.java +++ b/src/test/java/com/sun/syndication/unittest/TestSyndFeedRSS090.java @@ -53,24 +53,24 @@ public class TestSyndFeedRSS090 extends SyndFeedTest { assertProperty(this.getCachedSyndFeed().getImage().getLink(), "image.link"); } - protected void _testItem(final int i) throws Exception { + protected void testItem(final int i) throws Exception { final List items = this.getCachedSyndFeed().getEntries(); final SyndEntry entry = items.get(i); assertProperty(entry.getTitle(), "item[" + i + "].title"); assertProperty(entry.getLink(), "item[" + i + "].link"); - _testUri(entry, i); + testUri(entry, i); } public void testItem0() throws Exception { - _testItem(0); + testItem(0); } public void testItem1() throws Exception { - _testItem(1); + testItem(1); } - protected void _testUri(final SyndEntry entry, final int i) throws Exception { + protected void testUri(final SyndEntry entry, final int i) throws Exception { assertProperty(entry.getUri(), "item[" + i + "].link"); } diff --git a/src/test/java/com/sun/syndication/unittest/TestSyndFeedRSS091N.java b/src/test/java/com/sun/syndication/unittest/TestSyndFeedRSS091N.java index 403435b..5f7967f 100644 --- a/src/test/java/com/sun/syndication/unittest/TestSyndFeedRSS091N.java +++ b/src/test/java/com/sun/syndication/unittest/TestSyndFeedRSS091N.java @@ -63,7 +63,7 @@ public class TestSyndFeedRSS091N extends SyndFeedTest { assertProperty(this.getCachedSyndFeed().getImage().getDescription(), "channel.image.description"); } - protected void _testItem(final int i) throws Exception { + protected void testItem(final int i) throws Exception { final List items = this.getCachedSyndFeed().getEntries(); final SyndEntry entry = items.get(i); assertProperty(entry.getTitle(), "channel.item[" + i + "].title"); @@ -71,7 +71,7 @@ public class TestSyndFeedRSS091N extends SyndFeedTest { assertProperty(entry.getDescription().getValue(), "channel.item[" + i + "].description"); } - protected void _testUri(final SyndEntry entry, final int i) throws Exception { + protected void testUri(final SyndEntry entry, final int i) throws Exception { assertProperty(entry.getUri(), "channel.item[" + i + "].link"); } diff --git a/src/test/java/com/sun/syndication/unittest/TestSyndFeedRSS092.java b/src/test/java/com/sun/syndication/unittest/TestSyndFeedRSS092.java index 7a4cdef..e2901c3 100644 --- a/src/test/java/com/sun/syndication/unittest/TestSyndFeedRSS092.java +++ b/src/test/java/com/sun/syndication/unittest/TestSyndFeedRSS092.java @@ -31,19 +31,19 @@ public class TestSyndFeedRSS092 extends TestSyndFeedRSS091N { } @Override - protected void _testItem(final int i) throws Exception { - super._testItem(i); + protected void testItem(final int i) throws Exception { + super.testItem(i); final List items = this.getCachedSyndFeed().getEntries(); final SyndEntry entry = items.get(i); assertProperty(entry.getTitle(), "channel.item[" + i + "].title"); assertProperty(entry.getLink(), "channel.item[" + i + "].link"); assertProperty(entry.getDescription().getValue(), "channel.item[" + i + "].description"); - _testCategories(entry.getCategories(), "channel.item[" + i + "]"); - _testEnclosures(entry.getEnclosures(), "channel.item[" + i + "]"); + testCategories(entry.getCategories(), "channel.item[" + i + "]"); + testEnclosures(entry.getEnclosures(), "channel.item[" + i + "]"); } - protected void _testCategories(final List cats, final String prefix) throws Exception { + protected void testCategories(final List cats, final String prefix) throws Exception { final Set s1 = new HashSet(); final Set s2 = new HashSet(); for (int i = 0; i < cats.size(); i++) { @@ -54,7 +54,7 @@ public class TestSyndFeedRSS092 extends TestSyndFeedRSS091N { assertTrue(s1.equals(s2)); } - protected void _testEnclosures(final List encs, final String prefix) throws Exception { + protected void testEnclosures(final List encs, final String prefix) throws Exception { final Set s1 = new HashSet(); final Set s2 = new HashSet(); for (int i = 0; i < encs.size(); i++) { diff --git a/src/test/java/com/sun/syndication/unittest/TestSyndFeedRSS092Alt.java b/src/test/java/com/sun/syndication/unittest/TestSyndFeedRSS092Alt.java index a1ff584..b60542a 100644 --- a/src/test/java/com/sun/syndication/unittest/TestSyndFeedRSS092Alt.java +++ b/src/test/java/com/sun/syndication/unittest/TestSyndFeedRSS092Alt.java @@ -17,7 +17,7 @@ public class TestSyndFeedRSS092Alt extends TestSyndFeedRSS092 { } @Override - protected void _testEnclosures(final List encs, final String prefix) throws Exception { + protected void testEnclosures(final List encs, final String prefix) throws Exception { final Set s1 = new HashSet(); final Set s2 = new HashSet(); for (int i = 0; i < encs.size(); i++) { diff --git a/src/test/java/com/sun/syndication/unittest/TestSyndFeedRSS093.java b/src/test/java/com/sun/syndication/unittest/TestSyndFeedRSS093.java index 38b9c89..e80e60b 100644 --- a/src/test/java/com/sun/syndication/unittest/TestSyndFeedRSS093.java +++ b/src/test/java/com/sun/syndication/unittest/TestSyndFeedRSS093.java @@ -29,16 +29,16 @@ public class TestSyndFeedRSS093 extends TestSyndFeedRSS092 { } @Override - protected void _testItem(final int i) throws Exception { - super._testItem(i); + protected void testItem(final int i) throws Exception { + super.testItem(i); final List items = this.getCachedSyndFeed().getEntries(); final SyndEntry entry = items.get(i); final Date d = DateParser.parseRFC822("Mon, 0" + (i + 1) + " Jan 2001 00:00:00 GMT"); assertEquals(entry.getPublishedDate(), d); - _testDescriptionType(entry, i); + testDescriptionType(entry, i); } - protected void _testDescriptionType(final SyndEntry entry, final int i) throws Exception { + protected void testDescriptionType(final SyndEntry entry, final int i) throws Exception { assertProperty(entry.getDescription().getType(), "channel.item[" + i + "].description^type"); } diff --git a/src/test/java/com/sun/syndication/unittest/TestSyndFeedRSS094.java b/src/test/java/com/sun/syndication/unittest/TestSyndFeedRSS094.java index 8e8e038..b969188 100644 --- a/src/test/java/com/sun/syndication/unittest/TestSyndFeedRSS094.java +++ b/src/test/java/com/sun/syndication/unittest/TestSyndFeedRSS094.java @@ -26,16 +26,16 @@ public class TestSyndFeedRSS094 extends TestSyndFeedRSS093 { } public void testCategories() throws Exception { - _testCategories(this.getCachedSyndFeed().getCategories(), "channel"); + testCategories(this.getCachedSyndFeed().getCategories(), "channel"); } @Override - protected void _testDescriptionType(final SyndEntry entry, final int i) throws Exception { + protected void testDescriptionType(final SyndEntry entry, final int i) throws Exception { } @Override - protected void _testItem(final int i) throws Exception { - super._testItem(i); + protected void testItem(final int i) throws Exception { + super.testItem(i); final List items = this.getCachedSyndFeed().getEntries(); final SyndEntry entry = items.get(i); @@ -45,7 +45,7 @@ public class TestSyndFeedRSS094 extends TestSyndFeedRSS093 { } @Override - protected void _testUri(final SyndEntry entry, final int i) throws Exception { + protected void testUri(final SyndEntry entry, final int i) throws Exception { assertProperty(entry.getUri(), "channel.item[" + i + "].guid"); } } diff --git a/src/test/java/com/sun/syndication/unittest/TestSyndFeedRSS10.java b/src/test/java/com/sun/syndication/unittest/TestSyndFeedRSS10.java index 7cc864c..9967b00 100644 --- a/src/test/java/com/sun/syndication/unittest/TestSyndFeedRSS10.java +++ b/src/test/java/com/sun/syndication/unittest/TestSyndFeedRSS10.java @@ -31,8 +31,8 @@ public class TestSyndFeedRSS10 extends TestSyndFeedRSS090 { } @Override - protected void _testItem(final int i) throws Exception { - super._testItem(i); + protected void testItem(final int i) throws Exception { + super.testItem(i); final List items = this.getCachedSyndFeed().getEntries(); final SyndEntry entry = items.get(i); assertProperty(entry.getDescription().getValue(), "item[" + i + "].description"); @@ -40,7 +40,7 @@ public class TestSyndFeedRSS10 extends TestSyndFeedRSS090 { } @Override - protected void _testUri(final SyndEntry entry, final int i) throws Exception { + protected void testUri(final SyndEntry entry, final int i) throws Exception { assertProperty(entry.getUri(), "channel.items[" + i + "]^rdf:resource"); } } diff --git a/src/test/java/com/sun/syndication/unittest/TestSyndFeedRSS10DCMulti.java b/src/test/java/com/sun/syndication/unittest/TestSyndFeedRSS10DCMulti.java index c4bf998..4c8c9dd 100644 --- a/src/test/java/com/sun/syndication/unittest/TestSyndFeedRSS10DCMulti.java +++ b/src/test/java/com/sun/syndication/unittest/TestSyndFeedRSS10DCMulti.java @@ -29,10 +29,10 @@ public class TestSyndFeedRSS10DCMulti extends TestSyndFeedRSS10 { public void testChannelDCModule() throws Exception { final DCModule dc = (DCModule) this.getCachedSyndFeed().getModule(DCModule.URI); - _testDCModule(dc, "channel."); + testDCModule(dc, "channel."); } - protected void _testDCModule(final DCModule dc, final String prefix) throws Exception { + protected void testDCModule(final DCModule dc, final String prefix) throws Exception { assertNotNull(dc); assertProperty(dc.getTitles().get(0), prefix + "dc:title[0]"); @@ -90,14 +90,14 @@ public class TestSyndFeedRSS10DCMulti extends TestSyndFeedRSS10 { } public void testItemsDCModule() throws Exception { - _testItemDCModule(0); - _testItemDCModule(1); + testItemDCModule(0); + testItemDCModule(1); } - protected void _testItemDCModule(final int i) throws Exception { + protected void testItemDCModule(final int i) throws Exception { final List entries = this.getCachedSyndFeed().getEntries(); final SyndEntry entry = entries.get(i); final DCModule dc = (DCModule) entry.getModule(DCModule.URI); - _testDCModule(dc, "item[" + i + "]."); + testDCModule(dc, "item[" + i + "]."); } } diff --git a/src/test/java/com/sun/syndication/unittest/TestSyndFeedRSS10DCSyModules.java b/src/test/java/com/sun/syndication/unittest/TestSyndFeedRSS10DCSyModules.java index c276512..7e28d4c 100644 --- a/src/test/java/com/sun/syndication/unittest/TestSyndFeedRSS10DCSyModules.java +++ b/src/test/java/com/sun/syndication/unittest/TestSyndFeedRSS10DCSyModules.java @@ -36,10 +36,10 @@ public class TestSyndFeedRSS10DCSyModules extends TestSyndFeedRSS10 { public void testChannelDCModule() throws Exception { final DCModule dc = (DCModule) this.getCachedSyndFeed().getModule(DCModule.URI); - _testDCModule(dc, "channel."); + testDCModule(dc, "channel."); } - protected void _testDCModule(final DCModule dc, final String prefix) throws Exception { + protected void testDCModule(final DCModule dc, final String prefix) throws Exception { assertNotNull(dc); assertProperty(dc.getTitle(), prefix + "dc:title"); assertProperty(dc.getCreator(), prefix + "dc:creator"); @@ -79,15 +79,15 @@ public class TestSyndFeedRSS10DCSyModules extends TestSyndFeedRSS10 { } public void testItemsDCModule() throws Exception { - _testItemDCModule(0); - _testItemDCModule(1); + testItemDCModule(0); + testItemDCModule(1); } - protected void _testItemDCModule(final int i) throws Exception { + protected void testItemDCModule(final int i) throws Exception { final List entries = this.getCachedSyndFeed().getEntries(); final SyndEntry entry = entries.get(i); final DCModule dc = (DCModule) entry.getModule(DCModule.URI); - _testDCModule(dc, "item[" + i + "]."); + testDCModule(dc, "item[" + i + "]."); } diff --git a/src/test/java/com/sun/syndication/unittest/TestSyndFeedRSS20.java b/src/test/java/com/sun/syndication/unittest/TestSyndFeedRSS20.java index 1fa3579..e1220c1 100644 --- a/src/test/java/com/sun/syndication/unittest/TestSyndFeedRSS20.java +++ b/src/test/java/com/sun/syndication/unittest/TestSyndFeedRSS20.java @@ -30,8 +30,8 @@ public class TestSyndFeedRSS20 extends TestSyndFeedRSS094 { } @Override - protected void _testItem(final int i) throws Exception { - super._testItem(i); + protected void testItem(final int i) throws Exception { + super.testItem(i); final List items = this.getCachedSyndFeed().getEntries(); final SyndEntry entry = items.get(i); assertProperty(entry.getContents().get(0).getValue(), "channel.item[" + i + "].content"); diff --git a/src/test/java/com/sun/syndication/unittest/TestXmlFixerReader.java b/src/test/java/com/sun/syndication/unittest/TestXmlFixerReader.java index 256955e..8a88d1a 100644 --- a/src/test/java/com/sun/syndication/unittest/TestXmlFixerReader.java +++ b/src/test/java/com/sun/syndication/unittest/TestXmlFixerReader.java @@ -41,39 +41,39 @@ public class TestXmlFixerReader extends TestCase { private static final String XML_PROLOG = ""; public void testTrim() throws Exception { - _testValidTrim("", ""); - _testValidTrim("", XML_PROLOG + ""); - _testValidTrim(" ", ""); - _testValidTrim(" ", XML_PROLOG + ""); - _testValidTrim(" \n", ""); - _testValidTrim(" \n", XML_PROLOG + ""); - _testValidTrim("", ""); - _testValidTrim("", XML_PROLOG + ""); - _testValidTrim(" ", ""); - _testValidTrim(" ", XML_PROLOG + ""); - _testValidTrim(" ", ""); - _testValidTrim(" ", XML_PROLOG + ""); - _testValidTrim(" ", ""); - _testValidTrim(" ", XML_PROLOG + ""); - _testValidTrim(" \n ", ""); - _testValidTrim(" \n ", XML_PROLOG + ""); + testValidTrim("", ""); + testValidTrim("", XML_PROLOG + ""); + testValidTrim(" ", ""); + testValidTrim(" ", XML_PROLOG + ""); + testValidTrim(" \n", ""); + testValidTrim(" \n", XML_PROLOG + ""); + testValidTrim("", ""); + testValidTrim("", XML_PROLOG + ""); + testValidTrim(" ", ""); + testValidTrim(" ", XML_PROLOG + ""); + testValidTrim(" ", ""); + testValidTrim(" ", XML_PROLOG + ""); + testValidTrim(" ", ""); + testValidTrim(" ", XML_PROLOG + ""); + testValidTrim(" \n ", ""); + testValidTrim(" \n ", XML_PROLOG + ""); - _testInvalidTrim("x", ""); - _testInvalidTrim("x", XML_PROLOG + ""); - _testInvalidTrim(" x", ""); - _testInvalidTrim(" x", XML_PROLOG + ""); - _testInvalidTrim(" x\n", ""); - _testInvalidTrim(" x\n", XML_PROLOG + ""); - _testInvalidTrim("x ", ""); - _testInvalidTrim(" x ", XML_PROLOG + ""); - _testInvalidTrim(" x ", ""); - _testInvalidTrim(" x ", XML_PROLOG + ""); - _testInvalidTrim(" x\n ", ""); - _testInvalidTrim(" x\n ", XML_PROLOG + ""); + testInvalidTrim("x", ""); + testInvalidTrim("x", XML_PROLOG + ""); + testInvalidTrim(" x", ""); + testInvalidTrim(" x", XML_PROLOG + ""); + testInvalidTrim(" x\n", ""); + testInvalidTrim(" x\n", XML_PROLOG + ""); + testInvalidTrim("x ", ""); + testInvalidTrim(" x ", XML_PROLOG + ""); + testInvalidTrim(" x ", ""); + testInvalidTrim(" x ", XML_PROLOG + ""); + testInvalidTrim(" x\n ", ""); + testInvalidTrim(" x\n ", XML_PROLOG + ""); } public void testAmpHandling() throws Exception { @@ -85,40 +85,40 @@ public class TestXmlFixerReader extends TestCase { } public void testHtmlEntities() throws Exception { - _testValidEntities(""); - _testValidEntities(XML_PROLOG + ""); - _testValidEntities(" \n" + XML_PROLOG + ""); + testValidEntities(""); + testValidEntities(XML_PROLOG + ""); + testValidEntities(" \n" + XML_PROLOG + ""); - _testValidEntities("'¥ú¥"); - _testValidEntities(XML_PROLOG + "'¥ú¥"); - _testValidEntities(" \n" + XML_PROLOG + "'¥ú¥"); + testValidEntities("'¥ú¥"); + testValidEntities(XML_PROLOG + "'¥ú¥"); + testValidEntities(" \n" + XML_PROLOG + "'¥ú¥"); - _testValidEntities("ΠΡ#913;Ρ"); - _testValidEntities(XML_PROLOG + "ΠΡΑΡ"); - _testValidEntities(" \n" + XML_PROLOG + "ΠΡΑΡ"); + testValidEntities("ΠΡ#913;Ρ"); + testValidEntities(XML_PROLOG + "ΠΡΑΡ"); + testValidEntities(" \n" + XML_PROLOG + "ΠΡΑΡ"); - _testValidEntities("Œ—–—"); - _testValidEntities(XML_PROLOG + "Œ—–—"); - _testValidEntities(" \n" + XML_PROLOG + "Œ—–—"); + testValidEntities("Œ—–—"); + testValidEntities(XML_PROLOG + "Œ—–—"); + testValidEntities(" \n" + XML_PROLOG + "Œ—–—"); - _testInvalidEntities("'&yexn;ú¥"); - _testInvalidEntities(XML_PROLOG + "'&yexn;ú¥"); - _testInvalidEntities(" \n" + XML_PROLOG + "'&yexn;ú¥"); + testInvalidEntities("'&yexn;ú¥"); + testInvalidEntities(XML_PROLOG + "'&yexn;ú¥"); + testInvalidEntities(" \n" + XML_PROLOG + "'&yexn;ú¥"); - _testInvalidEntities("Π&Rhox;#913;Ρ"); - _testInvalidEntities(XML_PROLOG + "Π&Rhox;ΑΡ"); - _testInvalidEntities(" \n" + XML_PROLOG + "Π&Rhox;ΑΡ"); + testInvalidEntities("Π&Rhox;#913;Ρ"); + testInvalidEntities(XML_PROLOG + "Π&Rhox;ΑΡ"); + testInvalidEntities(" \n" + XML_PROLOG + "Π&Rhox;ΑΡ"); - _testInvalidEntities("'¥x50;¥"); - _testInvalidEntities(XML_PROLOG + "'¥x50;¥"); - _testInvalidEntities(" \n" + XML_PROLOG + "'¥x50;¥"); + testInvalidEntities("'¥x50;¥"); + testInvalidEntities(XML_PROLOG + "'¥x50;¥"); + testInvalidEntities(" \n" + XML_PROLOG + "'¥x50;¥"); - _testInvalidEntities("ΠΡ x13;Ρ"); - _testInvalidEntities(XML_PROLOG + "ΠΡ x13;Ρ"); - _testInvalidEntities(" \n" + XML_PROLOG + "ΠΡ x13;Ρ"); + testInvalidEntities("ΠΡ x13;Ρ"); + testInvalidEntities(XML_PROLOG + "ΠΡ x13;Ρ"); + testInvalidEntities(" \n" + XML_PROLOG + "ΠΡ x13;Ρ"); } - protected void _testXmlParse(final String garbish, final String xmlDoc) throws Exception { + protected void testXmlParse(final String garbish, final String xmlDoc) throws Exception { final InputStream is = getStream(garbish, xmlDoc); Reader reader = new XmlReader(is); reader = new XmlFixerReader(reader); @@ -126,25 +126,25 @@ public class TestXmlFixerReader extends TestCase { saxBuilder.build(reader); } - protected void _testValidTrim(final String garbish, final String xmlDoc) throws Exception { - _testXmlParse(garbish, xmlDoc); + protected void testValidTrim(final String garbish, final String xmlDoc) throws Exception { + testXmlParse(garbish, xmlDoc); } - protected void _testInvalidTrim(final String garbish, final String xmlDoc) throws Exception { + protected void testInvalidTrim(final String garbish, final String xmlDoc) throws Exception { try { - _testXmlParse(garbish, xmlDoc); + testXmlParse(garbish, xmlDoc); assertTrue(false); } catch (final Exception ex) { } } - protected void _testValidEntities(final String xmlDoc) throws Exception { - _testXmlParse("", xmlDoc); + protected void testValidEntities(final String xmlDoc) throws Exception { + testXmlParse("", xmlDoc); } - protected void _testInvalidEntities(final String xmlDoc) throws Exception { + protected void testInvalidEntities(final String xmlDoc) throws Exception { try { - _testXmlParse("", xmlDoc); + testXmlParse("", xmlDoc); assertTrue(false); } catch (final Exception ex) { } diff --git a/src/test/java/com/sun/syndication/unittest/TestXmlReader.java b/src/test/java/com/sun/syndication/unittest/TestXmlReader.java index 98ed21e..60f3cba 100644 --- a/src/test/java/com/sun/syndication/unittest/TestXmlReader.java +++ b/src/test/java/com/sun/syndication/unittest/TestXmlReader.java @@ -48,7 +48,7 @@ public class TestXmlReader extends TestCase { test.testHttp(); } - protected void _testRawNoBomValid(final String encoding) throws Exception { + protected void testRawNoBomValid(final String encoding) throws Exception { InputStream is = getXmlStream("no-bom", XML1, encoding, encoding); XmlReader xmlReader = new XmlReader(is, false); assertEquals(xmlReader.getEncoding(), "UTF-8"); @@ -70,7 +70,7 @@ public class TestXmlReader extends TestCase { assertEquals(xmlReader.getEncoding(), encoding); } - protected void _testRawNoBomInvalid(final String encoding) throws Exception { + protected void testRawNoBomInvalid(final String encoding) throws Exception { final InputStream is = getXmlStream("no-bom", XML3, encoding, encoding); try { final XmlReader xmlReader = new XmlReader(is, false); @@ -81,12 +81,12 @@ public class TestXmlReader extends TestCase { } public void testRawNoBom() throws Exception { - _testRawNoBomValid("US-ASCII"); - _testRawNoBomValid("UTF-8"); - _testRawNoBomValid("ISO-8859-1"); + testRawNoBomValid("US-ASCII"); + testRawNoBomValid("UTF-8"); + testRawNoBomValid("ISO-8859-1"); } - protected void _testRawBomValid(final String encoding) throws Exception { + protected void testRawBomValid(final String encoding) throws Exception { final InputStream is = getXmlStream(encoding + "-bom", XML3, encoding, encoding); final XmlReader xmlReader = new XmlReader(is, false); if (!encoding.equals("UTF-16")) { @@ -96,7 +96,7 @@ public class TestXmlReader extends TestCase { } } - protected void _testRawBomInvalid(final String bomEnc, final String streamEnc, final String prologEnc) throws Exception { + protected void testRawBomInvalid(final String bomEnc, final String streamEnc, final String prologEnc) throws Exception { final InputStream is = getXmlStream(bomEnc, XML3, streamEnc, prologEnc); try { final XmlReader xmlReader = new XmlReader(is, false); @@ -107,83 +107,83 @@ public class TestXmlReader extends TestCase { } public void testRawBom() throws Exception { - _testRawBomValid("UTF-8"); - _testRawBomValid("UTF-16BE"); - _testRawBomValid("UTF-16LE"); - _testRawBomValid("UTF-16"); + testRawBomValid("UTF-8"); + testRawBomValid("UTF-16BE"); + testRawBomValid("UTF-16LE"); + testRawBomValid("UTF-16"); - _testRawBomInvalid("UTF-8-bom", "US-ASCII", "US-ASCII"); - _testRawBomInvalid("UTF-8-bom", "ISO-8859-1", "ISO-8859-1"); - _testRawBomInvalid("UTF-8-bom", "UTF-8", "UTF-16"); - _testRawBomInvalid("UTF-8-bom", "UTF-8", "UTF-16BE"); - _testRawBomInvalid("UTF-8-bom", "UTF-8", "UTF-16LE"); - _testRawBomInvalid("UTF-16BE-bom", "UTF-16BE", "UTF-16LE"); - _testRawBomInvalid("UTF-16LE-bom", "UTF-16LE", "UTF-16BE"); - _testRawBomInvalid("UTF-16LE-bom", "UTF-16LE", "UTF-8"); + testRawBomInvalid("UTF-8-bom", "US-ASCII", "US-ASCII"); + testRawBomInvalid("UTF-8-bom", "ISO-8859-1", "ISO-8859-1"); + testRawBomInvalid("UTF-8-bom", "UTF-8", "UTF-16"); + testRawBomInvalid("UTF-8-bom", "UTF-8", "UTF-16BE"); + testRawBomInvalid("UTF-8-bom", "UTF-8", "UTF-16LE"); + testRawBomInvalid("UTF-16BE-bom", "UTF-16BE", "UTF-16LE"); + testRawBomInvalid("UTF-16LE-bom", "UTF-16LE", "UTF-16BE"); + testRawBomInvalid("UTF-16LE-bom", "UTF-16LE", "UTF-8"); } public void testHttp() throws Exception { - _testHttpValid("application/xml", "no-bom", "US-ASCII", null); - _testHttpValid("application/xml", "UTF-8-bom", "US-ASCII", null); - _testHttpValid("application/xml", "UTF-8-bom", "UTF-8", null); - _testHttpValid("application/xml", "UTF-8-bom", "UTF-8", "UTF-8"); - _testHttpValid("application/xml;charset=UTF-8", "UTF-8-bom", "UTF-8", null); - _testHttpValid("application/xml;charset=\"UTF-8\"", "UTF-8-bom", "UTF-8", null); - _testHttpValid("application/xml;charset='UTF-8'", "UTF-8-bom", "UTF-8", null); - _testHttpValid("application/xml;charset=UTF-8", "UTF-8-bom", "UTF-8", "UTF-8"); - _testHttpValid("application/xml;charset=UTF-16", "UTF-16BE-bom", "UTF-16BE", null); - _testHttpValid("application/xml;charset=UTF-16", "UTF-16BE-bom", "UTF-16BE", "UTF-16"); - _testHttpValid("application/xml;charset=UTF-16", "UTF-16BE-bom", "UTF-16BE", "UTF-16BE"); + testHttpValid("application/xml", "no-bom", "US-ASCII", null); + testHttpValid("application/xml", "UTF-8-bom", "US-ASCII", null); + testHttpValid("application/xml", "UTF-8-bom", "UTF-8", null); + testHttpValid("application/xml", "UTF-8-bom", "UTF-8", "UTF-8"); + testHttpValid("application/xml;charset=UTF-8", "UTF-8-bom", "UTF-8", null); + testHttpValid("application/xml;charset=\"UTF-8\"", "UTF-8-bom", "UTF-8", null); + testHttpValid("application/xml;charset='UTF-8'", "UTF-8-bom", "UTF-8", null); + testHttpValid("application/xml;charset=UTF-8", "UTF-8-bom", "UTF-8", "UTF-8"); + testHttpValid("application/xml;charset=UTF-16", "UTF-16BE-bom", "UTF-16BE", null); + testHttpValid("application/xml;charset=UTF-16", "UTF-16BE-bom", "UTF-16BE", "UTF-16"); + testHttpValid("application/xml;charset=UTF-16", "UTF-16BE-bom", "UTF-16BE", "UTF-16BE"); - _testHttpInvalid("application/xml;charset=UTF-16BE", "UTF-16BE-bom", "UTF-16BE", null); - _testHttpInvalid("application/xml;charset=UTF-16BE", "UTF-16BE-bom", "UTF-16BE", "UTF-16"); - _testHttpInvalid("application/xml;charset=UTF-16BE", "UTF-16BE-bom", "UTF-16BE", "UTF-16BE"); - _testHttpInvalid("application/xml", "UTF-8-bom", "US-ASCII", "US-ASCII"); - _testHttpInvalid("application/xml;charset=UTF-16", "UTF-16LE", "UTF-8", "UTF-8"); - _testHttpInvalid("application/xml;charset=UTF-16", "no-bom", "UTF-16BE", "UTF-16BE"); + testHttpInvalid("application/xml;charset=UTF-16BE", "UTF-16BE-bom", "UTF-16BE", null); + testHttpInvalid("application/xml;charset=UTF-16BE", "UTF-16BE-bom", "UTF-16BE", "UTF-16"); + testHttpInvalid("application/xml;charset=UTF-16BE", "UTF-16BE-bom", "UTF-16BE", "UTF-16BE"); + testHttpInvalid("application/xml", "UTF-8-bom", "US-ASCII", "US-ASCII"); + testHttpInvalid("application/xml;charset=UTF-16", "UTF-16LE", "UTF-8", "UTF-8"); + testHttpInvalid("application/xml;charset=UTF-16", "no-bom", "UTF-16BE", "UTF-16BE"); - _testHttpValid("text/xml", "no-bom", "US-ASCII", null); - _testHttpValid("text/xml;charset=UTF-8", "UTF-8-bom", "UTF-8", "UTF-8"); - _testHttpValid("text/xml;charset=UTF-8", "UTF-8-bom", "UTF-8", null); - _testHttpValid("text/xml;charset=UTF-16", "UTF-16BE-bom", "UTF-16BE", null); - _testHttpValid("text/xml;charset=UTF-16", "UTF-16BE-bom", "UTF-16BE", "UTF-16"); - _testHttpValid("text/xml;charset=UTF-16", "UTF-16BE-bom", "UTF-16BE", "UTF-16BE"); - _testHttpValid("text/xml", "UTF-8-bom", "US-ASCII", null); + testHttpValid("text/xml", "no-bom", "US-ASCII", null); + testHttpValid("text/xml;charset=UTF-8", "UTF-8-bom", "UTF-8", "UTF-8"); + testHttpValid("text/xml;charset=UTF-8", "UTF-8-bom", "UTF-8", null); + testHttpValid("text/xml;charset=UTF-16", "UTF-16BE-bom", "UTF-16BE", null); + testHttpValid("text/xml;charset=UTF-16", "UTF-16BE-bom", "UTF-16BE", "UTF-16"); + testHttpValid("text/xml;charset=UTF-16", "UTF-16BE-bom", "UTF-16BE", "UTF-16BE"); + testHttpValid("text/xml", "UTF-8-bom", "US-ASCII", null); - _testAlternateDefaultEncoding("application/xml", "UTF-8-bom", "UTF-8", null, null); - _testAlternateDefaultEncoding("application/xml", "no-bom", "US-ASCII", null, "US-ASCII"); - _testAlternateDefaultEncoding("application/xml", "UTF-8-bom", "UTF-8", null, "UTF-8"); - _testAlternateDefaultEncoding("text/xml", "no-bom", "US-ASCII", null, null); - _testAlternateDefaultEncoding("text/xml", "no-bom", "US-ASCII", null, "US-ASCII"); - _testAlternateDefaultEncoding("text/xml", "no-bom", "US-ASCII", null, "UTF-8"); + testAlternateDefaultEncoding("application/xml", "UTF-8-bom", "UTF-8", null, null); + testAlternateDefaultEncoding("application/xml", "no-bom", "US-ASCII", null, "US-ASCII"); + testAlternateDefaultEncoding("application/xml", "UTF-8-bom", "UTF-8", null, "UTF-8"); + testAlternateDefaultEncoding("text/xml", "no-bom", "US-ASCII", null, null); + testAlternateDefaultEncoding("text/xml", "no-bom", "US-ASCII", null, "US-ASCII"); + testAlternateDefaultEncoding("text/xml", "no-bom", "US-ASCII", null, "UTF-8"); - _testHttpInvalid("text/xml;charset=UTF-16BE", "UTF-16BE-bom", "UTF-16BE", null); - _testHttpInvalid("text/xml;charset=UTF-16BE", "UTF-16BE-bom", "UTF-16BE", "UTF-16"); - _testHttpInvalid("text/xml;charset=UTF-16BE", "UTF-16BE-bom", "UTF-16BE", "UTF-16BE"); - _testHttpInvalid("text/xml;charset=UTF-16", "no-bom", "UTF-16BE", "UTF-16BE"); - _testHttpInvalid("text/xml;charset=UTF-16", "no-bom", "UTF-16BE", null); + testHttpInvalid("text/xml;charset=UTF-16BE", "UTF-16BE-bom", "UTF-16BE", null); + testHttpInvalid("text/xml;charset=UTF-16BE", "UTF-16BE-bom", "UTF-16BE", "UTF-16"); + testHttpInvalid("text/xml;charset=UTF-16BE", "UTF-16BE-bom", "UTF-16BE", "UTF-16BE"); + testHttpInvalid("text/xml;charset=UTF-16", "no-bom", "UTF-16BE", "UTF-16BE"); + testHttpInvalid("text/xml;charset=UTF-16", "no-bom", "UTF-16BE", null); - _testHttpLenient("text/xml", "no-bom", "US-ASCII", null, "US-ASCII"); - _testHttpLenient("text/xml;charset=UTF-8", "UTF-8-bom", "UTF-8", "UTF-8", "UTF-8"); - _testHttpLenient("text/xml;charset=UTF-8", "UTF-8-bom", "UTF-8", null, "UTF-8"); - _testHttpLenient("text/xml;charset=UTF-16", "UTF-16BE-bom", "UTF-16BE", null, "UTF-16BE"); - _testHttpLenient("text/xml;charset=UTF-16", "UTF-16BE-bom", "UTF-16BE", "UTF-16", "UTF-16"); - _testHttpLenient("text/xml;charset=UTF-16", "UTF-16BE-bom", "UTF-16BE", "UTF-16BE", "UTF-16BE"); - _testHttpLenient("text/xml", "UTF-8-bom", "US-ASCII", null, "US-ASCII"); + testHttpLenient("text/xml", "no-bom", "US-ASCII", null, "US-ASCII"); + testHttpLenient("text/xml;charset=UTF-8", "UTF-8-bom", "UTF-8", "UTF-8", "UTF-8"); + testHttpLenient("text/xml;charset=UTF-8", "UTF-8-bom", "UTF-8", null, "UTF-8"); + testHttpLenient("text/xml;charset=UTF-16", "UTF-16BE-bom", "UTF-16BE", null, "UTF-16BE"); + testHttpLenient("text/xml;charset=UTF-16", "UTF-16BE-bom", "UTF-16BE", "UTF-16", "UTF-16"); + testHttpLenient("text/xml;charset=UTF-16", "UTF-16BE-bom", "UTF-16BE", "UTF-16BE", "UTF-16BE"); + testHttpLenient("text/xml", "UTF-8-bom", "US-ASCII", null, "US-ASCII"); - _testHttpLenient("text/xml;charset=UTF-16BE", "UTF-16BE-bom", "UTF-16BE", null, "UTF-16BE"); - _testHttpLenient("text/xml;charset=UTF-16BE", "UTF-16BE-bom", "UTF-16BE", "UTF-16", "UTF-16"); - _testHttpLenient("text/xml;charset=UTF-16BE", "UTF-16BE-bom", "UTF-16BE", "UTF-16BE", "UTF-16BE"); - _testHttpLenient("text/xml;charset=UTF-16", "no-bom", "UTF-16BE", "UTF-16BE", "UTF-16BE"); - _testHttpLenient("text/xml;charset=UTF-16", "no-bom", "UTF-16BE", null, "UTF-16"); + testHttpLenient("text/xml;charset=UTF-16BE", "UTF-16BE-bom", "UTF-16BE", null, "UTF-16BE"); + testHttpLenient("text/xml;charset=UTF-16BE", "UTF-16BE-bom", "UTF-16BE", "UTF-16", "UTF-16"); + testHttpLenient("text/xml;charset=UTF-16BE", "UTF-16BE-bom", "UTF-16BE", "UTF-16BE", "UTF-16BE"); + testHttpLenient("text/xml;charset=UTF-16", "no-bom", "UTF-16BE", "UTF-16BE", "UTF-16BE"); + testHttpLenient("text/xml;charset=UTF-16", "no-bom", "UTF-16BE", null, "UTF-16"); - _testHttpLenient("text/html", "no-bom", "US-ASCII", "US-ASCII", "US-ASCII"); - _testHttpLenient("text/html", "no-bom", "US-ASCII", null, "US-ASCII"); - _testHttpLenient("text/html;charset=UTF-8", "no-bom", "US-ASCII", "UTF-8", "UTF-8"); - _testHttpLenient("text/html;charset=UTF-16BE", "no-bom", "US-ASCII", "UTF-8", "UTF-8"); + testHttpLenient("text/html", "no-bom", "US-ASCII", "US-ASCII", "US-ASCII"); + testHttpLenient("text/html", "no-bom", "US-ASCII", null, "US-ASCII"); + testHttpLenient("text/html;charset=UTF-8", "no-bom", "US-ASCII", "UTF-8", "UTF-8"); + testHttpLenient("text/html;charset=UTF-16BE", "no-bom", "US-ASCII", "UTF-8", "UTF-8"); } - public void _testAlternateDefaultEncoding(final String cT, final String bomEnc, final String streamEnc, final String prologEnc, final String alternateEnc) + public void testAlternateDefaultEncoding(final String cT, final String bomEnc, final String streamEnc, final String prologEnc, final String alternateEnc) throws Exception { try { final InputStream is = getXmlStream(bomEnc, prologEnc == null ? XML1 : XML3, streamEnc, prologEnc); @@ -201,7 +201,7 @@ public class TestXmlReader extends TestCase { } } - public void _testHttpValid(final String cT, final String bomEnc, final String streamEnc, final String prologEnc) throws Exception { + public void testHttpValid(final String cT, final String bomEnc, final String streamEnc, final String prologEnc) throws Exception { final InputStream is = getXmlStream(bomEnc, prologEnc == null ? XML1 : XML3, streamEnc, prologEnc); final XmlReader xmlReader = new XmlReader(is, cT, false); if (!streamEnc.equals("UTF-16")) { @@ -212,7 +212,7 @@ public class TestXmlReader extends TestCase { } } - protected void _testHttpInvalid(final String cT, final String bomEnc, final String streamEnc, final String prologEnc) throws Exception { + protected void testHttpInvalid(final String cT, final String bomEnc, final String streamEnc, final String prologEnc) throws Exception { final InputStream is = getXmlStream(bomEnc, prologEnc == null ? XML2 : XML3, streamEnc, prologEnc); try { new XmlReader(is, cT, false); @@ -222,7 +222,7 @@ public class TestXmlReader extends TestCase { } } - protected void _testHttpLenient(final String cT, final String bomEnc, final String streamEnc, final String prologEnc, final String shouldbe) + protected void testHttpLenient(final String cT, final String bomEnc, final String streamEnc, final String prologEnc, final String shouldbe) throws Exception { final InputStream is = getXmlStream(bomEnc, prologEnc == null ? XML2 : XML3, streamEnc, prologEnc); final XmlReader xmlReader = new XmlReader(is, cT, true); diff --git a/src/test/java/com/sun/syndication/unittest/issues/Issue1Test.java b/src/test/java/com/sun/syndication/unittest/issues/Issue1Test.java index d8d401f..b3863ec 100644 --- a/src/test/java/com/sun/syndication/unittest/issues/Issue1Test.java +++ b/src/test/java/com/sun/syndication/unittest/issues/Issue1Test.java @@ -52,77 +52,77 @@ public class Issue1Test extends SyndFeedTest { } public void testHtmlEntities() throws Exception { - _testValidEntities(""); - _testValidEntities(XML_PROLOG + ""); - _testValidEntities(" \n" + XML_PROLOG + ""); + testValidEntities(""); + testValidEntities(XML_PROLOG + ""); + testValidEntities(" \n" + XML_PROLOG + ""); - _testValidEntities("'¥ú¥"); - _testValidEntities(XML_PROLOG + "'¥ú¥"); - _testValidEntities(" \n" + XML_PROLOG + "'¥ú¥"); + testValidEntities("'¥ú¥"); + testValidEntities(XML_PROLOG + "'¥ú¥"); + testValidEntities(" \n" + XML_PROLOG + "'¥ú¥"); - _testValidEntities("ΠΡ#913;Ρ"); - _testValidEntities(XML_PROLOG + "ΠΡΑΡ"); - _testValidEntities(" \n" + XML_PROLOG + "ΠΡΑΡ"); + testValidEntities("ΠΡ#913;Ρ"); + testValidEntities(XML_PROLOG + "ΠΡΑΡ"); + testValidEntities(" \n" + XML_PROLOG + "ΠΡΑΡ"); - _testValidEntities("Œ—–—"); - _testValidEntities(XML_PROLOG + "Œ—–—"); - _testValidEntities(" \n" + XML_PROLOG + "Œ—–—"); + testValidEntities("Œ—–—"); + testValidEntities(XML_PROLOG + "Œ—–—"); + testValidEntities(" \n" + XML_PROLOG + "Œ—–—"); - _testInvalidEntities("'&yexn;ú¥"); - _testInvalidEntities(XML_PROLOG + "'&yexn;ú¥"); - _testInvalidEntities(" \n" + XML_PROLOG + "'&yexn;ú¥"); + testInvalidEntities("'&yexn;ú¥"); + testInvalidEntities(XML_PROLOG + "'&yexn;ú¥"); + testInvalidEntities(" \n" + XML_PROLOG + "'&yexn;ú¥"); - _testInvalidEntities("Π&Rhox;#913;Ρ"); - _testInvalidEntities(XML_PROLOG + "Π&Rhox;ΑΡ"); - _testInvalidEntities(" \n" + XML_PROLOG + "Π&Rhox;ΑΡ"); + testInvalidEntities("Π&Rhox;#913;Ρ"); + testInvalidEntities(XML_PROLOG + "Π&Rhox;ΑΡ"); + testInvalidEntities(" \n" + XML_PROLOG + "Π&Rhox;ΑΡ"); - _testInvalidEntities("'¥x50;¥"); - _testInvalidEntities(XML_PROLOG + "'¥x50;¥"); - _testInvalidEntities(" \n" + XML_PROLOG + "'¥x50;¥"); + testInvalidEntities("'¥x50;¥"); + testInvalidEntities(XML_PROLOG + "'¥x50;¥"); + testInvalidEntities(" \n" + XML_PROLOG + "'¥x50;¥"); - _testInvalidEntities("ΠΡ x13;Ρ"); - _testInvalidEntities(XML_PROLOG + "ΠΡ x13;Ρ"); - _testInvalidEntities(" \n" + XML_PROLOG + "ΠΡ x13;Ρ"); + testInvalidEntities("ΠΡ x13;Ρ"); + testInvalidEntities(XML_PROLOG + "ΠΡ x13;Ρ"); + testInvalidEntities(" \n" + XML_PROLOG + "ΠΡ x13;Ρ"); } public void testTrim() throws Exception { - _testValidTrim("", ""); - _testValidTrim("", XML_PROLOG + ""); - _testValidTrim(" ", ""); - _testValidTrim(" ", XML_PROLOG + ""); - _testValidTrim(" \n", ""); - _testValidTrim(" \n", XML_PROLOG + ""); - _testValidTrim("", ""); - _testValidTrim("", XML_PROLOG + ""); - _testValidTrim(" ", ""); - _testValidTrim(" ", XML_PROLOG + ""); - _testValidTrim(" ", ""); - _testValidTrim(" ", XML_PROLOG + ""); - _testValidTrim(" ", ""); - _testValidTrim(" ", XML_PROLOG + ""); - _testValidTrim(" \n ", ""); - _testValidTrim(" \n ", XML_PROLOG + ""); + testValidTrim("", ""); + testValidTrim("", XML_PROLOG + ""); + testValidTrim(" ", ""); + testValidTrim(" ", XML_PROLOG + ""); + testValidTrim(" \n", ""); + testValidTrim(" \n", XML_PROLOG + ""); + testValidTrim("", ""); + testValidTrim("", XML_PROLOG + ""); + testValidTrim(" ", ""); + testValidTrim(" ", XML_PROLOG + ""); + testValidTrim(" ", ""); + testValidTrim(" ", XML_PROLOG + ""); + testValidTrim(" ", ""); + testValidTrim(" ", XML_PROLOG + ""); + testValidTrim(" \n ", ""); + testValidTrim(" \n ", XML_PROLOG + ""); // TODO lorenzo.sm: This test was added to trim \r char (as with \n). // Source of "bad" RSS http://www.diariohorizonte.com/rss/71/deportes - _testValidTrim("\r\n", XML_PROLOG + ""); + testValidTrim("\r\n", XML_PROLOG + ""); - _testInvalidTrim("x", ""); - _testInvalidTrim("x", XML_PROLOG + ""); - _testInvalidTrim(" x", ""); - _testInvalidTrim(" x", XML_PROLOG + ""); - _testInvalidTrim(" x\n", ""); - _testInvalidTrim(" x\n", XML_PROLOG + ""); - _testInvalidTrim("x ", ""); - _testInvalidTrim(" x ", XML_PROLOG + ""); - _testInvalidTrim(" x ", ""); - _testInvalidTrim(" x ", XML_PROLOG + ""); - _testInvalidTrim(" x\n ", ""); - _testInvalidTrim(" x\n ", XML_PROLOG + ""); + testInvalidTrim("x", ""); + testInvalidTrim("x", XML_PROLOG + ""); + testInvalidTrim(" x", ""); + testInvalidTrim(" x", XML_PROLOG + ""); + testInvalidTrim(" x\n", ""); + testInvalidTrim(" x\n", XML_PROLOG + ""); + testInvalidTrim("x ", ""); + testInvalidTrim(" x ", XML_PROLOG + ""); + testInvalidTrim(" x ", ""); + testInvalidTrim(" x ", XML_PROLOG + ""); + testInvalidTrim(" x\n ", ""); + testInvalidTrim(" x\n ", XML_PROLOG + ""); } // XML Stream generator @@ -136,31 +136,31 @@ public class Issue1Test extends SyndFeedTest { return new ByteArrayInputStream(baos.toByteArray()); } - protected void _testInvalidEntities(final String xmlDoc) throws Exception { + protected void testInvalidEntities(final String xmlDoc) throws Exception { try { - _testXmlParse("", xmlDoc); + testXmlParse("", xmlDoc); assertTrue(false); } catch (final Exception ex) { } } - protected void _testInvalidTrim(final String garbish, final String xmlDoc) throws Exception { + protected void testInvalidTrim(final String garbish, final String xmlDoc) throws Exception { try { - _testXmlParse(garbish, xmlDoc); + testXmlParse(garbish, xmlDoc); assertTrue(false); } catch (final Exception ex) { } } - protected void _testValidEntities(final String xmlDoc) throws Exception { - _testXmlParse("", xmlDoc); + protected void testValidEntities(final String xmlDoc) throws Exception { + testXmlParse("", xmlDoc); } - protected void _testValidTrim(final String garbish, final String xmlDoc) throws Exception { - _testXmlParse(garbish, xmlDoc); + protected void testValidTrim(final String garbish, final String xmlDoc) throws Exception { + testXmlParse(garbish, xmlDoc); } - protected void _testXmlParse(final String garbish, final String xmlDoc) throws Exception { + protected void testXmlParse(final String garbish, final String xmlDoc) throws Exception { final InputStream is = getStream(garbish, xmlDoc); Reader reader = new XmlReader(is); reader = new XmlFixerReader(reader); diff --git a/src/test/java/com/sun/syndication/unittest/issues/Issue2Test.java b/src/test/java/com/sun/syndication/unittest/issues/Issue2Test.java index 0a16501..d78e2e1 100644 --- a/src/test/java/com/sun/syndication/unittest/issues/Issue2Test.java +++ b/src/test/java/com/sun/syndication/unittest/issues/Issue2Test.java @@ -29,14 +29,14 @@ import com.sun.syndication.unittest.TestSyndFeedRSS094; public class Issue2Test extends TestSyndFeedRSS094 { @Override - protected void _testItem(final int i) throws Exception { - super._testItem(i); + protected void testItem(final int i) throws Exception { + super.testItem(i); final List items = this.getCachedSyndFeed().getEntries(); final SyndEntry entry = items.get(i); - _testComments(entry, i); + testComments(entry, i); } - protected void _testComments(final SyndEntry entry, final int i) throws Exception { + protected void testComments(final SyndEntry entry, final int i) throws Exception { assertProperty(entry.findRelatedLink("comments").getHref(), "rss_0.94.channel.item[" + i + "].comments"); }