Upgraded to ROME 1.6.1
Added run arguments to build.gradle
This commit is contained in:
parent
77f2f5c218
commit
62c011234e
13 changed files with 362 additions and 97 deletions
|
@ -13,8 +13,8 @@ import java.util.Date;
|
|||
* Annotation Processor</a>
|
||||
*/
|
||||
public final class ReleaseInfo {
|
||||
private final static String buildmeta = "004";
|
||||
private final static Date date = new Date(1466883211201L);
|
||||
private final static String buildmeta = "005";
|
||||
private final static Date date = new Date(1466989732969L);
|
||||
private final static int major = 0;
|
||||
private final static int minor = 6;
|
||||
private final static int patch = 1;
|
||||
|
|
|
@ -31,10 +31,10 @@
|
|||
*/
|
||||
package net.thauvin.erik.mobibot;
|
||||
|
||||
import com.sun.syndication.feed.synd.*;
|
||||
import com.sun.syndication.io.FeedException;
|
||||
import com.sun.syndication.io.SyndFeedInput;
|
||||
import com.sun.syndication.io.SyndFeedOutput;
|
||||
import com.rometools.rome.feed.synd.*;
|
||||
import com.rometools.rome.io.FeedException;
|
||||
import com.rometools.rome.io.SyndFeedInput;
|
||||
import com.rometools.rome.io.SyndFeedOutput;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.ArrayList;
|
||||
|
@ -139,8 +139,8 @@ final class EntriesMgr
|
|||
*
|
||||
* @return The feed's last published date.
|
||||
*
|
||||
* @throws java.io.FileNotFoundException If the file was not found.
|
||||
* @throws com.sun.syndication.io.FeedException If an error occurred while reading the feed.
|
||||
* @throws FileNotFoundException If the file was not found.
|
||||
* @throws FeedException If an error occurred while reading the feed.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public static String loadEntries(final String file, final String channel, final List<EntryLink> entries)
|
||||
|
@ -222,7 +222,8 @@ final class EntriesMgr
|
|||
* @param history The history array.
|
||||
* @param isDayBackup Set the true if the daily backup file should also be created.
|
||||
*/
|
||||
public static void saveEntries(final Mobibot bot, final List<EntryLink> entries, final List<String> history, final boolean isDayBackup)
|
||||
public static void saveEntries(final Mobibot bot, final List<EntryLink> entries, final List<String> history,
|
||||
final boolean isDayBackup)
|
||||
{
|
||||
if (bot.getLogger().isDebugEnabled())
|
||||
{
|
||||
|
|
|
@ -31,7 +31,8 @@
|
|||
*/
|
||||
package net.thauvin.erik.mobibot;
|
||||
|
||||
import com.sun.syndication.feed.synd.SyndCategoryImpl;
|
||||
import com.rometools.rome.feed.synd.SyndCategory;
|
||||
import com.rometools.rome.feed.synd.SyndCategoryImpl;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Calendar;
|
||||
|
@ -57,7 +58,7 @@ public class EntryLink implements Serializable
|
|||
private final List<EntryComment> comments = new CopyOnWriteArrayList<EntryComment>();
|
||||
|
||||
// The tags/categories
|
||||
private final List<SyndCategoryImpl> tags = new CopyOnWriteArrayList<SyndCategoryImpl>();
|
||||
private final List<SyndCategory> tags = new CopyOnWriteArrayList<SyndCategory>();
|
||||
|
||||
// The channel
|
||||
private String channel = "";
|
||||
|
@ -87,7 +88,8 @@ public class EntryLink implements Serializable
|
|||
* @param channel The channel.
|
||||
* @param tags The entry's tags/categories.
|
||||
*/
|
||||
public EntryLink(final String link, final String title, final String nick, final String login, final String channel, final String tags)
|
||||
public EntryLink(final String link, final String title, final String nick, final String login, final String channel,
|
||||
final String tags)
|
||||
{
|
||||
this.link = link;
|
||||
this.title = title;
|
||||
|
@ -163,7 +165,8 @@ public class EntryLink implements Serializable
|
|||
* @param date The entry date.
|
||||
* @param tags The entry's tags/categories.
|
||||
*/
|
||||
public EntryLink(final String link, final String title, final String nick, final String channel, final Date date, final List<SyndCategoryImpl> tags)
|
||||
public EntryLink(final String link, final String title, final String nick, final String channel, final Date date,
|
||||
final List<SyndCategory> tags)
|
||||
{
|
||||
this.link = link;
|
||||
this.title = title;
|
||||
|
@ -349,7 +352,7 @@ public class EntryLink implements Serializable
|
|||
*
|
||||
* @return The tags.
|
||||
*/
|
||||
public final List getTags()
|
||||
public final List<SyndCategory> getTags()
|
||||
{
|
||||
return tags;
|
||||
}
|
||||
|
@ -359,7 +362,7 @@ public class EntryLink implements Serializable
|
|||
*
|
||||
* @param tags The tags.
|
||||
*/
|
||||
private void setTags(final List<SyndCategoryImpl> tags)
|
||||
private void setTags(final List<SyndCategory> tags)
|
||||
{
|
||||
this.tags.addAll(tags);
|
||||
}
|
||||
|
|
|
@ -31,11 +31,11 @@
|
|||
*/
|
||||
package net.thauvin.erik.mobibot;
|
||||
|
||||
import com.sun.syndication.feed.synd.SyndEntry;
|
||||
import com.sun.syndication.feed.synd.SyndEntryImpl;
|
||||
import com.sun.syndication.feed.synd.SyndFeed;
|
||||
import com.sun.syndication.fetcher.FeedFetcher;
|
||||
import com.sun.syndication.fetcher.impl.HttpURLFeedFetcher;
|
||||
import com.rometools.rome.feed.synd.SyndEntry;
|
||||
import com.rometools.rome.feed.synd.SyndEntryImpl;
|
||||
import com.rometools.rome.feed.synd.SyndFeed;
|
||||
import com.rometools.rome.io.SyndFeedInput;
|
||||
import com.rometools.rome.io.XmlReader;
|
||||
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
|
@ -94,11 +94,11 @@ class FeedReader implements Runnable
|
|||
*/
|
||||
public final void run()
|
||||
{
|
||||
final FeedFetcher fetcher = new HttpURLFeedFetcher(bot.getFeedInfoCache());
|
||||
|
||||
try
|
||||
{
|
||||
final SyndFeed feed = fetcher.retrieveFeed(new URL(url));
|
||||
final SyndFeedInput input = new SyndFeedInput();
|
||||
final SyndFeed feed = input.build(new XmlReader(new URL(url)));
|
||||
|
||||
SyndEntry item;
|
||||
final List items = feed.getEntries();
|
||||
|
||||
|
|
|
@ -31,9 +31,7 @@
|
|||
*/
|
||||
package net.thauvin.erik.mobibot;
|
||||
|
||||
import com.sun.syndication.fetcher.impl.FeedFetcherCache;
|
||||
import com.sun.syndication.fetcher.impl.HashMapFeedInfoCache;
|
||||
import com.sun.syndication.io.FeedException;
|
||||
import com.rometools.rome.io.FeedException;
|
||||
import net.objecthunter.exp4j.Expression;
|
||||
import net.objecthunter.exp4j.ExpressionBuilder;
|
||||
import net.thauvin.erik.semver.Version;
|
||||
|
@ -174,10 +172,6 @@ public class Mobibot extends PircBot
|
|||
*/
|
||||
private final List<EntryLink> entries = new ArrayList<EntryLink>(0);
|
||||
|
||||
/**
|
||||
* The feed info cache.
|
||||
*/
|
||||
private final FeedFetcherCache feedInfoCache = HashMapFeedInfoCache.getInstance();
|
||||
|
||||
/**
|
||||
* The history/backlogs array.
|
||||
|
@ -943,15 +937,6 @@ public class Mobibot extends PircBot
|
|||
return channel;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the {@link FeedFetcherCache feed info cache}.
|
||||
*
|
||||
* @return The feed info cache.
|
||||
*/
|
||||
public final FeedFetcherCache getFeedInfoCache()
|
||||
{
|
||||
return this.feedInfoCache;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the irc server.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue