]> source.dussan.org Git - jgit.git/commitdiff
Get rid of javax.servlet API dependency for core org.eclipse.jgit 57/87957/3
authorMarc Strapetz <marc.strapetz@syntevo.com>
Tue, 3 Jan 2017 17:12:05 +0000 (18:12 +0100)
committerAndrey Loskutov <loskutov@gmx.de>
Tue, 3 Jan 2017 17:50:55 +0000 (18:50 +0100)
Change-Id: I57d5d4fab7e0b1bd4cf5f1850e8569c8ac5def88
Signed-off-by: Marc Strapetz <marc.strapetz@syntevo.com>
Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
org.eclipse.jgit/BUCK
org.eclipse.jgit/META-INF/MANIFEST.MF
org.eclipse.jgit/pom.xml
org.eclipse.jgit/src/org/eclipse/jgit/transport/ServiceMayNotContinueException.java

index 2bae6dcf25e68caf25906d3b741729c0cc8ddb12..73e2080576ffcd6b42e6167a1b337b15761a5846 100644 (file)
@@ -9,7 +9,6 @@ java_library(
     '//lib:javaewah',
     '//lib:jsch',
     '//lib:httpcomponents',
-    '//lib:servlet-api',
     '//lib:slf4j-api',
   ],
   visibility = ['PUBLIC'],
index 867c20acaf5c25ec5df726143ef082a3508b32bc..903b0118ba27a25541901c815ec6b47b85faf9d5 100644 (file)
@@ -140,7 +140,6 @@ Import-Package: com.googlecode.javaewah;version="[1.1.6,2.0.0)",
  com.jcraft.jsch;version="[0.1.37,0.2.0)",
  javax.crypto,
  javax.net.ssl,
- javax.servlet.http;version="[2.5.0,3.2.0)",
  org.slf4j;version="[1.7.0,2.0.0)",
  org.xml.sax,
  org.xml.sax.helpers
index 75ea7996d9b5037298923a30aea2c7dec48e9a45..6465a00b69367ca07b0c3cbd6080964694080d7a 100644 (file)
       <artifactId>slf4j-api</artifactId>
     </dependency>
 
-    <dependency>
-      <groupId>javax.servlet</groupId>
-      <artifactId>javax.servlet-api</artifactId>
-      <scope>provided</scope>
-    </dependency>
   </dependencies>
 
   <build>
index 81c5da3c780fa5fd1c0d6227bccf626483d290a4..87c9a5003853c3ca8672a64e6c8fcdb6d681e272 100644 (file)
@@ -45,8 +45,6 @@ package org.eclipse.jgit.transport;
 
 import java.io.IOException;
 
-import javax.servlet.http.HttpServletResponse;
-
 import org.eclipse.jgit.internal.JGitText;
 
 /**
@@ -55,6 +53,7 @@ import org.eclipse.jgit.internal.JGitText;
  * @since 2.0
  */
 public class ServiceMayNotContinueException extends IOException {
+       private static final int FORBIDDEN = 403;
        private static final long serialVersionUID = 1L;
 
        private final int statusCode;
@@ -63,7 +62,7 @@ public class ServiceMayNotContinueException extends IOException {
        /** Initialize with no message. */
        public ServiceMayNotContinueException() {
                // Do not set a message.
-               statusCode = HttpServletResponse.SC_FORBIDDEN;
+               statusCode = FORBIDDEN;
        }
 
        /**
@@ -73,7 +72,7 @@ public class ServiceMayNotContinueException extends IOException {
         */
        public ServiceMayNotContinueException(String msg) {
                super(msg);
-               statusCode = HttpServletResponse.SC_FORBIDDEN;
+               statusCode = FORBIDDEN;
        }
 
        /**
@@ -99,7 +98,7 @@ public class ServiceMayNotContinueException extends IOException {
         */
        public ServiceMayNotContinueException(String msg, Throwable cause) {
                super(msg, cause);
-               statusCode = HttpServletResponse.SC_FORBIDDEN;
+               statusCode = FORBIDDEN;
        }
 
        /**