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:
@@ -18,7 +18,6 @@ java_library(
|
||||
"//java/com/google/gerrit/server/restapi",
|
||||
"//java/com/google/gerrit/util/cli",
|
||||
"//java/com/google/gerrit/util/http",
|
||||
"//java/com/google/gwtexpui/linker:server",
|
||||
"//java/org/eclipse/jgit:server",
|
||||
"//lib:args4j",
|
||||
"//lib:gson",
|
||||
|
@@ -14,7 +14,6 @@
|
||||
|
||||
package com.google.gerrit.httpd.raw;
|
||||
|
||||
import com.google.gwtexpui.linker.server.UserAgentRule;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
@@ -12,7 +12,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gwtexpui.linker.server;
|
||||
package com.google.gerrit.httpd.raw;
|
||||
|
||||
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}.
|
||||
*/
|
||||
public class UserAgentRule {
|
||||
class UserAgentRule {
|
||||
private static final Pattern msie = compile(".*msie ([0-11]+)\\.([0-11]+).*");
|
||||
private static final Pattern gecko = compile(".*rv:([0-9]+)\\.([0-9]+).*");
|
||||
|
||||
public String getName() {
|
||||
String getName() {
|
||||
return "user.agent";
|
||||
}
|
||||
|
||||
public String select(HttpServletRequest req) {
|
||||
String select(HttpServletRequest req) {
|
||||
String ua = req.getHeader("User-Agent");
|
||||
if (ua == null) {
|
||||
return null;
|
@@ -43,7 +43,6 @@ java_library(
|
||||
"//java/com/google/gerrit/server/schema",
|
||||
"//java/com/google/gerrit/sshd",
|
||||
"//java/com/google/gerrit/util/http",
|
||||
"//java/com/google/gwtexpui/linker:server",
|
||||
"//lib:args4j",
|
||||
"//lib:guava",
|
||||
"//lib:gwtorm",
|
||||
|
@@ -1,6 +0,0 @@
|
||||
java_library(
|
||||
name = "server",
|
||||
srcs = glob(["server/*.java"]),
|
||||
visibility = ["//visibility:public"],
|
||||
deps = ["//lib:servlet-api-3_1"],
|
||||
)
|
Reference in New Issue
Block a user