You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by ah...@apache.org on 2020/01/07 08:09:54 UTC

[isis] branch master updated: ISIS-2158: don't expose RestfulHttpMethodHelper

This is an automated email from the ASF dual-hosted git repository.

ahuber pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/isis.git


The following commit(s) were added to refs/heads/master by this push:
     new 7639375  ISIS-2158: don't expose RestfulHttpMethodHelper
7639375 is described below

commit 7639375ce07d4dc742e42206d2c2586edfe44319
Author: Andi Huber <ah...@apache.org>
AuthorDate: Tue Jan 7 09:09:43 2020 +0100

    ISIS-2158: don't expose RestfulHttpMethodHelper
---
 .../isis/legacy/restclient/lib/ClientRequestConfigurer.java    | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/legacy/vro/restclient/src/main/java/org/apache/isis/legacy/restclient/lib/ClientRequestConfigurer.java b/legacy/vro/restclient/src/main/java/org/apache/isis/legacy/restclient/lib/ClientRequestConfigurer.java
index d9a3433..360d38d 100644
--- a/legacy/vro/restclient/src/main/java/org/apache/isis/legacy/restclient/lib/ClientRequestConfigurer.java
+++ b/legacy/vro/restclient/src/main/java/org/apache/isis/legacy/restclient/lib/ClientRequestConfigurer.java
@@ -105,7 +105,7 @@ public class ClientRequestConfigurer {
         for (final RequestParameter<?> requestParam : args.keySet()) {
             put(args, requestParam, argsAsMap);
         }
-        getHttpMethod().setUpArgs(this, argsAsMap);
+        setUpArgs(argsAsMap);
         return this;
     }
 
@@ -124,7 +124,7 @@ public class ClientRequestConfigurer {
             throw new IllegalStateException("Must set up http method first");
         }
 
-        getHttpMethod().setUpArgs(this, requestArgs);
+        setUpArgs(requestArgs);
         return this;
     }
 
@@ -167,9 +167,9 @@ public class ClientRequestConfigurer {
         return this;
     }
 
-    RestfulHttpMethodHelper getHttpMethod() {
-        final String httpMethod = clientRequest.getHttpMethod();
-        return RestfulHttpMethodHelper.valueOf(httpMethod);
+    private void setUpArgs(JsonRepresentation requestArgs) {
+        val httpMethodHelper = RestfulHttpMethodHelper.valueOf(clientRequest.getHttpMethod());
+        httpMethodHelper.setUpArgs(this, requestArgs);
     }
 
 }