Move UserAgentRule to httpd.raw and delete gwtexpui.linker.server

This class is only used in one place, so move it there. After this
commit, there is no more server-related code in gwtexpui, so it should
be safe to delete those directories wholesale when the GWT UI is
removed.

Change-Id: Ia236f9fc516ec65c46663e34fe89ddb330ef0931
This commit is contained in:
Dave Borowitz
2018-06-12 11:04:03 -04:00
parent 791da3a64a
commit ec566380ff
5 changed files with 4 additions and 13 deletions

View File

@@ -18,7 +18,6 @@ java_library(
"//java/com/google/gerrit/server/restapi", "//java/com/google/gerrit/server/restapi",
"//java/com/google/gerrit/util/cli", "//java/com/google/gerrit/util/cli",
"//java/com/google/gerrit/util/http", "//java/com/google/gerrit/util/http",
"//java/com/google/gwtexpui/linker:server",
"//java/org/eclipse/jgit:server", "//java/org/eclipse/jgit:server",
"//lib:args4j", "//lib:args4j",
"//lib:gson", "//lib:gson",

View File

@@ -14,7 +14,6 @@
package com.google.gerrit.httpd.raw; package com.google.gerrit.httpd.raw;
import com.google.gwtexpui.linker.server.UserAgentRule;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;

View File

@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
package com.google.gwtexpui.linker.server; package com.google.gerrit.httpd.raw;
import static java.util.regex.Pattern.compile; import static java.util.regex.Pattern.compile;
@@ -28,15 +28,15 @@ import javax.servlet.http.HttpServletRequest;
* *
* <p>Ported from JavaScript in {@code com.google.gwt.user.UserAgent.gwt.xml}. * <p>Ported from JavaScript in {@code com.google.gwt.user.UserAgent.gwt.xml}.
*/ */
public class UserAgentRule { class UserAgentRule {
private static final Pattern msie = compile(".*msie ([0-11]+)\\.([0-11]+).*"); private static final Pattern msie = compile(".*msie ([0-11]+)\\.([0-11]+).*");
private static final Pattern gecko = compile(".*rv:([0-9]+)\\.([0-9]+).*"); private static final Pattern gecko = compile(".*rv:([0-9]+)\\.([0-9]+).*");
public String getName() { String getName() {
return "user.agent"; return "user.agent";
} }
public String select(HttpServletRequest req) { String select(HttpServletRequest req) {
String ua = req.getHeader("User-Agent"); String ua = req.getHeader("User-Agent");
if (ua == null) { if (ua == null) {
return null; return null;

View File

@@ -43,7 +43,6 @@ java_library(
"//java/com/google/gerrit/server/schema", "//java/com/google/gerrit/server/schema",
"//java/com/google/gerrit/sshd", "//java/com/google/gerrit/sshd",
"//java/com/google/gerrit/util/http", "//java/com/google/gerrit/util/http",
"//java/com/google/gwtexpui/linker:server",
"//lib:args4j", "//lib:args4j",
"//lib:guava", "//lib:guava",
"//lib:gwtorm", "//lib:gwtorm",

View File

@@ -1,6 +0,0 @@
java_library(
name = "server",
srcs = glob(["server/*.java"]),
visibility = ["//visibility:public"],
deps = ["//lib:servlet-api-3_1"],
)