From 489c1f4b5c47a0d8fb7c121ea4759b436745b6ae Mon Sep 17 00:00:00 2001 From: Patrick Gotthard Date: Sun, 13 Apr 2014 19:31:13 +0200 Subject: [PATCH] Removed type parameter from CopyFrom interface --- .../opensearch/impl/OpenSearchModuleImpl.java | 3 +- .../feed/module/sse/modules/Conflict.java | 17 +++++--- .../feed/module/sse/modules/Conflicts.java | 3 +- .../feed/module/sse/modules/History.java | 20 +++++---- .../feed/module/sse/modules/Related.java | 19 ++++---- .../feed/module/sse/modules/SSEModule.java | 2 +- .../feed/module/sse/modules/Sharing.java | 34 +++++++++------ .../feed/module/sse/modules/Sync.java | 43 +++++++++++-------- .../feed/module/sse/modules/Update.java | 16 ++++--- .../yahooweather/YWeatherModuleImpl.java | 2 +- 10 files changed, 91 insertions(+), 68 deletions(-) diff --git a/src/main/java/org/rometools/feed/module/opensearch/impl/OpenSearchModuleImpl.java b/src/main/java/org/rometools/feed/module/opensearch/impl/OpenSearchModuleImpl.java index b6b4996..5bf73c7 100644 --- a/src/main/java/org/rometools/feed/module/opensearch/impl/OpenSearchModuleImpl.java +++ b/src/main/java/org/rometools/feed/module/opensearch/impl/OpenSearchModuleImpl.java @@ -23,7 +23,6 @@ import org.rometools.feed.module.opensearch.entity.OSQuery; import com.sun.syndication.feed.CopyFrom; import com.sun.syndication.feed.atom.Link; -import com.sun.syndication.feed.module.Module; import com.sun.syndication.feed.module.ModuleImpl; /** @@ -134,7 +133,7 @@ public class OpenSearchModuleImpl extends ModuleImpl implements OpenSearchModule * @see com.sun.syndication.feed.CopyFrom#copyFrom(java.lang.Object) */ @Override - public void copyFrom(final CopyFrom obj) { + public void copyFrom(final CopyFrom obj) { final OpenSearchModule osm = (OpenSearchModule) obj; setTotalResults(osm.getTotalResults()); setItemsPerPage(osm.getItemsPerPage()); diff --git a/src/main/java/org/rometools/feed/module/sse/modules/Conflict.java b/src/main/java/org/rometools/feed/module/sse/modules/Conflict.java index f2cc8d8..1f8698a 100644 --- a/src/main/java/org/rometools/feed/module/sse/modules/Conflict.java +++ b/src/main/java/org/rometools/feed/module/sse/modules/Conflict.java @@ -3,7 +3,6 @@ package org.rometools.feed.module.sse.modules; import java.util.Date; import com.sun.syndication.feed.CopyFrom; -import com.sun.syndication.feed.module.Module; import com.sun.syndication.feed.rss.Item; /** @@ -17,10 +16,12 @@ public class Conflict extends SSEModule { public static final String NAME = "conflict"; /** - * An optional, string attribute. This text attribute identifies the endpoint that made the conflicting modification. It is used and compared - * programmatically. See sx:update for format guidance. + * An optional, string attribute. This text attribute identifies the endpoint that made the + * conflicting modification. It is used and compared programmatically. See sx:update for format + * guidance. *

- * Note: Either or both of the when or by attributes MUST be present; it is invalid to have neither. + * Note: Either or both of the when or by attributes MUST be present; it is invalid to have + * neither. */ public static final String BY_ATTRIBUTE = "by"; @@ -30,9 +31,11 @@ public class Conflict extends SSEModule { public static final String VERSION_ATTRIBUTE = "version"; /** - * An optional, date-time attribute. This is the date-time when the conflicting modification took place. See sx:update for format guidance. + * An optional, date-time attribute. This is the date-time when the conflicting modification + * took place. See sx:update for format guidance. *

- * Note: Either or both of the when or by attributes MUST be present; it is invalid to have neither. + * Note: Either or both of the when or by attributes MUST be present; it is invalid to have + * neither. */ public static final String WHEN_ATTRIBUTE = "when"; @@ -42,7 +45,7 @@ public class Conflict extends SSEModule { private Item conflictItem; @Override - public void copyFrom(final CopyFrom obj) { + public void copyFrom(final CopyFrom obj) { final Conflict conflict = (Conflict) obj; conflict.when = when == null ? null : (Date) when.clone(); conflict.by = by; diff --git a/src/main/java/org/rometools/feed/module/sse/modules/Conflicts.java b/src/main/java/org/rometools/feed/module/sse/modules/Conflicts.java index f046e06..3539038 100644 --- a/src/main/java/org/rometools/feed/module/sse/modules/Conflicts.java +++ b/src/main/java/org/rometools/feed/module/sse/modules/Conflicts.java @@ -1,7 +1,6 @@ package org.rometools.feed.module.sse.modules; import com.sun.syndication.feed.CopyFrom; -import com.sun.syndication.feed.module.Module; /** * element within @@ -13,7 +12,7 @@ public class Conflicts extends SSEModule { public static final String NAME = "conflicts"; @Override - public void copyFrom(final CopyFrom obj) { + public void copyFrom(final CopyFrom obj) { // nothing to copy, just a place-holder } } diff --git a/src/main/java/org/rometools/feed/module/sse/modules/History.java b/src/main/java/org/rometools/feed/module/sse/modules/History.java index 6d56395..eafda8a 100644 --- a/src/main/java/org/rometools/feed/module/sse/modules/History.java +++ b/src/main/java/org/rometools/feed/module/sse/modules/History.java @@ -5,7 +5,6 @@ import java.util.Date; import java.util.List; import com.sun.syndication.feed.CopyFrom; -import com.sun.syndication.feed.module.Module; /** *

@@ -40,7 +39,7 @@ public class History extends SSEModule {
     }
 
     @Override
-    public void copyFrom(final CopyFrom other) {
+    public void copyFrom(final CopyFrom other) {
         final History otherHistory = (History) other;
         when = otherHistory.when == null ? null : (Date) otherHistory.when.clone();
         // dont copy immutable
@@ -55,8 +54,8 @@ public class History extends SSEModule {
     /**
      * Get the date-time when the most recent modification took place.
      * 

- * This is the date-time when the most recent modification took place. If this attribute is omitted the value defaults to the earliest time representable in - * RFC 822. + * This is the date-time when the most recent modification took place. If this attribute is + * omitted the value defaults to the earliest time representable in RFC 822. * * @return the date-time when the most recent modification took place. */ @@ -77,15 +76,18 @@ public class History extends SSEModule { } /** - * Provides access to a text attribute identifying the unique endpoint that made the most recent modification. This SHOULD be some combination of user and - * device (so that a given user can edit a feed on multiple devices). This attribute is used programmatically to break ties in case two changes happened at - * the same time (within the same second). + * Provides access to a text attribute identifying the unique endpoint that made the most recent + * modification. This SHOULD be some combination of user and device (so that a given user can + * edit a feed on multiple devices). This attribute is used programmatically to break ties in + * case two changes happened at the same time (within the same second). *

* Either or both of the when or by must be present; it is invalid to have neither. *

- * If this attribute is omitted the value defaults to the empty string (which must be less than all other values for purposes of collation). + * If this attribute is omitted the value defaults to the empty string (which must be less than + * all other values for purposes of collation). * - * @return A text attribute identifying the unique endpoint that made the most recent modification. + * @return A text attribute identifying the unique endpoint that made the most recent + * modification. */ public String getBy() { return by; diff --git a/src/main/java/org/rometools/feed/module/sse/modules/Related.java b/src/main/java/org/rometools/feed/module/sse/modules/Related.java index 17f1d4b..badebbd 100644 --- a/src/main/java/org/rometools/feed/module/sse/modules/Related.java +++ b/src/main/java/org/rometools/feed/module/sse/modules/Related.java @@ -3,7 +3,6 @@ package org.rometools.feed.module.sse.modules; import java.util.Date; import com.sun.syndication.feed.CopyFrom; -import com.sun.syndication.feed.module.Module; /** *

@@ -24,12 +23,14 @@ public class Related extends SSEModule {
     public static final String NAME = "related";
 
     /**
-     * Indicates whether the link points to a file containing the complete collection of items for this feed.
+     * Indicates whether the link points to a file containing the complete collection of items for
+     * this feed.
      */
     public static final int COMPLETE = 0;
 
     /**
-     * Indicates whether the link points to a feed whose contents are being incorporated into this feed by the publisher.
+     * Indicates whether the link points to a feed whose contents are being incorporated into this
+     * feed by the publisher.
      */
     public static final int AGGREGATED = 1;
 
@@ -51,7 +52,7 @@ public class Related extends SSEModule {
     public static final String UNTIL_ATTRIBUTE = "until";
 
     @Override
-    public void copyFrom(final CopyFrom obj) {
+    public void copyFrom(final CopyFrom obj) {
         final Related related = (Related) obj;
         related.link = link;
         related.since = since == null ? null : (Date) since.clone();
@@ -100,9 +101,11 @@ public class Related extends SSEModule {
     /**
      * type A required, string attribute. This attribute can have one of the following values:
      * 

- * "complete" if the link points to file containing the complete collection of items for this feed. + * "complete" if the link points to file containing the complete collection of items for this + * feed. *

- * "aggregated" if the link points to a feed whose contents are being incorporated into this feed by the publisher. + * "aggregated" if the link points to a feed whose contents are being incorporated into this + * feed by the publisher. * * @return the type of the releated feed. */ @@ -120,8 +123,8 @@ public class Related extends SSEModule { } /** - * An optional, date-time attribute. This is the starting point of the related feed. If this attribute is omitted or blank, it is assumed that this is a - * complete feed. + * An optional, date-time attribute. This is the starting point of the related feed. If this + * attribute is omitted or blank, it is assumed that this is a complete feed. * * @return the starting point of the related feed. */ diff --git a/src/main/java/org/rometools/feed/module/sse/modules/SSEModule.java b/src/main/java/org/rometools/feed/module/sse/modules/SSEModule.java index b1d5c53..2d62a37 100644 --- a/src/main/java/org/rometools/feed/module/sse/modules/SSEModule.java +++ b/src/main/java/org/rometools/feed/module/sse/modules/SSEModule.java @@ -56,5 +56,5 @@ public abstract class SSEModule implements Module { } @Override - public abstract void copyFrom(CopyFrom obj); + public abstract void copyFrom(CopyFrom obj); } diff --git a/src/main/java/org/rometools/feed/module/sse/modules/Sharing.java b/src/main/java/org/rometools/feed/module/sse/modules/Sharing.java index 8e26d4c..e1ced3f 100644 --- a/src/main/java/org/rometools/feed/module/sse/modules/Sharing.java +++ b/src/main/java/org/rometools/feed/module/sse/modules/Sharing.java @@ -3,7 +3,6 @@ package org.rometools.feed.module.sse.modules; import java.util.Date; import com.sun.syndication.feed.CopyFrom; -import com.sun.syndication.feed.module.Module; /** *

@@ -52,7 +51,7 @@ public class Sharing extends SSEModule {
     private Related related;
 
     @Override
-    public void copyFrom(final CopyFrom obj) {
+    public void copyFrom(final CopyFrom obj) {
         final Sharing sharing = (Sharing) obj;
         ordered = sharing.ordered;
         since = sharing.since == null ? null : (Date) sharing.since.clone();
@@ -62,8 +61,9 @@ public class Sharing extends SSEModule {
     }
 
     /**
-     * ordered An optional, Boolean attribute. If present and its value is "true" (lower-case), subscribers MUST treat the item list as an ordered set (see
-     * section 3.2). If this attribute is omitted or blank, it is assumed that this is an unordered feed.
+     * ordered An optional, Boolean attribute. If present and its value is "true" (lower-case),
+     * subscribers MUST treat the item list as an ordered set (see section 3.2). If this attribute
+     * is omitted or blank, it is assumed that this is an unordered feed.
      *
      * @return a Boolean indicating if subscribers must treat the item list as an ordered set.
      */
@@ -81,10 +81,12 @@ public class Sharing extends SSEModule {
     }
 
     /**
-     * Provides an Integer that expresses the size of the window of change history kept by the publisher. Subscribers MAY use this value to determine the
-     * frequency with which they must read a feed.
+     * Provides an Integer that expresses the size of the window of change history kept by the
+     * publisher. Subscribers MAY use this value to determine the frequency with which they must
+     * read a feed.
      *
-     * @return an Integer that expresses the size of the window of change history kept by the publisher.
+     * @return an Integer that expresses the size of the window of change history kept by the
+     *         publisher.
      */
     public Integer getWindow() {
         return window;
@@ -93,15 +95,17 @@ public class Sharing extends SSEModule {
     /**
      * Set an Integer that expresses the size of the window of change history kept by the publisher.
      *
-     * @param window an Integer that expresses the size of the window of change history kept by the publisher.
+     * @param window an Integer that expresses the size of the window of change history kept by the
+     *            publisher.
      */
     public void setWindow(final Integer window) {
         this.window = window;
     }
 
     /**
-     * since An optional date-time attribute. All items updated on or after this date-time are included in the feed. If not present or null, the
-     * "beginning of time" is assumed and the feed contains the node's complete item set as of the until date-time.
+     * since An optional date-time attribute. All items updated on or after this date-time are
+     * included in the feed. If not present or null, the "beginning of time" is assumed and the feed
+     * contains the node's complete item set as of the until date-time.
      *
      * @return An optional date-time attribute.
      */
@@ -110,7 +114,8 @@ public class Sharing extends SSEModule {
     }
 
     /**
-     * Sets the optional date-time attribute where all items updated on or after this date-time are included in the feed.
+     * Sets the optional date-time attribute where all items updated on or after this date-time are
+     * included in the feed.
      *
      * @param since An optional date-time attribute.
      */
@@ -119,9 +124,10 @@ public class Sharing extends SSEModule {
     }
 
     /**
-     * until An optional date-time attribute. Items updated after this date are not included in the feed. The publisher must guarantee that the value of until
-     * will increase if any items in the feed are updated. If this attribute is omitted or blank, the subscriber cannot make assumptions about when the feed was
-     * updated.
+     * until An optional date-time attribute. Items updated after this date are not included in the
+     * feed. The publisher must guarantee that the value of until will increase if any items in the
+     * feed are updated. If this attribute is omitted or blank, the subscriber cannot make
+     * assumptions about when the feed was updated.
      *
      * @return the date where items updated after this date are not included in the feed.
      */
diff --git a/src/main/java/org/rometools/feed/module/sse/modules/Sync.java b/src/main/java/org/rometools/feed/module/sse/modules/Sync.java
index b0ee980..4753d21 100644
--- a/src/main/java/org/rometools/feed/module/sse/modules/Sync.java
+++ b/src/main/java/org/rometools/feed/module/sse/modules/Sync.java
@@ -4,7 +4,6 @@ import java.util.ArrayList;
 import java.util.List;
 
 import com.sun.syndication.feed.CopyFrom;
-import com.sun.syndication.feed.module.Module;
 
 /**
  * 
@@ -48,7 +47,7 @@ public class Sync extends SSEModule {
     private List conflicts;
 
     @Override
-    public void copyFrom(final CopyFrom obj) {
+    public void copyFrom(final CopyFrom obj) {
         final Sync sync = (Sync) obj;
         deleted = sync.deleted;
         version = sync.version;
@@ -62,18 +61,21 @@ public class Sync extends SSEModule {
     }
 
     /**
-     * Provides access to the sync id, a required, string attribute. This is the identifier for the item.
+     * Provides access to the sync id, a required, string attribute. This is the identifier for the
+     * item.
      * 

- * The ID is assigned by the creator of the item, and MUST NOT be changed by subsequent publishers. Applications will collate and compare these identifiers, - * therefore they MUST conform to the syntax for Namespace Specific Strings (the NSS portion of a URN) in RFC 2141. + * The ID is assigned by the creator of the item, and MUST NOT be changed by subsequent + * publishers. Applications will collate and compare these identifiers, therefore they MUST + * conform to the syntax for Namespace Specific Strings (the NSS portion of a URN) in RFC 2141. */ public String getId() { return id; } /** - * Set the identifier for the item. The ID MUST be globally unique within the feed and it MUST be identical across feeds if an item is being shared or - * replicated as part of multiple distinct independent feeds. + * Set the identifier for the item. The ID MUST be globally unique within the feed and it MUST + * be identical across feeds if an item is being shared or replicated as part of multiple + * distinct independent feeds. * * @param id the identifier for the item. */ @@ -82,8 +84,8 @@ public class Sync extends SSEModule { } /** - * Provides access to a required, integer attribute. This is the modification sequence number of the item, starting at 1 and incrementing by 1 indefinitely - * for each subsequent modification. + * Provides access to a required, integer attribute. This is the modification sequence number of + * the item, starting at 1 and incrementing by 1 indefinitely for each subsequent modification. */ public Integer getVersion() { return version; @@ -99,8 +101,10 @@ public class Sync extends SSEModule { } /** - * Provide access to an optional, Boolean attribute. If present and its value is "true" (lower-case), it indicates that the item has been deleted and this - * is a tombstone. If not present, or if present with value of "false" or "", then the item is not deleted. All other values are invalid. + * Provide access to an optional, Boolean attribute. If present and its value is "true" + * (lower-case), it indicates that the item has been deleted and this is a tombstone. If not + * present, or if present with value of "false" or "", then the item is not deleted. All other + * values are invalid. */ public Boolean isDeleted() { return deleted; @@ -116,20 +120,25 @@ public class Sync extends SSEModule { } /** - * Provides access to an optional, Boolean conflict attribute. If present and its value is "true" (lower-case), it indicates there was an update conflict - * detected when processing an update of this item, and it should potentially be examined by the user. If not present, or present with value of "false" or - * "", Then no conflict has been detected. All other values are invalid. + * Provides access to an optional, Boolean conflict attribute. If present and its value is + * "true" (lower-case), it indicates there was an update conflict detected when processing an + * update of this item, and it should potentially be examined by the user. If not present, or + * present with value of "false" or "", Then no conflict has been detected. All other values are + * invalid. * - * @return indicates there was an update conflict detected when processing an update of this item. + * @return indicates there was an update conflict detected when processing an update of this + * item. */ public Boolean isConflict() { return conflict; } /** - * Set an indication of whether there was an update conflict detected when processing an update of this item. + * Set an indication of whether there was an update conflict detected when processing an update + * of this item. * - * @param conflict an indication of whether there was an update conflict detected when processing an update of this item. + * @param conflict an indication of whether there was an update conflict detected when + * processing an update of this item. */ public void setConflict(final Boolean conflict) { this.conflict = conflict; diff --git a/src/main/java/org/rometools/feed/module/sse/modules/Update.java b/src/main/java/org/rometools/feed/module/sse/modules/Update.java index c6b9d8d..1c1dba1 100644 --- a/src/main/java/org/rometools/feed/module/sse/modules/Update.java +++ b/src/main/java/org/rometools/feed/module/sse/modules/Update.java @@ -3,7 +3,6 @@ package org.rometools.feed.module.sse.modules; import java.util.Date; import com.sun.syndication.feed.CopyFrom; -import com.sun.syndication.feed.module.Module; /** *

@@ -28,7 +27,7 @@ public class Update extends SSEModule {
     private String by;
 
     @Override
-    public void copyFrom(final CopyFrom other) {
+    public void copyFrom(final CopyFrom other) {
         final Update otherUpdate = (Update) other;
         otherUpdate.when = when == null ? null : (Date) when.clone();
         // dont copy immutable
@@ -36,8 +35,9 @@ public class Update extends SSEModule {
     }
 
     /**
-     * Provides access to the date-time when the modification took place. If this attribute is omitted the value defaults to the earliest time representable in
-     * RFC 822. Either or both of the when or by attributes MUST be present; it is invalid to have neither.
+     * Provides access to the date-time when the modification took place. If this attribute is
+     * omitted the value defaults to the earliest time representable in RFC 822. Either or both of
+     * the when or by attributes MUST be present; it is invalid to have neither.
      */
     public Date getWhen() {
         return when;
@@ -53,9 +53,11 @@ public class Update extends SSEModule {
     }
 
     /**
-     * Provides access to a text attribute identifying the unique endpoint that made a modification. This SHOULD be some combination of user and device (so that
-     * a given user can edit a feed on multiple devices). This attribute is used programmatically to break ties in case two changes happened at the same time
-     * (within the same second). Either or both of the when or by must be present; it is invalid to have neither.
+     * Provides access to a text attribute identifying the unique endpoint that made a modification.
+     * This SHOULD be some combination of user and device (so that a given user can edit a feed on
+     * multiple devices). This attribute is used programmatically to break ties in case two changes
+     * happened at the same time (within the same second). Either or both of the when or by must be
+     * present; it is invalid to have neither.
      *
      * @return access to a text attribute identifying the unique endpoint that made a modification.
      */
diff --git a/src/main/java/org/rometools/feed/module/yahooweather/YWeatherModuleImpl.java b/src/main/java/org/rometools/feed/module/yahooweather/YWeatherModuleImpl.java
index d6e7eb4..00156ad 100644
--- a/src/main/java/org/rometools/feed/module/yahooweather/YWeatherModuleImpl.java
+++ b/src/main/java/org/rometools/feed/module/yahooweather/YWeatherModuleImpl.java
@@ -73,7 +73,7 @@ public class YWeatherModuleImpl extends ModuleImpl implements YWeatherEntryModul
     }
 
     @Override
-    public void copyFrom(final CopyFrom o) {
+    public void copyFrom(final CopyFrom o) {
         final YWeatherModuleImpl from = (YWeatherModuleImpl) o;
         setAstronomy(from.getAstronomy() != null ? (Astronomy) from.getAstronomy().clone() : null);
         setCondition(from.getCondition() != null ? (Condition) from.getCondition().clone() : null);