From 89ae855bf945012176b23be72aee1dbb2cfb1b43 Mon Sep 17 00:00:00 2001 From: "Gary D. Gregory" Date: Wed, 20 Jan 2016 19:14:31 +0000 Subject: [PATCH] Serializable classes do not declare serialVersionUID. git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1725777 13f79535-47bb-0310-9956-ffa450edef68 --- .../hc/client5/http/methods/AbstractExecutionAwareRequest.java | 1 + .../main/java/org/apache/hc/client5/http/methods/HttpDelete.java | 1 + .../main/java/org/apache/hc/client5/http/methods/HttpGet.java | 1 + .../main/java/org/apache/hc/client5/http/methods/HttpHead.java | 1 + .../java/org/apache/hc/client5/http/methods/HttpOptions.java | 1 + .../main/java/org/apache/hc/client5/http/methods/HttpPatch.java | 1 + .../main/java/org/apache/hc/client5/http/methods/HttpPost.java | 1 + .../main/java/org/apache/hc/client5/http/methods/HttpPut.java | 1 + .../java/org/apache/hc/client5/http/methods/HttpRequestBase.java | 1 + .../org/apache/hc/client5/http/methods/HttpRequestWrapper.java | 1 + .../main/java/org/apache/hc/client5/http/methods/HttpTrace.java | 1 + .../java/org/apache/hc/client5/http/methods/RequestBuilder.java | 1 + 12 files changed, 12 insertions(+) diff --git a/httpclient/src/main/java/org/apache/hc/client5/http/methods/AbstractExecutionAwareRequest.java b/httpclient/src/main/java/org/apache/hc/client5/http/methods/AbstractExecutionAwareRequest.java index d91b43b42..ae9eea8d4 100644 --- a/httpclient/src/main/java/org/apache/hc/client5/http/methods/AbstractExecutionAwareRequest.java +++ b/httpclient/src/main/java/org/apache/hc/client5/http/methods/AbstractExecutionAwareRequest.java @@ -35,6 +35,7 @@ import org.apache.hc.core5.http.message.AbstractHttpMessage; public abstract class AbstractExecutionAwareRequest extends AbstractHttpMessage implements HttpExecutionAware, HttpRequest { + private static final long serialVersionUID = 1L; private final AtomicBoolean aborted; private final AtomicReference cancellableRef; diff --git a/httpclient/src/main/java/org/apache/hc/client5/http/methods/HttpDelete.java b/httpclient/src/main/java/org/apache/hc/client5/http/methods/HttpDelete.java index 71faae615..a33d2b342 100644 --- a/httpclient/src/main/java/org/apache/hc/client5/http/methods/HttpDelete.java +++ b/httpclient/src/main/java/org/apache/hc/client5/http/methods/HttpDelete.java @@ -49,6 +49,7 @@ import org.apache.hc.core5.annotation.NotThreadSafe; @NotThreadSafe // HttpRequestBase is @NotThreadSafe public class HttpDelete extends HttpRequestBase { + private static final long serialVersionUID = 1L; public final static String METHOD_NAME = "DELETE"; diff --git a/httpclient/src/main/java/org/apache/hc/client5/http/methods/HttpGet.java b/httpclient/src/main/java/org/apache/hc/client5/http/methods/HttpGet.java index 755070ed0..d6fa7887c 100644 --- a/httpclient/src/main/java/org/apache/hc/client5/http/methods/HttpGet.java +++ b/httpclient/src/main/java/org/apache/hc/client5/http/methods/HttpGet.java @@ -50,6 +50,7 @@ import org.apache.hc.core5.annotation.NotThreadSafe; @NotThreadSafe public class HttpGet extends HttpRequestBase { + private static final long serialVersionUID = 1L; public final static String METHOD_NAME = "GET"; public HttpGet() { diff --git a/httpclient/src/main/java/org/apache/hc/client5/http/methods/HttpHead.java b/httpclient/src/main/java/org/apache/hc/client5/http/methods/HttpHead.java index e7ee11474..c9c537650 100644 --- a/httpclient/src/main/java/org/apache/hc/client5/http/methods/HttpHead.java +++ b/httpclient/src/main/java/org/apache/hc/client5/http/methods/HttpHead.java @@ -53,6 +53,7 @@ import org.apache.hc.core5.annotation.NotThreadSafe; @NotThreadSafe public class HttpHead extends HttpRequestBase { + private static final long serialVersionUID = 1L; public final static String METHOD_NAME = "HEAD"; public HttpHead() { diff --git a/httpclient/src/main/java/org/apache/hc/client5/http/methods/HttpOptions.java b/httpclient/src/main/java/org/apache/hc/client5/http/methods/HttpOptions.java index d7f953134..b98d1d61e 100644 --- a/httpclient/src/main/java/org/apache/hc/client5/http/methods/HttpOptions.java +++ b/httpclient/src/main/java/org/apache/hc/client5/http/methods/HttpOptions.java @@ -58,6 +58,7 @@ import org.apache.hc.core5.util.Args; @NotThreadSafe public class HttpOptions extends HttpRequestBase { + private static final long serialVersionUID = 1L; public final static String METHOD_NAME = "OPTIONS"; public HttpOptions() { diff --git a/httpclient/src/main/java/org/apache/hc/client5/http/methods/HttpPatch.java b/httpclient/src/main/java/org/apache/hc/client5/http/methods/HttpPatch.java index f7aff092b..27eb1d763 100644 --- a/httpclient/src/main/java/org/apache/hc/client5/http/methods/HttpPatch.java +++ b/httpclient/src/main/java/org/apache/hc/client5/http/methods/HttpPatch.java @@ -53,6 +53,7 @@ import org.apache.hc.core5.annotation.NotThreadSafe; @NotThreadSafe public class HttpPatch extends HttpRequestBase { + private static final long serialVersionUID = 1L; public final static String METHOD_NAME = "PATCH"; public HttpPatch() { diff --git a/httpclient/src/main/java/org/apache/hc/client5/http/methods/HttpPost.java b/httpclient/src/main/java/org/apache/hc/client5/http/methods/HttpPost.java index 95512ec57..b1f48bf77 100644 --- a/httpclient/src/main/java/org/apache/hc/client5/http/methods/HttpPost.java +++ b/httpclient/src/main/java/org/apache/hc/client5/http/methods/HttpPost.java @@ -57,6 +57,7 @@ import org.apache.hc.core5.annotation.NotThreadSafe; @NotThreadSafe public class HttpPost extends HttpRequestBase { + private static final long serialVersionUID = 1L; public final static String METHOD_NAME = "POST"; public HttpPost() { diff --git a/httpclient/src/main/java/org/apache/hc/client5/http/methods/HttpPut.java b/httpclient/src/main/java/org/apache/hc/client5/http/methods/HttpPut.java index f67732e35..de1dd41bf 100644 --- a/httpclient/src/main/java/org/apache/hc/client5/http/methods/HttpPut.java +++ b/httpclient/src/main/java/org/apache/hc/client5/http/methods/HttpPut.java @@ -49,6 +49,7 @@ import org.apache.hc.core5.annotation.NotThreadSafe; @NotThreadSafe public class HttpPut extends HttpRequestBase { + private static final long serialVersionUID = 1L; public final static String METHOD_NAME = "PUT"; public HttpPut() { diff --git a/httpclient/src/main/java/org/apache/hc/client5/http/methods/HttpRequestBase.java b/httpclient/src/main/java/org/apache/hc/client5/http/methods/HttpRequestBase.java index 43c3ff4b3..edd258bbf 100644 --- a/httpclient/src/main/java/org/apache/hc/client5/http/methods/HttpRequestBase.java +++ b/httpclient/src/main/java/org/apache/hc/client5/http/methods/HttpRequestBase.java @@ -45,6 +45,7 @@ import org.apache.hc.core5.http.message.BasicRequestLine; public abstract class HttpRequestBase extends AbstractExecutionAwareRequest implements HttpUriRequest, Configurable { + private static final long serialVersionUID = 1L; private ProtocolVersion version; private URI uri; private RequestConfig config; diff --git a/httpclient/src/main/java/org/apache/hc/client5/http/methods/HttpRequestWrapper.java b/httpclient/src/main/java/org/apache/hc/client5/http/methods/HttpRequestWrapper.java index fdda68750..636c0c68b 100644 --- a/httpclient/src/main/java/org/apache/hc/client5/http/methods/HttpRequestWrapper.java +++ b/httpclient/src/main/java/org/apache/hc/client5/http/methods/HttpRequestWrapper.java @@ -48,6 +48,7 @@ import org.apache.hc.core5.util.Args; @NotThreadSafe public class HttpRequestWrapper extends AbstractHttpMessage implements HttpUriRequest { + private static final long serialVersionUID = 1L; private final HttpRequest original; private final HttpHost target; private final String method; diff --git a/httpclient/src/main/java/org/apache/hc/client5/http/methods/HttpTrace.java b/httpclient/src/main/java/org/apache/hc/client5/http/methods/HttpTrace.java index d2401e68f..dc6302516 100644 --- a/httpclient/src/main/java/org/apache/hc/client5/http/methods/HttpTrace.java +++ b/httpclient/src/main/java/org/apache/hc/client5/http/methods/HttpTrace.java @@ -52,6 +52,7 @@ import org.apache.hc.core5.annotation.NotThreadSafe; @NotThreadSafe public class HttpTrace extends HttpRequestBase { + private static final long serialVersionUID = 1L; public final static String METHOD_NAME = "TRACE"; public HttpTrace() { diff --git a/httpclient/src/main/java/org/apache/hc/client5/http/methods/RequestBuilder.java b/httpclient/src/main/java/org/apache/hc/client5/http/methods/RequestBuilder.java index b360febcb..ad5b00df7 100644 --- a/httpclient/src/main/java/org/apache/hc/client5/http/methods/RequestBuilder.java +++ b/httpclient/src/main/java/org/apache/hc/client5/http/methods/RequestBuilder.java @@ -485,6 +485,7 @@ public class RequestBuilder { static class InternalRequest extends HttpRequestBase { + private static final long serialVersionUID = 1L; private final String method; InternalRequest(final String method) {