Repository: incubator-juneau
Updated Branches:
  refs/heads/master fb14c7e00 -> db0cf72ba


Code cleanup.

Project: http://git-wip-us.apache.org/repos/asf/incubator-juneau/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-juneau/commit/db0cf72b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-juneau/tree/db0cf72b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-juneau/diff/db0cf72b

Branch: refs/heads/master
Commit: db0cf72bafe1d6d1ef3d448f5fd4b8315d982d05
Parents: fb14c7e
Author: JamesBognar <[email protected]>
Authored: Fri Mar 10 09:42:32 2017 -0800
Committer: JamesBognar <[email protected]>
Committed: Fri Mar 10 09:42:32 2017 -0800

----------------------------------------------------------------------
 .../org/apache/juneau/rest/client/RestCall.java | 12 +++----
 .../apache/juneau/rest/client/RestClient.java   | 33 ++------------------
 2 files changed, 9 insertions(+), 36 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/db0cf72b/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/RestCall.java
----------------------------------------------------------------------
diff --git 
a/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/RestCall.java 
b/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/RestCall.java
index 9aba208..ab660b0 100644
--- 
a/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/RestCall.java
+++ 
b/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/RestCall.java
@@ -85,7 +85,7 @@ public final class RestCall {
        protected RestCall(RestClient client, HttpRequestBase request) throws 
RestCallException {
                this.client = client;
                this.request = request;
-               for (RestCallInterceptor i : this.client.getInterceptors())
+               for (RestCallInterceptor i : this.client.interceptors)
                        interceptor(i);
                this.retryOn = client.retryOn;
                this.retries = client.retries;
@@ -111,7 +111,7 @@ public final class RestCall {
                if (! (request instanceof HttpEntityEnclosingRequestBase))
                        throw new RestCallException(0, "Method does not support 
content entity.", request.getMethod(), request.getURI(), null);
 
-               HttpEntity entity = (input instanceof HttpEntity) ? 
(HttpEntity)input : new RestRequestEntity(input, client.getSerializer());
+               HttpEntity entity = (input instanceof HttpEntity) ? 
(HttpEntity)input : new RestRequestEntity(input, client.serializer);
 
                ((HttpEntityEnclosingRequestBase)request).setEntity(entity);
 
@@ -1028,9 +1028,9 @@ public final class RestCall {
         * @throws RestCallException If no parser was defined on the client.
         */
        protected Parser getParser() throws RestCallException {
-               if (client.getParser() == null)
+               if (client.parser == null)
                        throw new RestCallException(0, "No parser defined on 
client", request.getMethod(), request.getURI(), null);
-               return client.getParser();
+               return client.parser;
        }
 
        /**
@@ -1040,9 +1040,9 @@ public final class RestCall {
         * @throws RestCallException If no serializer was defined on the client.
         */
        protected Serializer getSerializer() throws RestCallException {
-               if (client.getSerializer() == null)
+               if (client.serializer == null)
                        throw new RestCallException(0, "No serializer defined 
on client", request.getMethod(), request.getURI(), null);
-               return client.getSerializer();
+               return client.serializer;
        }
 
        /**

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/db0cf72b/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/RestClient.java
----------------------------------------------------------------------
diff --git 
a/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/RestClient.java
 
b/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/RestClient.java
index 8d4748d..9ff546a 100644
--- 
a/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/RestClient.java
+++ 
b/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/RestClient.java
@@ -55,10 +55,9 @@ public class RestClient extends CoreObject {
        private final Map<String,String> headers;
        private final CloseableHttpClient httpClient;
        private final boolean keepHttpClientOpen;
-       private final Serializer serializer;
+       final Serializer serializer;
        private final UrlEncodingSerializer urlEncodingSerializer;  // Used for 
form posts only.
-       private final Parser parser;
-       private final RestCallInterceptor[] interceptors;
+       final Parser parser;
        private final String remoteableServletUri;
        private final Map<Method,String> remoteableServiceUriMap;
        private final String rootUrl;
@@ -68,6 +67,7 @@ public class RestClient extends CoreObject {
        final RetryOn retryOn;
        final int retries;
        final long retryInterval;
+       final RestCallInterceptor[] interceptors;
 
        /**
         * Create a new REST client.
@@ -153,33 +153,6 @@ public class RestClient extends CoreObject {
        }
 
        /**
-        * Returns the serializer currently associated with this client.
-        *
-        * @return The serializer currently associated with this client, or 
<jk>null</jk> if no serializer is currently associated.
-        */
-       public Serializer getSerializer() {
-               return serializer;
-       }
-
-       /**
-        * Returns the parser currently associated with this client.
-        *
-        * @return The parser currently associated with this client, or 
<jk>null</jk> if no parser is currently associated.
-        */
-       public Parser getParser() {
-               return parser;
-       }
-
-       /**
-        * Returns the list of interceptors on this client.
-        *
-        * @return The list of interceptors on this client.
-        */
-       public RestCallInterceptor[] getInterceptors() {
-               return interceptors;
-       }
-
-       /**
         * Execute the specified request.
         * Subclasses can override this method to provide specialized handling.
         *

Reply via email to