Permalink
Browse files

Remove some uses of repackaged Google classes with a more recent version

of Guava and Apache Commons.
  • Loading branch information...
mihaip committed Jan 11, 2012
1 parent 614cff3 commit bb1453b49387d5ad25ce273d620a74707de279b4
@@ -7,7 +7,8 @@
<classpathentry kind="lib" path="war/WEB-INF/lib/rome-1.0.jar"/>
<classpathentry kind="lib" path="war/WEB-INF/lib/xercesImpl.jar"/>
<classpathentry kind="lib" path="war/WEB-INF/lib/json_simple-1.1.jar"/>
<classpathentry kind="lib" path="war/WEB-INF/lib/google-collect-1.0-rc2.jar"/>
<classpathentry kind="lib" path="war/WEB-INF/lib/rome-opml-0.1-fixed.jar"/>
<classpathentry kind="lib" path="war/WEB-INF/lib/guava-11.0.1.jar"/>
<classpathentry kind="lib" path="war/WEB-INF/lib/commons-lang3-3.1.jar"/>
<classpathentry kind="output" path="war/WEB-INF/classes"/>
</classpath>
@@ -1,7 +1,7 @@
package info.persistent.pushbot;

import com.google.appengine.api.xmpp.JID;
import com.google.appengine.repackaged.com.google.common.base.StringUtil;
import com.google.common.base.Strings;
import com.google.common.collect.Lists;

import com.sun.syndication.feed.synd.SyndEntry;
@@ -12,6 +12,8 @@
import info.persistent.pushbot.util.Persistence;
import info.persistent.pushbot.util.Xmpp;

import org.apache.commons.lang3.StringEscapeUtils;

import java.io.IOException;
import java.net.URL;
import java.util.Collections;
@@ -130,16 +132,16 @@ protected void doPost(HttpServletRequest req, HttpServletResponse resp)
}

StringBuilder message = new StringBuilder("Update from ")
.append(StringUtil.unescapeHTML(feed.getTitle())).append(":");
.append(StringEscapeUtils.unescapeHtml4(feed.getTitle())).append(":");
for (SyndEntry displayEntry : displayEntries) {
String title = displayEntry.getTitle();
if (StringUtil.isEmptyOrWhitespace(title)) {
if (Strings.isNullOrEmpty(title)) {
title = "(title unknown)";
} else {
title = StringUtil.unescapeHTML(title);
title = StringEscapeUtils.unescapeHtml4(title);
}
String link = displayEntry.getLink();
if (StringUtil.isEmptyOrWhitespace(link)) {
if (Strings.isNullOrEmpty(link)) {
link = "<no link>";
}

@@ -1,13 +1,14 @@
package info.persistent.pushbot.commands;

import com.google.appengine.api.xmpp.JID;
import com.google.appengine.repackaged.com.google.common.base.StringUtil;
import com.google.common.collect.ArrayListMultimap;
import com.google.common.collect.Multimap;

import info.persistent.pushbot.data.Subscription;
import info.persistent.pushbot.util.Xmpp;

import org.apache.commons.lang3.StringEscapeUtils;

import java.util.List;

public class ListSubscriptionsCommandHandler implements CommandHandler {
@@ -36,7 +37,7 @@ public void handle(JID user, String... args) {
String title = subscription.getTitle();
if (title != null && !title.isEmpty()) {
message.append(" (")
.append(StringUtil.unescapeHTML(title)).append(")");
.append(StringEscapeUtils.unescapeHtml4(title)).append(")");
}
}
}
@@ -1,8 +1,8 @@
package info.persistent.pushbot.util;

import com.google.appengine.repackaged.com.google.common.base.Hash;
import com.google.appengine.repackaged.com.google.common.io.ByteStreams;
import com.google.common.collect.Lists;
import com.google.common.io.ByteStreams;

import com.sun.syndication.feed.atom.Entry;
import com.sun.syndication.feed.rss.Guid;
@@ -1,4 +1,4 @@
<!-- Indices written at Sun, 11 Oct 2009 22:01:54 UTC -->
<!-- Indices written at Tue, 10 Jan 2012 16:52:47 UTC -->

<datastore-indexes/>

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit bb1453b

Please sign in to comment.