Skip to content

Commit

Permalink
Revert "Workaround Guice bug "getPathInfo not decoded""
Browse files Browse the repository at this point in the history
This reverts commit 304130b.

This was added as a workaround for Guice issue #745 [1].

Since then, a fix [2] has been merged and is included in Guice
version 4.0, which we are now using.

[1] google/guice#745
[2] cstamas/guice@41c126f

Change-Id: I8048a9e8897d8b4e42a0f518d2deed5e17264bcf
  • Loading branch information
dpursehouse committed Oct 16, 2015
1 parent 8408244 commit b4ff6b8
Showing 1 changed file with 0 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@

package com.google.gerrit.httpd;

import static java.nio.charset.StandardCharsets.UTF_8;

import com.google.common.cache.Cache;
import com.google.common.collect.Lists;
import com.google.gerrit.common.data.Capable;
Expand Down Expand Up @@ -65,8 +63,6 @@
import org.eclipse.jgit.transport.resolver.UploadPackFactory;

import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
Expand Down Expand Up @@ -160,13 +156,6 @@ static class Resolver implements RepositoryResolver<HttpServletRequest> {
public Repository open(HttpServletRequest req, String projectName)
throws RepositoryNotFoundException, ServiceNotAuthorizedException,
ServiceNotEnabledException {
try {
// TODO: remove this code when Guice fixes its issue 745
projectName = URLDecoder.decode(projectName, UTF_8.name());
} catch (UnsupportedEncodingException e) {
// leave it encoded
}

while (projectName.endsWith("/")) {
projectName = projectName.substring(0, projectName.length() - 1);
}
Expand Down

0 comments on commit b4ff6b8

Please sign in to comment.