Permalink
Browse files

Uses guava 14.0.1 BaseEncoding.base64Url()

  • Loading branch information...
1 parent 9da726f commit 0272d49fd353ff278eee71c901c62da1194c53a9 @sagemintblue sagemintblue committed Apr 5, 2013
Showing with 3 additions and 10 deletions.
  1. +2 −9 common/src/main/java/com/twitter/ambrose/server/APIHandler.java
  2. +1 −1 pom.xml
@@ -8,8 +8,7 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import com.sun.org.apache.xml.internal.security.exceptions.Base64DecodingException;
-import com.sun.org.apache.xml.internal.security.utils.Base64;
+import com.google.common.io.BaseEncoding;
import org.mortbay.jetty.HttpConnection;
import org.mortbay.jetty.Request;
@@ -87,13 +86,7 @@ public void handle(String target,
String startRowParam = request.getParameter(QUERY_PARAM_START_KEY);
byte[] startRow = null;
if (startRowParam != null && !startRowParam.isEmpty()) {
- try {
- startRow = Base64.decode(startRowParam);
- } catch (Base64DecodingException e) {
- throw new IOException(String.format(
- "Failed to decode '%s' parameter value '%s'",
- QUERY_PARAM_START_KEY, startRowParam), e);
- }
+ startRow = BaseEncoding.base64Url().decode(startRowParam);
}
LOG.info("Submitted request for cluster={}, user={}, status={}, startRow={}", cluster, user,
View
@@ -113,7 +113,7 @@
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
- <version>12.0.1</version>
+ <version>14.0.1</version>
</dependency>
<!-- serialization -->

0 comments on commit 0272d49

Please sign in to comment.