[stapler] 07/09: Remove use of findbugs

James Downing Page jamespage at moszumanska.debian.org
Thu Jan 2 13:12:07 UTC 2014


This is an automated email from the git hooks/post-receive script.

jamespage pushed a commit to branch patch-queue/master
in repository stapler.

commit c61279b8b48016d19084fa9da5199953ecc336a5
Author: James Page <james.page at ubuntu.com>
Date:   Mon Aug 12 09:45:41 2013 +0100

    Remove use of findbugs
    
    findbugs is not yet packaged so drop references from codebase.
---
 core/pom.xml                                                | 6 ------
 core/src/main/java/org/kohsuke/stapler/HttpRedirect.java    | 5 ++---
 core/src/main/java/org/kohsuke/stapler/ResponseImpl.java    | 9 ++++-----
 core/src/main/java/org/kohsuke/stapler/StaplerResponse.java | 5 ++---
 4 files changed, 8 insertions(+), 17 deletions(-)

diff --git a/core/pom.xml b/core/pom.xml
index f163dda..796751a 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -129,12 +129,6 @@
       <scope>test</scope>
     </dependency>
     <dependency>
-      <groupId>com.github.stephenc.findbugs</groupId>
-      <artifactId>findbugs-annotations</artifactId>
-      <version>1.3.9-1</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
       <groupId>com.jcraft</groupId>
       <artifactId>jzlib</artifactId>
       <version>1.1.2</version>
diff --git a/core/src/main/java/org/kohsuke/stapler/HttpRedirect.java b/core/src/main/java/org/kohsuke/stapler/HttpRedirect.java
index 8d2724a..c80b222 100644
--- a/core/src/main/java/org/kohsuke/stapler/HttpRedirect.java
+++ b/core/src/main/java/org/kohsuke/stapler/HttpRedirect.java
@@ -23,7 +23,6 @@
 
 package org.kohsuke.stapler;
 
-import edu.umd.cs.findbugs.annotations.NonNull;
 import javax.servlet.ServletException;
 import java.io.IOException;
 
@@ -39,11 +38,11 @@ public final class HttpRedirect extends RuntimeException implements HttpResponse
     private final int statusCode;
     private final String url;
 
-    public HttpRedirect(@NonNull String url) {
+    public HttpRedirect(String url) {
         this(SC_MOVED_TEMPORARILY,url);
     }
 
-    public HttpRedirect(int statusCode, @NonNull String url) {
+    public HttpRedirect(int statusCode, String url) {
         this.statusCode = statusCode;
         if (url == null) {
             throw new NullPointerException();
diff --git a/core/src/main/java/org/kohsuke/stapler/ResponseImpl.java b/core/src/main/java/org/kohsuke/stapler/ResponseImpl.java
index db4b6a4..7547af2 100644
--- a/core/src/main/java/org/kohsuke/stapler/ResponseImpl.java
+++ b/core/src/main/java/org/kohsuke/stapler/ResponseImpl.java
@@ -23,7 +23,6 @@
 
 package org.kohsuke.stapler;
 
-import edu.umd.cs.findbugs.annotations.NonNull;
 import net.sf.json.JsonConfig;
 import org.kohsuke.stapler.compression.CompressionFilter;
 import org.kohsuke.stapler.compression.FilterServletOutputStream;
@@ -128,7 +127,7 @@ public class ResponseImpl extends HttpServletResponseWrapper implements StaplerR
     }
 
     @Override
-    public void sendRedirect(@NonNull String url) throws IOException {
+    public void sendRedirect(String url) throws IOException {
         // WebSphere doesn't apparently handle relative URLs, so
         // to be safe, always resolve relative URLs to absolute URLs by ourselves.
         // see http://www.nabble.com/Hudson%3A-1.262%3A-Broken-link-using-update-manager-to21067157.html
@@ -146,13 +145,13 @@ public class ResponseImpl extends HttpServletResponseWrapper implements StaplerR
         super.sendRedirect(base);
     }
 
-    public void sendRedirect2(@NonNull String url) throws IOException {
+    public void sendRedirect2(String url) throws IOException {
         // Tomcat doesn't encode URL (servlet spec isn't very clear on it)
         // so do the encoding by ourselves
         sendRedirect(encode(url));
     }
 
-    public void sendRedirect(int statusCode, @NonNull String url) throws IOException {
+    public void sendRedirect(int statusCode, String url) throws IOException {
         if (statusCode==SC_MOVED_TEMPORARILY) {
             sendRedirect(url);  // to be safe, let the servlet container handles this default case
             return;
@@ -352,7 +351,7 @@ public class ResponseImpl extends HttpServletResponseWrapper implements StaplerR
     /**
      * Escapes non-ASCII characters.
      */
-    public static @NonNull String encode(@NonNull String s) {
+    public static String encode(String s) {
         try {
             boolean escaped = false;
 
diff --git a/core/src/main/java/org/kohsuke/stapler/StaplerResponse.java b/core/src/main/java/org/kohsuke/stapler/StaplerResponse.java
index 385843f..259e244 100644
--- a/core/src/main/java/org/kohsuke/stapler/StaplerResponse.java
+++ b/core/src/main/java/org/kohsuke/stapler/StaplerResponse.java
@@ -23,7 +23,6 @@
 
 package org.kohsuke.stapler;
 
-import edu.umd.cs.findbugs.annotations.NonNull;
 import net.sf.json.JsonConfig;
 import org.kohsuke.stapler.export.Flavor;
 
@@ -72,12 +71,12 @@ public interface StaplerResponse extends HttpServletResponse {
      * Works like {@link #sendRedirect(String)} except that this method
      * escapes the URL.
      */
-    void sendRedirect2(@NonNull String url) throws IOException;
+    void sendRedirect2(String url) throws IOException;
 
     /**
      * Works like {@link #sendRedirect2(String)} but allows the caller to specify the HTTP status code.
      */
-    void sendRedirect(int statusCore, @NonNull String url) throws IOException;
+    void sendRedirect(int statusCore, String url) throws IOException;
 
     /**
      * Serves a static resource.

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/stapler.git



More information about the pkg-java-commits mailing list