diff --git a/src/main/java/org/rometools/certiorem/HttpStatusCodeException.java b/src/main/java/org/rometools/certiorem/HttpStatusCodeException.java index d1ff1b0..da7cf16 100644 --- a/src/main/java/org/rometools/certiorem/HttpStatusCodeException.java +++ b/src/main/java/org/rometools/certiorem/HttpStatusCodeException.java @@ -19,11 +19,13 @@ package org.rometools.certiorem; /** - * + * * @author robert.cooper */ public class HttpStatusCodeException extends RuntimeException { + private static final long serialVersionUID = 1L; + private final int status; public HttpStatusCodeException(final int status, final String message, final Throwable cause) { diff --git a/src/main/java/org/rometools/certiorem/hub/DeltaFeedInfoCache.java b/src/main/java/org/rometools/certiorem/hub/DeltaFeedInfoCache.java index edf0c02..7b9a727 100644 --- a/src/main/java/org/rometools/certiorem/hub/DeltaFeedInfoCache.java +++ b/src/main/java/org/rometools/certiorem/hub/DeltaFeedInfoCache.java @@ -10,9 +10,10 @@ import org.rometools.fetcher.impl.FeedFetcherCache; import org.rometools.fetcher.impl.SyndFeedInfo; /** - * Wrapper FeedFetcherCache that wraps a backing FeedFetcherCache and makes sure that any SyndFeedInfo used within it are replaced with a DeltaSyndFeedInfo + * Wrapper FeedFetcherCache that wraps a backing FeedFetcherCache and makes sure + * that any SyndFeedInfo used within it are replaced with a DeltaSyndFeedInfo * which is capable of tracking changes to entries in the underlying feed. - * + * * @author najmi */ public class DeltaFeedInfoCache implements FeedFetcherCache { diff --git a/src/main/java/org/rometools/certiorem/hub/DeltaSyndFeedInfo.java b/src/main/java/org/rometools/certiorem/hub/DeltaSyndFeedInfo.java index ed9284e..9a1836d 100644 --- a/src/main/java/org/rometools/certiorem/hub/DeltaSyndFeedInfo.java +++ b/src/main/java/org/rometools/certiorem/hub/DeltaSyndFeedInfo.java @@ -18,18 +18,21 @@ import com.sun.syndication.feed.synd.SyndEntry; import com.sun.syndication.feed.synd.SyndFeed; /** - * Extends SyndFeedInfo to also track etags for individual entries. This may be used with DeltaFeedInfoCache to only return feed with a subset of entries that - * have changed since last fetch. - * + * Extends SyndFeedInfo to also track etags for individual entries. This may be + * used with DeltaFeedInfoCache to only return feed with a subset of entries + * that have changed since last fetch. + * * @author najmi */ public class DeltaSyndFeedInfo extends SyndFeedInfo { + + /** + * + */ + private static final long serialVersionUID = 1L; Map entryTagsMap = new HashMap(); Map changedMap = new HashMap(); - private DeltaSyndFeedInfo() { - } - public DeltaSyndFeedInfo(final SyndFeedInfo backingFeedInfo) { setETag(backingFeedInfo.getETag()); setId(backingFeedInfo.getId()); @@ -38,8 +41,9 @@ public class DeltaSyndFeedInfo extends SyndFeedInfo { } /** - * Gets a filtered version of the SyndFeed that only has entries that were changed in the last setSyndFeed() call. - * + * Gets a filtered version of the SyndFeed that only has entries that were + * changed in the last setSyndFeed() call. + * * @return */ @Override @@ -65,8 +69,9 @@ public class DeltaSyndFeedInfo extends SyndFeedInfo { } /** - * Overrides super class method to update changedMap and entryTagsMap for tracking changed entries. - * + * Overrides super class method to update changedMap and entryTagsMap for + * tracking changed entries. + * * @param feed */ @Override @@ -89,9 +94,12 @@ public class DeltaSyndFeedInfo extends SyndFeedInfo { private String computeEntryTag(final SyndEntry entry) { - // Following hash algorithm suggested by Robert Cooper needs to be evaluated in future. - // int hash = ( entry.getUri() != null ? entry.getUri().hashCode() : entry.getLink().hashCode() ) ^ - // (entry.getUpdatedDate() != null ? entry.getUpdatedDate().hashCode() : entry.getPublishedDate().hashCode()) ^ + // Following hash algorithm suggested by Robert Cooper needs to be + // evaluated in future. + // int hash = ( entry.getUri() != null ? entry.getUri().hashCode() : + // entry.getLink().hashCode() ) ^ + // (entry.getUpdatedDate() != null ? entry.getUpdatedDate().hashCode() : + // entry.getPublishedDate().hashCode()) ^ // entry.getTitle().hashCode() ^ // entry.getDescription().hashCode(); @@ -102,7 +110,9 @@ public class DeltaSyndFeedInfo extends SyndFeedInfo { if (publishedDate != null) { updateDate = publishedDate; } else { - // For misbehaving feeds that do not set updateDate or publishedDate we use current tiem which pretty mucg assures that it will be viewed as + // For misbehaving feeds that do not set updateDate or + // publishedDate we use current tiem which pretty mucg assures + // that it will be viewed as // changed even when it is not updateDate = new Date(); } diff --git a/src/main/java/org/rometools/certiorem/hub/Hub.java b/src/main/java/org/rometools/certiorem/hub/Hub.java index da5b446..ac4665f 100644 --- a/src/main/java/org/rometools/certiorem/hub/Hub.java +++ b/src/main/java/org/rometools/certiorem/hub/Hub.java @@ -39,9 +39,10 @@ import org.rometools.fetcher.FeedFetcher; import com.sun.syndication.feed.synd.SyndFeed; /** - * The basic business logic controller for the Hub implementation. It is intended to be usable under a very thin servlet wrapper, or other, non-HTTP + * The basic business logic controller for the Hub implementation. It is + * intended to be usable under a very thin servlet wrapper, or other, non-HTTP * notification methods you might want to use. - * + * * @author robert.cooper */ public class Hub { @@ -62,7 +63,7 @@ public class Hub { /** * Constructs a new Hub instance - * + * * @param dao The persistence HubDAO to use * @param verifier The verification strategy to use. */ @@ -72,18 +73,21 @@ public class Hub { this.notifier = notifier; this.fetcher = fetcher; validSchemes = STANDARD_SCHEMES; - validPorts = Collections.EMPTY_SET; - validTopics = Collections.EMPTY_SET; + validPorts = Collections.emptySet(); + validTopics = Collections.emptySet(); } /** * Constructs a new Hub instance. - * + * * @param dao The persistence HubDAO to use * @param verifier The verification strategy to use - * @param validSchemes A list of valid URI schemes for callbacks (default: http, https) - * @param validPorts A list of valid port numbers for callbacks (default: any) - * @param validTopics A set of valid topic URIs which can be subscribed to (default: any) + * @param validSchemes A list of valid URI schemes for callbacks (default: + * http, https) + * @param validPorts A list of valid port numbers for callbacks (default: + * any) + * @param validTopics A set of valid topic URIs which can be subscribed to + * (default: any) */ public Hub(final HubDAO dao, final Verifier verifier, final Notifier notifier, final FeedFetcher fetcher, final Set validSchemes, final Set validPorts, final Set validTopics) { @@ -96,18 +100,29 @@ public class Hub { this.validSchemes = readOnlySchemes == null ? STANDARD_SCHEMES : readOnlySchemes; final Set readOnlyPorts = Collections.unmodifiableSet(validPorts); - this.validPorts = readOnlyPorts == null ? Collections.EMPTY_SET : readOnlyPorts; + if (readOnlyPorts == null) { + this.validPorts = Collections.emptySet(); + } else { + this.validPorts = readOnlyPorts; + } final Set readOnlyTopics = Collections.unmodifiableSet(validTopics); - this.validTopics = readOnlyTopics == null ? Collections.EMPTY_SET : readOnlyTopics; + if (validTopics == null) { + this.validTopics = Collections.emptySet(); + } else { + this.validTopics = readOnlyTopics; + } + } /** * Sends a notification to the subscribers - * - * @param requestHost the host name the hub is running on. (Used for the user agent) + * + * @param requestHost the host name the hub is running on. (Used for the + * user agent) * @param topic the URL of the topic that was updated. - * @throws HttpStatusCodeException a wrapper exception with a recommended status code for the request. + * @throws HttpStatusCodeException a wrapper exception with a recommended + * status code for the request. */ public void sendNotification(final String requestHost, final String topic) { assert validTopics.isEmpty() || validTopics.contains(topic) : "That topic is not supported by this hub. " + topic; @@ -120,7 +135,7 @@ public class Hub { return; } - final List summaries = (List) dao.summariesForTopic(topic); + final List summaries = dao.summariesForTopic(topic); int total = 0; final StringBuilder hosts = new StringBuilder(); @@ -135,7 +150,7 @@ public class Hub { .append(" subscribers)").append(hosts); final SyndFeed feed = fetcher.retrieveFeed(userAgent.toString(), new URL(topic)); Logger.getLogger(Hub.class.getName()).log(Level.FINE, "Got feed for {0} Sending to {1} subscribers.", new Object[] { topic, subscribers.size() }); - notifier.notifySubscribers((List) subscribers, feed, new SubscriptionSummaryCallback() { + notifier.notifySubscribers(subscribers, feed, new SubscriptionSummaryCallback() { @Override public void onSummaryInfo(final SubscriptionSummary summary) { dao.handleSummary(topic, summary); @@ -149,16 +164,18 @@ public class Hub { /** * Subscribes to a topic. - * + * * @param callback Callback URI * @param topic Topic URI * @param verify Verification Type * @param lease_seconds Duration of the lease * @param secret Secret value * @param verify_token verify_token; - * @return Boolean.TRUE if the subscription succeeded synchronously, Boolean.FALSE if the subscription failed synchronously, or null if the request is - * asynchronous. - * @throws HttpStatusCodeException a wrapper exception with a recommended status code for the request. + * @return Boolean.TRUE if the subscription succeeded synchronously, + * Boolean.FALSE if the subscription failed synchronously, or null + * if the request is asynchronous. + * @throws HttpStatusCodeException a wrapper exception with a recommended + * status code for the request. */ public Boolean subscribe(final String callback, final String topic, final String verify, final long lease_seconds, final String secret, final String verify_token) { diff --git a/src/main/java/org/rometools/certiorem/hub/Notifier.java b/src/main/java/org/rometools/certiorem/hub/Notifier.java index dfc01fb..576b778 100644 --- a/src/main/java/org/rometools/certiorem/hub/Notifier.java +++ b/src/main/java/org/rometools/certiorem/hub/Notifier.java @@ -26,25 +26,27 @@ import org.rometools.certiorem.hub.data.SubscriptionSummary; import com.sun.syndication.feed.synd.SyndFeed; /** - * + * * @author robert.cooper */ public interface Notifier { /** - * Instructs the notifier to begin sending notifications to the list of subscribers - * + * Instructs the notifier to begin sending notifications to the list of + * subscribers + * * @param subscribers Subscribers to notify * @param value The SyndFeed to send them - * @param callback A callback that is invoked each time a subscriber is notified. + * @param callback A callback that is invoked each time a subscriber is + * notified. */ - public void notifySubscribers(List subscribers, SyndFeed value, SubscriptionSummaryCallback callback); + public void notifySubscribers(List subscribers, SyndFeed value, SubscriptionSummaryCallback callback); /** * A callback that is invoked each time a subscriber is notified. */ public static interface SubscriptionSummaryCallback { /** - * + * * @param summary A summary of the data received from the subscriber */ public void onSummaryInfo(SubscriptionSummary summary); diff --git a/src/main/java/org/rometools/certiorem/hub/Verifier.java b/src/main/java/org/rometools/certiorem/hub/Verifier.java index fe79e78..4a6c58f 100644 --- a/src/main/java/org/rometools/certiorem/hub/Verifier.java +++ b/src/main/java/org/rometools/certiorem/hub/Verifier.java @@ -22,7 +22,7 @@ import org.rometools.certiorem.hub.data.Subscriber; /** * A strategy interface for verification of subscriptions. - * + * * @author robert.cooper */ public interface Verifier { @@ -38,7 +38,7 @@ public interface Verifier { /** * Verifies a subscriber (possibly) asyncronously - * + * * @param subscriber the Subscriber to verify * @param callback a callback with the result of the verification. */ @@ -46,7 +46,7 @@ public interface Verifier { /** * Verifies a subscriber syncronously - * + * * @param subscriber The subscriber data * @return boolean result; */ @@ -54,7 +54,7 @@ public interface Verifier { /** * Verifies am unsubscribe (possibly) asyncronously - * + * * @param subscriber The subscriber data * @param callback result */ @@ -62,18 +62,19 @@ public interface Verifier { /** * Verifies an unsubscribe syncronously - * + * * @param subscriber The subscriber data * @return boolean result; */ public boolean verifyUnsubcribeSyncronously(Subscriber subscriber); /** - * An interface for capturing the result of a verification (subscribe or unsubscribe) + * An interface for capturing the result of a verification (subscribe or + * unsubscribe) */ public static interface VerificationCallback { /** - * + * * @param verified success state of the verification */ public void onVerify(boolean verified); diff --git a/src/main/java/org/rometools/certiorem/hub/data/HubDAO.java b/src/main/java/org/rometools/certiorem/hub/data/HubDAO.java index bd23698..249693b 100644 --- a/src/main/java/org/rometools/certiorem/hub/data/HubDAO.java +++ b/src/main/java/org/rometools/certiorem/hub/data/HubDAO.java @@ -21,7 +21,7 @@ package org.rometools.certiorem.hub.data; import java.util.List; /** - * + * * @author robert.cooper */ public interface HubDAO { diff --git a/src/main/java/org/rometools/certiorem/hub/data/Subscriber.java b/src/main/java/org/rometools/certiorem/hub/data/Subscriber.java index ed56456..c8bbe8f 100644 --- a/src/main/java/org/rometools/certiorem/hub/data/Subscriber.java +++ b/src/main/java/org/rometools/certiorem/hub/data/Subscriber.java @@ -21,10 +21,14 @@ package org.rometools.certiorem.hub.data; import java.io.Serializable; /** - * + * * @author robert.cooper */ public class Subscriber implements Serializable { + /** + * + */ + private static final long serialVersionUID = 1L; public static final String VERIFY_SYNC = "sync"; public static final String VERIFY_ASYNC = "async"; private String callback; @@ -37,7 +41,7 @@ public class Subscriber implements Serializable { /** * Set the value of callback - * + * * @param newcallback new value of callback */ public void setCallback(final String newcallback) { @@ -46,7 +50,7 @@ public class Subscriber implements Serializable { /** * Get the value of callback - * + * * @return the value of callback */ public String getCallback() { @@ -55,7 +59,7 @@ public class Subscriber implements Serializable { /** * Set the value of creationTime - * + * * @param newcreationTime new value of creationTime */ public void setCreationTime(final long newcreationTime) { @@ -64,7 +68,7 @@ public class Subscriber implements Serializable { /** * Get the value of creationTime - * + * * @return the value of creationTime */ public long getCreationTime() { @@ -73,7 +77,7 @@ public class Subscriber implements Serializable { /** * Set the value of leaseSeconds - * + * * @param newleaseSeconds new value of leaseSeconds */ public void setLeaseSeconds(final long newleaseSeconds) { @@ -82,7 +86,7 @@ public class Subscriber implements Serializable { /** * Get the value of leaseSeconds - * + * * @return the value of leaseSeconds */ public long getLeaseSeconds() { @@ -91,7 +95,7 @@ public class Subscriber implements Serializable { /** * Set the value of secret - * + * * @param newsecret new value of secret */ public void setSecret(final String newsecret) { @@ -100,7 +104,7 @@ public class Subscriber implements Serializable { /** * Get the value of secret - * + * * @return the value of secret */ public String getSecret() { @@ -109,7 +113,7 @@ public class Subscriber implements Serializable { /** * Set the value of topic - * + * * @param newtopic new value of topic */ public void setTopic(final String newtopic) { @@ -118,7 +122,7 @@ public class Subscriber implements Serializable { /** * Get the value of topic - * + * * @return the value of topic */ public String getTopic() { @@ -127,7 +131,7 @@ public class Subscriber implements Serializable { /** * Set the value of verify - * + * * @param newverify new value of verify */ public void setVerify(final String newverify) { @@ -136,7 +140,7 @@ public class Subscriber implements Serializable { /** * Get the value of verify - * + * * @return the value of verify */ public String getVerify() { @@ -145,7 +149,7 @@ public class Subscriber implements Serializable { /** * Set the value of vertifyToken - * + * * @param newvertifyToken new value of vertifyToken */ public void setVertifyToken(final String newvertifyToken) { @@ -154,7 +158,7 @@ public class Subscriber implements Serializable { /** * Get the value of vertifyToken - * + * * @return the value of vertifyToken */ public String getVertifyToken() { diff --git a/src/main/java/org/rometools/certiorem/hub/data/SubscriptionSummary.java b/src/main/java/org/rometools/certiorem/hub/data/SubscriptionSummary.java index 90dd65d..8e7d3d0 100644 --- a/src/main/java/org/rometools/certiorem/hub/data/SubscriptionSummary.java +++ b/src/main/java/org/rometools/certiorem/hub/data/SubscriptionSummary.java @@ -21,17 +21,21 @@ package org.rometools.certiorem.hub.data; import java.io.Serializable; /** - * + * * @author robert.cooper */ public class SubscriptionSummary implements Serializable { + /** + * + */ + private static final long serialVersionUID = 1L; private String host; private boolean lastPublishSuccessful = true; private int subscribers = 0; /** * Set the value of host - * + * * @param newhost new value of host */ public void setHost(final String newhost) { @@ -40,7 +44,7 @@ public class SubscriptionSummary implements Serializable { /** * Get the value of host - * + * * @return the value of host */ public String getHost() { @@ -49,7 +53,7 @@ public class SubscriptionSummary implements Serializable { /** * Set the value of lastPublishSuccessful - * + * * @param newlastPublishSuccessful new value of lastPublishSuccessful */ public void setLastPublishSuccessful(final boolean newlastPublishSuccessful) { @@ -58,7 +62,7 @@ public class SubscriptionSummary implements Serializable { /** * Get the value of lastPublishSuccessful - * + * * @return the value of lastPublishSuccessful */ public boolean isLastPublishSuccessful() { @@ -67,7 +71,7 @@ public class SubscriptionSummary implements Serializable { /** * Set the value of subscribers - * + * * @param newsubscribers new value of subscribers */ public void setSubscribers(final int newsubscribers) { @@ -76,7 +80,7 @@ public class SubscriptionSummary implements Serializable { /** * Get the value of subscribers - * + * * @return the value of subscribers */ public int getSubscribers() { diff --git a/src/main/java/org/rometools/certiorem/hub/data/jpa/JPADAO.java b/src/main/java/org/rometools/certiorem/hub/data/jpa/JPADAO.java index b8d6c50..01d1f4b 100644 --- a/src/main/java/org/rometools/certiorem/hub/data/jpa/JPADAO.java +++ b/src/main/java/org/rometools/certiorem/hub/data/jpa/JPADAO.java @@ -33,7 +33,7 @@ import org.rometools.certiorem.hub.data.Subscriber; import org.rometools.certiorem.hub.data.SubscriptionSummary; /** - * + * * @author robert.cooper */ public class JPADAO implements HubDAO { @@ -57,7 +57,9 @@ public class JPADAO implements HubDAO { query.setParameter("topic", topic); try { - for (final JPASubscriber subscriber : (List) query.getResultList()) { + @SuppressWarnings("unchecked") + final List subscribers = query.getResultList(); + for (final JPASubscriber subscriber : subscribers) { if (subscriber.getLeaseSeconds() == -1) { result.add(subscriber); continue; diff --git a/src/main/java/org/rometools/certiorem/hub/data/jpa/JPASubscriber.java b/src/main/java/org/rometools/certiorem/hub/data/jpa/JPASubscriber.java index 6b8621a..fe80d94 100644 --- a/src/main/java/org/rometools/certiorem/hub/data/jpa/JPASubscriber.java +++ b/src/main/java/org/rometools/certiorem/hub/data/jpa/JPASubscriber.java @@ -31,19 +31,23 @@ import javax.persistence.TemporalType; import org.rometools.certiorem.hub.data.Subscriber; /** - * + * * @author robert.cooper */ @Entity @NamedQueries({ @NamedQuery(name = "Subcriber.forTopic", query = "SELECT o FROM JPASubscriber o WHERE o.topic = :topic AND o.expired = false ORDER BY o.subscribedAt") }) public class JPASubscriber extends Subscriber implements Serializable { + /** + * + */ + private static final long serialVersionUID = 1L; private Date subscribedAt = new Date(); private String id; private boolean expired = false; /** * Set the value of expired - * + * * @param newexpired new value of expired */ public void setExpired(final boolean newexpired) { @@ -52,7 +56,7 @@ public class JPASubscriber extends Subscriber implements Serializable { /** * Get the value of expired - * + * * @return the value of expired */ public boolean isExpired() { @@ -61,7 +65,7 @@ public class JPASubscriber extends Subscriber implements Serializable { /** * Set the value of id - * + * * @param newid new value of id */ public void setId(final String newid) { @@ -70,7 +74,7 @@ public class JPASubscriber extends Subscriber implements Serializable { /** * Get the value of id - * + * * @return the value of id */ @Id @@ -80,7 +84,7 @@ public class JPASubscriber extends Subscriber implements Serializable { /** * Set the value of subscribedAt - * + * * @param newsubscribedAt new value of subscribedAt */ public void setSubscribedAt(final Date newsubscribedAt) { @@ -89,7 +93,7 @@ public class JPASubscriber extends Subscriber implements Serializable { /** * Get the value of subscribedAt - * + * * @return the value of subscribedAt */ @Temporal(TemporalType.TIMESTAMP) diff --git a/src/main/java/org/rometools/certiorem/hub/data/ram/InMemoryHubDAO.java b/src/main/java/org/rometools/certiorem/hub/data/ram/InMemoryHubDAO.java index 44497db..72a8075 100644 --- a/src/main/java/org/rometools/certiorem/hub/data/ram/InMemoryHubDAO.java +++ b/src/main/java/org/rometools/certiorem/hub/data/ram/InMemoryHubDAO.java @@ -30,7 +30,7 @@ import org.rometools.certiorem.hub.data.SubscriptionSummary; /** * A Simple In-Memory HubDAO for subscribers. - * + * * @author robert.cooper */ public class InMemoryHubDAO implements HubDAO { @@ -89,7 +89,7 @@ public class InMemoryHubDAO implements HubDAO { return result; } else { - return Collections.EMPTY_LIST; + return Collections.emptyList(); } } diff --git a/src/main/java/org/rometools/certiorem/hub/notify/standard/AbstractNotifier.java b/src/main/java/org/rometools/certiorem/hub/notify/standard/AbstractNotifier.java index 7cf9cc0..10d1f8a 100644 --- a/src/main/java/org/rometools/certiorem/hub/notify/standard/AbstractNotifier.java +++ b/src/main/java/org/rometools/certiorem/hub/notify/standard/AbstractNotifier.java @@ -38,22 +38,24 @@ import com.sun.syndication.io.FeedException; import com.sun.syndication.io.SyndFeedOutput; /** - * + * * @author robert.cooper */ public abstract class AbstractNotifier implements Notifier { /** - * This method will serialize the synd feed and build Notifications for the implementation class to handle. - * + * This method will serialize the synd feed and build Notifications for the + * implementation class to handle. + * * @see enqueueNotification - * + * * @param subscribers List of subscribers to notify * @param value The SyndFeed object to send - * @param callback A callback that will be invoked each time a subscriber is notified. - * + * @param callback A callback that will be invoked each time a subscriber is + * notified. + * */ @Override - public void notifySubscribers(final List subscribers, final SyndFeed value, final SubscriptionSummaryCallback callback) { + public void notifySubscribers(final List subscribers, final SyndFeed value, final SubscriptionSummaryCallback callback) { String mimeType = null; if (value.getFeedType().startsWith("rss")) { @@ -92,15 +94,16 @@ public abstract class AbstractNotifier implements Notifier { /** * Implementation method that queues/sends a notification - * + * * @param not notification to send. */ protected abstract void enqueueNotification(Notification not); /** - * POSTs the payload to the subscriber's callback and returns a SubscriptionSummary with subscriber counts (where possible) and the success state of the - * notification. - * + * POSTs the payload to the subscriber's callback and returns a + * SubscriptionSummary with subscriber counts (where possible) and the + * success state of the notification. + * * @param subscriber subscriber data. * @param mimeType MIME type for the request * @param payload payload of the feed to send diff --git a/src/main/java/org/rometools/certiorem/hub/notify/standard/Notification.java b/src/main/java/org/rometools/certiorem/hub/notify/standard/Notification.java index 053e091..f0c62e6 100644 --- a/src/main/java/org/rometools/certiorem/hub/notify/standard/Notification.java +++ b/src/main/java/org/rometools/certiorem/hub/notify/standard/Notification.java @@ -22,7 +22,7 @@ import org.rometools.certiorem.hub.Notifier.SubscriptionSummaryCallback; import org.rometools.certiorem.hub.data.Subscriber; /** - * + * * @author robert.cooper */ public class Notification { diff --git a/src/main/java/org/rometools/certiorem/hub/notify/standard/ThreadPoolNotifier.java b/src/main/java/org/rometools/certiorem/hub/notify/standard/ThreadPoolNotifier.java index d305f5a..42db9e9 100644 --- a/src/main/java/org/rometools/certiorem/hub/notify/standard/ThreadPoolNotifier.java +++ b/src/main/java/org/rometools/certiorem/hub/notify/standard/ThreadPoolNotifier.java @@ -28,8 +28,9 @@ import java.util.concurrent.TimeUnit; import org.rometools.certiorem.hub.data.SubscriptionSummary; /** - * A notifier implementation that uses a thread pool to deliver notifications to subscribers - * + * A notifier implementation that uses a thread pool to deliver notifications to + * subscribers + * * @author robert.cooper */ public class ThreadPoolNotifier extends AbstractNotifier { @@ -51,9 +52,10 @@ public class ThreadPoolNotifier extends AbstractNotifier { } /** - * Enqueues a notification to run. If the notification fails, it will be retried every two minutes until 5 attempts are completed. Notifications to the same - * callback should be delivered successfully in order. - * + * Enqueues a notification to run. If the notification fails, it will be + * retried every two minutes until 5 attempts are completed. Notifications + * to the same callback should be delivered successfully in order. + * * @param not */ @Override @@ -82,7 +84,7 @@ public class ThreadPoolNotifier extends AbstractNotifier { /** * Schedules a notification to retry in two minutes. - * + * * @param not Notification to retry */ protected void retry(final Notification not) { diff --git a/src/main/java/org/rometools/certiorem/hub/notify/standard/UnthreadedNotifier.java b/src/main/java/org/rometools/certiorem/hub/notify/standard/UnthreadedNotifier.java index 303bf9d..f591b43 100644 --- a/src/main/java/org/rometools/certiorem/hub/notify/standard/UnthreadedNotifier.java +++ b/src/main/java/org/rometools/certiorem/hub/notify/standard/UnthreadedNotifier.java @@ -18,30 +18,27 @@ package org.rometools.certiorem.hub.notify.standard; -import java.util.concurrent.ConcurrentSkipListSet; - import org.rometools.certiorem.hub.data.SubscriptionSummary; /** * A notifier that does not use threads. All calls are blocking and synchronous. - * + * * @author robert.cooper */ public class UnthreadedNotifier extends AbstractNotifier { - private final ConcurrentSkipListSet retries = new ConcurrentSkipListSet(); /** - * A blocking call that performs a notification. If there are pending retries that are older than two minutes old, they will be retried before the method - * returns. - * + * A blocking call that performs a notification. If there are pending + * retries that are older than two minutes old, they will be retried before + * the method returns. + * * @param not */ @Override protected void enqueueNotification(final Notification not) { not.lastRun = System.currentTimeMillis(); - final SubscriptionSummary summary = postNotification(not.subscriber, not.mimeType, not.payload); - not.callback.onSummaryInfo(summary); } + } diff --git a/src/main/java/org/rometools/certiorem/hub/verify/standard/AbstractVerifier.java b/src/main/java/org/rometools/certiorem/hub/verify/standard/AbstractVerifier.java index 528505f..53d775c 100644 --- a/src/main/java/org/rometools/certiorem/hub/verify/standard/AbstractVerifier.java +++ b/src/main/java/org/rometools/certiorem/hub/verify/standard/AbstractVerifier.java @@ -34,8 +34,9 @@ import org.rometools.certiorem.hub.Verifier; import org.rometools.certiorem.hub.data.Subscriber; /** - * An abstract verifier based on the java.net HTTP classes. This implements only synchronous operations, and expects a child class to do Async ops. - * + * An abstract verifier based on the java.net HTTP classes. This implements only + * synchronous operations, and expects a child class to do Async ops. + * * @author robert.cooper */ public abstract class AbstractVerifier implements Verifier { @@ -68,7 +69,8 @@ public abstract class AbstractVerifier implements Verifier { final HttpURLConnection connection = (HttpURLConnection) url.openConnection(); connection.setDoInput(true); // connection.setRequestProperty("Host", url.getHost()); - // connection.setRequestProperty("Port", Integer.toString(url.getPort())); + // connection.setRequestProperty("Port", + // Integer.toString(url.getPort())); connection.setRequestProperty("User-Agent", "ROME-Certiorem"); connection.connect(); final int rc = connection.getResponseCode(); diff --git a/src/main/java/org/rometools/certiorem/hub/verify/standard/ThreadPoolVerifier.java b/src/main/java/org/rometools/certiorem/hub/verify/standard/ThreadPoolVerifier.java index 7bc7452..bb806ea 100644 --- a/src/main/java/org/rometools/certiorem/hub/verify/standard/ThreadPoolVerifier.java +++ b/src/main/java/org/rometools/certiorem/hub/verify/standard/ThreadPoolVerifier.java @@ -26,7 +26,7 @@ import org.rometools.certiorem.hub.data.Subscriber; /** * Uses a ThreadPoolExecutor to do async verifications. - * + * * @author robert.cooper */ public class ThreadPoolVerifier extends AbstractVerifier { diff --git a/src/main/java/org/rometools/certiorem/hub/verify/standard/ThreadpoolVerifierAdvanced.java b/src/main/java/org/rometools/certiorem/hub/verify/standard/ThreadpoolVerifierAdvanced.java index 4a206fe..19d9b5f 100644 --- a/src/main/java/org/rometools/certiorem/hub/verify/standard/ThreadpoolVerifierAdvanced.java +++ b/src/main/java/org/rometools/certiorem/hub/verify/standard/ThreadpoolVerifierAdvanced.java @@ -21,7 +21,7 @@ package org.rometools.certiorem.hub.verify.standard; import java.util.concurrent.ThreadPoolExecutor; /** - * + * * @author robert.cooper */ public class ThreadpoolVerifierAdvanced extends ThreadPoolVerifier { diff --git a/src/main/java/org/rometools/certiorem/hub/verify/standard/UnthreadedVerifier.java b/src/main/java/org/rometools/certiorem/hub/verify/standard/UnthreadedVerifier.java index 69b1f19..060965c 100644 --- a/src/main/java/org/rometools/certiorem/hub/verify/standard/UnthreadedVerifier.java +++ b/src/main/java/org/rometools/certiorem/hub/verify/standard/UnthreadedVerifier.java @@ -22,7 +22,7 @@ import org.rometools.certiorem.hub.data.Subscriber; /** * A verifier that does not use threads. Suitable for Google App Engine. - * + * * @author robert.cooper */ public class UnthreadedVerifier extends AbstractVerifier { diff --git a/src/main/java/org/rometools/certiorem/pub/NotificationException.java b/src/main/java/org/rometools/certiorem/pub/NotificationException.java index 9138694..2e46354 100644 --- a/src/main/java/org/rometools/certiorem/pub/NotificationException.java +++ b/src/main/java/org/rometools/certiorem/pub/NotificationException.java @@ -19,11 +19,16 @@ package org.rometools.certiorem.pub; /** - * + * * @author robert.cooper */ public class NotificationException extends Exception { + /** + * + */ + private static final long serialVersionUID = 1L; + public NotificationException(final String message) { super(message); } diff --git a/src/main/java/org/rometools/certiorem/pub/Publisher.java b/src/main/java/org/rometools/certiorem/pub/Publisher.java index 5ac17b6..0f6d4f2 100644 --- a/src/main/java/org/rometools/certiorem/pub/Publisher.java +++ b/src/main/java/org/rometools/certiorem/pub/Publisher.java @@ -33,20 +33,22 @@ import com.sun.syndication.feed.synd.SyndLink; /** * A class for sending update notifications to a hub. - * + * * @author robert.cooper */ public class Publisher { private ThreadPoolExecutor executor; /** - * Constructs a new publisher. This publisher will spawn a new thread for each async send. + * Constructs a new publisher. This publisher will spawn a new thread for + * each async send. */ public Publisher() { } /** - * Constructs a new publisher with an optional ThreadPoolExector for sending updates. + * Constructs a new publisher with an optional ThreadPoolExector for sending + * updates. */ public Publisher(final ThreadPoolExecutor executor) { this.executor = executor; @@ -54,7 +56,7 @@ public class Publisher { /** * Sends the HUB url a notification of a change in topic - * + * * @param hub URL of the hub to notify. * @param topic The Topic that has changed * @throws NotificationException Any failure @@ -91,8 +93,9 @@ public class Publisher { } /** - * Sends a notification for a feed located at "topic". The feed MUST contain rel="hub". - * + * Sends a notification for a feed located at "topic". The feed MUST contain + * rel="hub". + * * @param topic URL for the feed * @param feed The feed itself * @throws NotificationException Any failure @@ -109,8 +112,9 @@ public class Publisher { } /** - * Sends a notification for a feed. The feed MUST contain rel="hub" and rel="self" links. - * + * Sends a notification for a feed. The feed MUST contain rel="hub" and + * rel="self" links. + * * @param feed The feed to notify * @throws NotificationException Any failure */ @@ -145,7 +149,7 @@ public class Publisher { /** * Sends the HUB url a notification of a change in topic asynchronously - * + * * @param hub URL of the hub to notify. * @param topic The Topic that has changed * @param callback A callback invoked when the notification completes. @@ -172,8 +176,9 @@ public class Publisher { } /** - * Asynchronously sends a notification for a feed located at "topic". The feed MUST contain rel="hub". - * + * Asynchronously sends a notification for a feed located at "topic". The + * feed MUST contain rel="hub". + * * @param topic URL for the feed * @param feed The feed itself * @param callback A callback invoked when the notification completes. @@ -200,8 +205,9 @@ public class Publisher { } /** - * Asyncronously sends a notification for a feed. The feed MUST contain rel="hub" and rel="self" links. - * + * Asyncronously sends a notification for a feed. The feed MUST contain + * rel="hub" and rel="self" links. + * * @param feed The feed to notify * @param callback A callback invoked when the notification completes. * @throws NotificationException Any failure @@ -232,7 +238,7 @@ public class Publisher { public static interface AsyncNotificationCallback { /** * Called when a notification fails - * + * * @param thrown Whatever was thrown during the failure */ public void onFailure(Throwable thrown); diff --git a/src/main/java/org/rometools/certiorem/sub/Requester.java b/src/main/java/org/rometools/certiorem/sub/Requester.java index 3bfce54..ce027c0 100644 --- a/src/main/java/org/rometools/certiorem/sub/Requester.java +++ b/src/main/java/org/rometools/certiorem/sub/Requester.java @@ -21,7 +21,7 @@ package org.rometools.certiorem.sub; import org.rometools.certiorem.sub.data.Subscription; /** - * + * * @author robert.cooper */ public interface Requester { diff --git a/src/main/java/org/rometools/certiorem/sub/Subscriptions.java b/src/main/java/org/rometools/certiorem/sub/Subscriptions.java index 1f04342..87269b1 100644 --- a/src/main/java/org/rometools/certiorem/sub/Subscriptions.java +++ b/src/main/java/org/rometools/certiorem/sub/Subscriptions.java @@ -45,7 +45,7 @@ import com.sun.syndication.io.FeedException; import com.sun.syndication.io.SyndFeedInput; /** - * + * * @author robert.cooper */ public class Subscriptions { diff --git a/src/main/java/org/rometools/certiorem/sub/data/SubDAO.java b/src/main/java/org/rometools/certiorem/sub/data/SubDAO.java index dac96f5..00692e1 100644 --- a/src/main/java/org/rometools/certiorem/sub/data/SubDAO.java +++ b/src/main/java/org/rometools/certiorem/sub/data/SubDAO.java @@ -19,7 +19,7 @@ package org.rometools.certiorem.sub.data; /** - * + * * @author robert.cooper */ public interface SubDAO { diff --git a/src/main/java/org/rometools/certiorem/sub/data/Subscription.java b/src/main/java/org/rometools/certiorem/sub/data/Subscription.java index c6f19c6..8978c7a 100644 --- a/src/main/java/org/rometools/certiorem/sub/data/Subscription.java +++ b/src/main/java/org/rometools/certiorem/sub/data/Subscription.java @@ -21,10 +21,14 @@ package org.rometools.certiorem.sub.data; import java.io.Serializable; /** - * + * * @author robert.cooper */ public class Subscription implements Serializable { + /** + * + */ + private static final long serialVersionUID = 1L; private String id; private String sourceUrl; private String verifyToken; @@ -35,7 +39,7 @@ public class Subscription implements Serializable { /** * Set the value of expirationTime - * + * * @param newexpirationTime new value of expirationTime */ public void setExpirationTime(final long newexpirationTime) { @@ -44,7 +48,7 @@ public class Subscription implements Serializable { /** * Get the value of expirationTime - * + * * @return the value of expirationTime */ public long getExpirationTime() { @@ -53,7 +57,7 @@ public class Subscription implements Serializable { /** * Set the value of id - * + * * @param newid new value of id */ public void setId(final String newid) { @@ -62,7 +66,7 @@ public class Subscription implements Serializable { /** * Get the value of id - * + * * @return the value of id */ public String getId() { @@ -71,7 +75,7 @@ public class Subscription implements Serializable { /** * Set the value of sourceUrl - * + * * @param newsourceUrl new value of sourceUrl */ public void setSourceUrl(final String newsourceUrl) { @@ -80,7 +84,7 @@ public class Subscription implements Serializable { /** * Get the value of sourceUrl - * + * * @return the value of sourceUrl */ public String getSourceUrl() { @@ -89,7 +93,7 @@ public class Subscription implements Serializable { /** * Set the value of unsubscribed - * + * * @param newunsubscribed new value of unsubscribed */ public void setUnsubscribed(final boolean newunsubscribed) { @@ -98,7 +102,7 @@ public class Subscription implements Serializable { /** * Get the value of unsubscribed - * + * * @return the value of unsubscribed */ public boolean isUnsubscribed() { @@ -107,7 +111,7 @@ public class Subscription implements Serializable { /** * Set the value of validated - * + * * @param newvalidated new value of validated */ public void setValidated(final boolean newvalidated) { @@ -116,7 +120,7 @@ public class Subscription implements Serializable { /** * Get the value of validated - * + * * @return the value of validated */ public boolean isValidated() { @@ -125,7 +129,7 @@ public class Subscription implements Serializable { /** * Set the value of verifyToken - * + * * @param newverifyToken new value of verifyToken */ public void setVerifyToken(final String newverifyToken) { @@ -134,7 +138,7 @@ public class Subscription implements Serializable { /** * Get the value of verifyToken - * + * * @return the value of verifyToken */ public String getVerifyToken() { diff --git a/src/main/java/org/rometools/certiorem/sub/data/SubscriptionCallback.java b/src/main/java/org/rometools/certiorem/sub/data/SubscriptionCallback.java index 01018df..6a82aff 100644 --- a/src/main/java/org/rometools/certiorem/sub/data/SubscriptionCallback.java +++ b/src/main/java/org/rometools/certiorem/sub/data/SubscriptionCallback.java @@ -8,7 +8,7 @@ package org.rometools.certiorem.sub.data; import org.rometools.fetcher.impl.SyndFeedInfo; /** - * + * * @author najmi */ public interface SubscriptionCallback { diff --git a/src/main/java/org/rometools/certiorem/sub/data/ram/InMemorySubDAO.java b/src/main/java/org/rometools/certiorem/sub/data/ram/InMemorySubDAO.java index 0e50fce..0d32815 100644 --- a/src/main/java/org/rometools/certiorem/sub/data/ram/InMemorySubDAO.java +++ b/src/main/java/org/rometools/certiorem/sub/data/ram/InMemorySubDAO.java @@ -32,7 +32,7 @@ import org.rometools.certiorem.sub.data.SubDAO; import org.rometools.certiorem.sub.data.Subscription; /** - * + * * @author robert.cooper */ public class InMemorySubDAO implements SubDAO { diff --git a/src/main/java/org/rometools/certiorem/sub/request/AbstractRequester.java b/src/main/java/org/rometools/certiorem/sub/request/AbstractRequester.java index 532260f..b6abf20 100644 --- a/src/main/java/org/rometools/certiorem/sub/request/AbstractRequester.java +++ b/src/main/java/org/rometools/certiorem/sub/request/AbstractRequester.java @@ -27,7 +27,7 @@ import org.rometools.certiorem.sub.Requester; import org.rometools.certiorem.sub.data.Subscription; /** - * + * * @author robert.cooper */ public abstract class AbstractRequester implements Requester { diff --git a/src/main/java/org/rometools/certiorem/sub/request/AsyncRequester.java b/src/main/java/org/rometools/certiorem/sub/request/AsyncRequester.java index 305a12b..64b5efc 100644 --- a/src/main/java/org/rometools/certiorem/sub/request/AsyncRequester.java +++ b/src/main/java/org/rometools/certiorem/sub/request/AsyncRequester.java @@ -26,7 +26,7 @@ import org.rometools.certiorem.sub.data.Subscription; /** * A simple requester implementation that always makes requests as Async. - * + * * @author robert.cooper */ public class AsyncRequester extends AbstractRequester { diff --git a/src/main/java/org/rometools/certiorem/sub/request/SyncRequester.java b/src/main/java/org/rometools/certiorem/sub/request/SyncRequester.java index 5cd6d17..553d2b1 100644 --- a/src/main/java/org/rometools/certiorem/sub/request/SyncRequester.java +++ b/src/main/java/org/rometools/certiorem/sub/request/SyncRequester.java @@ -30,7 +30,7 @@ import org.rometools.certiorem.sub.data.Subscription; /** * A simple requester implementation that always makes requests as Async. - * + * * @author Farrukh Najmi */ public class SyncRequester extends AbstractRequester { diff --git a/src/main/java/org/rometools/certiorem/web/AbstractHubServlet.java b/src/main/java/org/rometools/certiorem/web/AbstractHubServlet.java index 64d9f31..0a4ff7c 100644 --- a/src/main/java/org/rometools/certiorem/web/AbstractHubServlet.java +++ b/src/main/java/org/rometools/certiorem/web/AbstractHubServlet.java @@ -30,10 +30,14 @@ import org.rometools.certiorem.HttpStatusCodeException; import org.rometools.certiorem.hub.Hub; /** - * + * * @author robert.cooper */ public abstract class AbstractHubServlet extends HttpServlet { + /** + * + */ + private static final long serialVersionUID = 1L; public static final String HUBMODE = "hub.mode"; private final Hub hub; diff --git a/src/main/java/org/rometools/certiorem/web/AbstractSubServlet.java b/src/main/java/org/rometools/certiorem/web/AbstractSubServlet.java index 9a3d42e..3790667 100644 --- a/src/main/java/org/rometools/certiorem/web/AbstractSubServlet.java +++ b/src/main/java/org/rometools/certiorem/web/AbstractSubServlet.java @@ -30,11 +30,15 @@ import org.rometools.certiorem.HttpStatusCodeException; import org.rometools.certiorem.sub.Subscriptions; /** - * + * * @author robert.cooper */ public class AbstractSubServlet extends HttpServlet { + /** + * + */ + private static final long serialVersionUID = 1L; private final Subscriptions subscriptions; protected AbstractSubServlet(final Subscriptions subscriptions) { diff --git a/src/test/java/org/rometools/certiorem/hub/AlwaysVerifier.java b/src/test/java/org/rometools/certiorem/hub/AlwaysVerifier.java index 3e01b85..5d198e8 100644 --- a/src/test/java/org/rometools/certiorem/hub/AlwaysVerifier.java +++ b/src/test/java/org/rometools/certiorem/hub/AlwaysVerifier.java @@ -21,7 +21,7 @@ package org.rometools.certiorem.hub; import org.rometools.certiorem.hub.data.Subscriber; /** - * + * * @author robert.cooper */ public class AlwaysVerifier implements Verifier { diff --git a/src/test/java/org/rometools/certiorem/hub/ControllerTest.java b/src/test/java/org/rometools/certiorem/hub/ControllerTest.java index f337505..5729fe2 100644 --- a/src/test/java/org/rometools/certiorem/hub/ControllerTest.java +++ b/src/test/java/org/rometools/certiorem/hub/ControllerTest.java @@ -36,7 +36,7 @@ import org.rometools.fetcher.impl.HashMapFeedInfoCache; import org.rometools.fetcher.impl.HttpURLFeedFetcher; /** - * + * * @author robert.cooper */ public class ControllerTest { diff --git a/src/test/java/org/rometools/certiorem/hub/DeltaSyndFeedInfoTest.java b/src/test/java/org/rometools/certiorem/hub/DeltaSyndFeedInfoTest.java index f1526f1..da9c401 100644 --- a/src/test/java/org/rometools/certiorem/hub/DeltaSyndFeedInfoTest.java +++ b/src/test/java/org/rometools/certiorem/hub/DeltaSyndFeedInfoTest.java @@ -19,7 +19,7 @@ import com.sun.syndication.feed.synd.SyndEntry; import com.sun.syndication.feed.synd.SyndFeed; /** - * + * * @author najmi */ public class DeltaSyndFeedInfoTest { @@ -44,7 +44,8 @@ public class DeltaSyndFeedInfoTest { List entries = feed.getEntries(); assertTrue(!entries.isEmpty()); - // Fetch again and this time the entries should be empty as none have changed. + // Fetch again and this time the entries should be empty as none have + // changed. feed = feedFetcher.retrieveFeed(getFeedUrl()); entries = feed.getEntries(); assertTrue(entries.isEmpty()); @@ -52,7 +53,8 @@ public class DeltaSyndFeedInfoTest { private URL getFeedUrl() throws IOException { final URL feedUrl = new URL("http://news.google.com/news?pz=1&cf=all&ned=us&hl=en&output=rss"); - // URL feedUrl = new URL("http://newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml"); + // URL feedUrl = new + // URL("http://newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml"); return feedUrl; } diff --git a/src/test/java/org/rometools/certiorem/hub/ExceptionVerifier.java b/src/test/java/org/rometools/certiorem/hub/ExceptionVerifier.java index 87153b3..7e7ae45 100644 --- a/src/test/java/org/rometools/certiorem/hub/ExceptionVerifier.java +++ b/src/test/java/org/rometools/certiorem/hub/ExceptionVerifier.java @@ -21,7 +21,7 @@ package org.rometools.certiorem.hub; import org.rometools.certiorem.hub.data.Subscriber; /** - * + * * @author robert.cooper */ public class ExceptionVerifier implements Verifier { diff --git a/src/test/java/org/rometools/certiorem/hub/NeverVerifier.java b/src/test/java/org/rometools/certiorem/hub/NeverVerifier.java index b514293..e4733bf 100644 --- a/src/test/java/org/rometools/certiorem/hub/NeverVerifier.java +++ b/src/test/java/org/rometools/certiorem/hub/NeverVerifier.java @@ -21,7 +21,7 @@ package org.rometools.certiorem.hub; import org.rometools.certiorem.hub.data.Subscriber; /** - * + * * @author robert.cooper */ public class NeverVerifier implements Verifier { diff --git a/src/test/java/org/rometools/certiorem/hub/data/AbstractDAOTest.java b/src/test/java/org/rometools/certiorem/hub/data/AbstractDAOTest.java index af8f1c7..bd0fbd2 100644 --- a/src/test/java/org/rometools/certiorem/hub/data/AbstractDAOTest.java +++ b/src/test/java/org/rometools/certiorem/hub/data/AbstractDAOTest.java @@ -25,7 +25,7 @@ import java.util.logging.Logger; import org.junit.Test; /** - * + * * @author robert.cooper */ public abstract class AbstractDAOTest { @@ -46,7 +46,7 @@ public abstract class AbstractDAOTest { assert result.equals(subscriber) : "Subscriber not equal."; - final List subscribers = (List) instance.subscribersForTopic(subscriber.getTopic()); + final List subscribers = instance.subscribersForTopic(subscriber.getTopic()); assert subscribers.contains(result) : "Subscriber not in result."; } @@ -65,11 +65,11 @@ public abstract class AbstractDAOTest { assert subscriber.equals(result) : "Subscriber not equal."; // quick test for store. - List subscribers = (List) instance.subscribersForTopic(subscriber.getTopic()); + List subscribers = instance.subscribersForTopic(subscriber.getTopic()); assert subscribers.contains(result) : "Subscriber not in result."; // sleep past expiration Thread.sleep(1100); - subscribers = (List) instance.subscribersForTopic(subscriber.getTopic()); + subscribers = instance.subscribersForTopic(subscriber.getTopic()); assert !subscribers.contains(result) : "Subscriber should have expired"; } @@ -83,8 +83,8 @@ public abstract class AbstractDAOTest { subscriber.setLeaseSeconds(1); subscriber.setVerify("VerifyMe"); - final Subscriber result = instance.addSubscriber(subscriber); // TODO + // final Subscriber result = instance.addSubscriber(subscriber); } } diff --git a/src/test/java/org/rometools/certiorem/hub/data/ram/InMemoryDAOTest.java b/src/test/java/org/rometools/certiorem/hub/data/ram/InMemoryDAOTest.java index 218fcbe..be5f0a7 100644 --- a/src/test/java/org/rometools/certiorem/hub/data/ram/InMemoryDAOTest.java +++ b/src/test/java/org/rometools/certiorem/hub/data/ram/InMemoryDAOTest.java @@ -22,7 +22,7 @@ import org.rometools.certiorem.hub.data.AbstractDAOTest; import org.rometools.certiorem.hub.data.HubDAO; /** - * + * * @author robert.cooper */ public class InMemoryDAOTest extends AbstractDAOTest {