[jira] [Commented] (SCB-189) support async restTemplate
[ https://issues.apache.org/jira/browse/SCB-189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16429695#comment-16429695 ] ASF GitHub Bot commented on SCB-189: liubao68 closed pull request #636: SCB-189 fix CI problems and warnings for feature support async restTe… URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/636 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/archetypes/business-service-jaxrs/src/main/java/org/apache/servicecomb/archetypes/HelloConsumer.java b/archetypes/business-service-jaxrs/src/main/java/org/apache/servicecomb/archetypes/HelloConsumer.java index 7007c1188..e1113838e 100644 --- a/archetypes/business-service-jaxrs/src/main/java/org/apache/servicecomb/archetypes/HelloConsumer.java +++ b/archetypes/business-service-jaxrs/src/main/java/org/apache/servicecomb/archetypes/HelloConsumer.java @@ -24,7 +24,7 @@ private final RestTemplate restTemplate = RestTemplateBuilder.create(); public void invokeHello(){ -String result = restTemplate.getForObject("cse://business-service/hello", String.class); +restTemplate.getForObject("cse://business-service/hello", String.class); } } diff --git a/providers/provider-springmvc/src/main/java/org/apache/servicecomb/provider/springmvc/reference/async/CseAsyncClientHttpRequest.java b/providers/provider-springmvc/src/main/java/org/apache/servicecomb/provider/springmvc/reference/async/CseAsyncClientHttpRequest.java index 1be86dc88..d66a0c639 100644 --- a/providers/provider-springmvc/src/main/java/org/apache/servicecomb/provider/springmvc/reference/async/CseAsyncClientHttpRequest.java +++ b/providers/provider-springmvc/src/main/java/org/apache/servicecomb/provider/springmvc/reference/async/CseAsyncClientHttpRequest.java @@ -50,12 +50,11 @@ public OutputStream getBody() { return null; } - @SuppressWarnings("unchecked") private ListenableFuture invoke(Object[] args) { Invocation invocation = prepareInvocation(args); invocation.getHandlerContext().put(RestConst.CONSUMER_HEADER, this.getHeaders()); CompletableFuture clientHttpResponseCompletableFuture = doAsyncInvoke(invocation); -return new CompletableToListenableFutureAdapter(clientHttpResponseCompletableFuture); +return new CompletableToListenableFutureAdapter(clientHttpResponseCompletableFuture); } protected CompletableFuture doAsyncInvoke(Invocation invocation) { diff --git a/providers/provider-springmvc/src/main/java/org/apache/servicecomb/provider/springmvc/reference/async/CseAsyncRestTemplate.java b/providers/provider-springmvc/src/main/java/org/apache/servicecomb/provider/springmvc/reference/async/CseAsyncRestTemplate.java index 6f16f997e..4bf1ba50d 100644 --- a/providers/provider-springmvc/src/main/java/org/apache/servicecomb/provider/springmvc/reference/async/CseAsyncRestTemplate.java +++ b/providers/provider-springmvc/src/main/java/org/apache/servicecomb/provider/springmvc/reference/async/CseAsyncRestTemplate.java @@ -34,14 +34,12 @@ public CseAsyncRestTemplate() { } @Override - @SuppressWarnings("unchecked") protected AsyncRequestCallback httpEntityCallback(HttpEntity requestBody) { -return new CseAsyncRequestCallback(requestBody); +return new CseAsyncRequestCallback(requestBody); } @Override - @SuppressWarnings("unchecked") protected AsyncRequestCallback httpEntityCallback(HttpEntity requestBody, Type responseType) { -return new CseAsyncRequestCallback(requestBody); +return new CseAsyncRequestCallback(requestBody); } } \ No newline at end of file diff --git a/providers/provider-springmvc/src/test/java/org/apache/servicecomb/provider/springmvc/reference/async/CseAsyncClientHttpRequestTest.java b/providers/provider-springmvc/src/test/java/org/apache/servicecomb/provider/springmvc/reference/async/CseAsyncClientHttpRequestTest.java index 4ae2bc703..35388cc7a 100644 --- a/providers/provider-springmvc/src/test/java/org/apache/servicecomb/provider/springmvc/reference/async/CseAsyncClientHttpRequestTest.java +++ b/providers/provider-springmvc/src/test/java/org/apache/servicecomb/provider/springmvc/reference/async/CseAsyncClientHttpRequestTest.java @@ -59,10 +59,10 @@ public void teardown() { ReferenceConfigUtils.setReady(false); } - @RequestMapping(path = "SpringmvcImpl") - static class SpringmvcImpl { -@RequestMapping(path = "/bytes", method = RequestMethod.POST) -public byte[] bytes(@RequestBody byte[] input) { + @RequestMapping(path = "CseAsyncClientHttpRequestTestSchema") + static class CseAsyncClientHttpRequestTestSchema { +@RequestMapping(path = "/testbytes", method = RequestMethod.POST) +public byte[]
[jira] [Commented] (SCB-189) support async restTemplate
[ https://issues.apache.org/jira/browse/SCB-189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16429682#comment-16429682 ] ASF GitHub Bot commented on SCB-189: wujimin commented on a change in pull request #636: SCB-189 fix CI problems and warnings for feature support async restTe… URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/636#discussion_r179940333 ## File path: providers/provider-springmvc/src/test/java/org/apache/servicecomb/provider/springmvc/reference/async/CseAsyncRequestCallbackTest.java ## @@ -28,27 +28,24 @@ @Test public void testNormal() { CseAsyncClientHttpRequest request = new CseAsyncClientHttpRequest(); -@SuppressWarnings("unchecked") -CseAsyncRequestCallback cb = new CseAsyncRequestCallback(null); +CseAsyncRequestCallbackcb = new CseAsyncRequestCallback (null); Review comment: sorry, copy lost information, i want to express "new CseAsyncRequestCallback<>(...)", no need to declare type again. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > support async restTemplate > -- > > Key: SCB-189 > URL: https://issues.apache.org/jira/browse/SCB-189 > Project: Apache ServiceComb > Issue Type: Sub-task > Components: Java-Chassis >Reporter: wujimin >Assignee: Bo Li >Priority: Major > Fix For: service-center-1.0.0-m2 > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-189) support async restTemplate
[ https://issues.apache.org/jira/browse/SCB-189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16429680#comment-16429680 ] ASF GitHub Bot commented on SCB-189: coveralls commented on issue #636: SCB-189 fix CI problems and warnings for feature support async restTe… URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/636#issuecomment-379521919 [![Coverage Status](https://coveralls.io/builds/16404148/badge)](https://coveralls.io/builds/16404148) Coverage remained the same at 87.605% when pulling **a2328483f934fa02ae951e233a4ff124a3b84dab on lijasonvip:scb-189** into **8a77e34365e786462b74826c724d10f0e735d5fe on apache:master**. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > support async restTemplate > -- > > Key: SCB-189 > URL: https://issues.apache.org/jira/browse/SCB-189 > Project: Apache ServiceComb > Issue Type: Sub-task > Components: Java-Chassis >Reporter: wujimin >Assignee: Bo Li >Priority: Major > Fix For: service-center-1.0.0-m2 > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-189) support async restTemplate
[ https://issues.apache.org/jira/browse/SCB-189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16429668#comment-16429668 ] ASF GitHub Bot commented on SCB-189: lijasonvip commented on a change in pull request #636: SCB-189 fix CI problems and warnings for feature support async restTe… URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/636#discussion_r179939355 ## File path: providers/provider-springmvc/src/test/java/org/apache/servicecomb/provider/springmvc/reference/async/CseAsyncClientHttpRequestTest.java ## @@ -61,8 +61,8 @@ public void teardown() { @RequestMapping(path = "SpringmvcImpl") static class SpringmvcImpl { Review comment: Agree, change class name would be easier. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > support async restTemplate > -- > > Key: SCB-189 > URL: https://issues.apache.org/jira/browse/SCB-189 > Project: Apache ServiceComb > Issue Type: Sub-task > Components: Java-Chassis >Reporter: wujimin >Assignee: Bo Li >Priority: Major > Fix For: service-center-1.0.0-m2 > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-189) support async restTemplate
[ https://issues.apache.org/jira/browse/SCB-189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16429667#comment-16429667 ] ASF GitHub Bot commented on SCB-189: lijasonvip commented on a change in pull request #636: SCB-189 fix CI problems and warnings for feature support async restTe… URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/636#discussion_r179939180 ## File path: providers/provider-springmvc/src/test/java/org/apache/servicecomb/provider/springmvc/reference/async/CseAsyncRequestCallbackTest.java ## @@ -28,27 +28,24 @@ @Test public void testNormal() { CseAsyncClientHttpRequest request = new CseAsyncClientHttpRequest(); -@SuppressWarnings("unchecked") -CseAsyncRequestCallback cb = new CseAsyncRequestCallback(null); +CseAsyncRequestCallbackcb = new CseAsyncRequestCallback (null); Review comment: As HttpEntity is still a raw type here, this could cause a warning again. how about `CseAsyncRequestCallback cb = new CseAsyncRequestCallback<>(null);` This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > support async restTemplate > -- > > Key: SCB-189 > URL: https://issues.apache.org/jira/browse/SCB-189 > Project: Apache ServiceComb > Issue Type: Sub-task > Components: Java-Chassis >Reporter: wujimin >Assignee: Bo Li >Priority: Major > Fix For: service-center-1.0.0-m2 > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-189) support async restTemplate
[ https://issues.apache.org/jira/browse/SCB-189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16429660#comment-16429660 ] ASF GitHub Bot commented on SCB-189: wujimin commented on a change in pull request #636: SCB-189 fix CI problems and warnings for feature support async restTe… URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/636#discussion_r179938700 ## File path: providers/provider-springmvc/src/test/java/org/apache/servicecomb/provider/springmvc/reference/async/CseAsyncClientHttpRequestTest.java ## @@ -61,8 +61,8 @@ public void teardown() { @RequestMapping(path = "SpringmvcImpl") static class SpringmvcImpl { Review comment: why not just change "SpringmvcImpl" to "CseAsyncClientHttpRequestTestSchema" This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > support async restTemplate > -- > > Key: SCB-189 > URL: https://issues.apache.org/jira/browse/SCB-189 > Project: Apache ServiceComb > Issue Type: Sub-task > Components: Java-Chassis >Reporter: wujimin >Assignee: Bo Li >Priority: Major > Fix For: service-center-1.0.0-m2 > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-189) support async restTemplate
[ https://issues.apache.org/jira/browse/SCB-189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16429661#comment-16429661 ] ASF GitHub Bot commented on SCB-189: coveralls commented on issue #636: SCB-189 fix CI problems and warnings for feature support async restTe… URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/636#issuecomment-379521919 [![Coverage Status](https://coveralls.io/builds/16403898/badge)](https://coveralls.io/builds/16403898) Coverage decreased (-0.006%) to 87.6% when pulling **cb5689963c1f9ceea533771230d4d7f9d98a9af9 on lijasonvip:scb-189** into **8a77e34365e786462b74826c724d10f0e735d5fe on apache:master**. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > support async restTemplate > -- > > Key: SCB-189 > URL: https://issues.apache.org/jira/browse/SCB-189 > Project: Apache ServiceComb > Issue Type: Sub-task > Components: Java-Chassis >Reporter: wujimin >Assignee: Bo Li >Priority: Major > Fix For: service-center-1.0.0-m2 > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-189) support async restTemplate
[ https://issues.apache.org/jira/browse/SCB-189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16429658#comment-16429658 ] ASF GitHub Bot commented on SCB-189: wujimin commented on a change in pull request #636: SCB-189 fix CI problems and warnings for feature support async restTe… URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/636#discussion_r179938611 ## File path: providers/provider-springmvc/src/test/java/org/apache/servicecomb/provider/springmvc/reference/async/CseAsyncRequestCallbackTest.java ## @@ -28,27 +28,24 @@ @Test public void testNormal() { CseAsyncClientHttpRequest request = new CseAsyncClientHttpRequest(); -@SuppressWarnings("unchecked") -CseAsyncRequestCallback cb = new CseAsyncRequestCallback(null); +CseAsyncRequestCallbackcb = new CseAsyncRequestCallback (null); Review comment: CseAsyncRequestCallback cb = new CseAsyncRequestCallback<>(null); This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > support async restTemplate > -- > > Key: SCB-189 > URL: https://issues.apache.org/jira/browse/SCB-189 > Project: Apache ServiceComb > Issue Type: Sub-task > Components: Java-Chassis >Reporter: wujimin >Assignee: Bo Li >Priority: Major > Fix For: service-center-1.0.0-m2 > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-189) support async restTemplate
[ https://issues.apache.org/jira/browse/SCB-189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16429651#comment-16429651 ] ASF GitHub Bot commented on SCB-189: lijasonvip commented on issue #636: SCB-189 fix CI problems and warnings for feature support async restTe… URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/636#issuecomment-379526718 ![no problems](https://user-images.githubusercontent.com/11032245/38464353-1f871c60-3b3f-11e8-92d4-f79f1d4c52c8.png) This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > support async restTemplate > -- > > Key: SCB-189 > URL: https://issues.apache.org/jira/browse/SCB-189 > Project: Apache ServiceComb > Issue Type: Sub-task > Components: Java-Chassis >Reporter: wujimin >Assignee: Bo Li >Priority: Major > Fix For: service-center-1.0.0-m2 > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-189) support async restTemplate
[ https://issues.apache.org/jira/browse/SCB-189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16429631#comment-16429631 ] ASF GitHub Bot commented on SCB-189: coveralls commented on issue #636: SCB-189 fix CI problems and warnings for feature support async restTe… URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/636#issuecomment-379521919 [![Coverage Status](https://coveralls.io/builds/16403409/badge)](https://coveralls.io/builds/16403409) Coverage decreased (-0.006%) to 87.6% when pulling **5e809f2ad8a44589ac526b9af6526483ede8da95 on lijasonvip:scb-189** into **8a77e34365e786462b74826c724d10f0e735d5fe on apache:master**. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > support async restTemplate > -- > > Key: SCB-189 > URL: https://issues.apache.org/jira/browse/SCB-189 > Project: Apache ServiceComb > Issue Type: Sub-task > Components: Java-Chassis >Reporter: wujimin >Assignee: Bo Li >Priority: Major > Fix For: service-center-1.0.0-m2 > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-189) support async restTemplate
[ https://issues.apache.org/jira/browse/SCB-189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16429603#comment-16429603 ] ASF GitHub Bot commented on SCB-189: lijasonvip opened a new pull request #636: SCB-189 fix CI problems and warnings for feature support async restTe… URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/636 …mplate Signed-off-by: lijasonvipFollow this checklist to help us incorporate your contribution quickly and easily: - [ ] Make sure there is a [JIRA issue](https://issues.apache.org/jira/browse/SCB) filed for the change (usually before you start working on it). Trivial changes like typos do not require a JIRA issue. Your pull request should address just this issue, without pulling in other changes. - [ ] Each commit in the pull request should have a meaningful subject line and body. - [ ] Format the pull request title like `[SCB-XXX] Fixes bug in ApproximateQuantiles`, where you replace `SCB-XXX` with the appropriate JIRA issue. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Run `mvn clean install` to make sure basic checks pass. A more thorough check will be performed on your pull request automatically. - [ ] If this contribution is large, please file an Apache [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf). --- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > support async restTemplate > -- > > Key: SCB-189 > URL: https://issues.apache.org/jira/browse/SCB-189 > Project: Apache ServiceComb > Issue Type: Sub-task > Components: Java-Chassis >Reporter: wujimin >Assignee: Bo Li >Priority: Major > Fix For: service-center-1.0.0-m2 > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-189) support async restTemplate
[ https://issues.apache.org/jira/browse/SCB-189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16425156#comment-16425156 ] Bo Li commented on SCB-189: --- This task is finished in SCB-379 https://issues.apache.org/jira/browse/SCB-379 Task SCB-379 is created because my carelessness. > support async restTemplate > -- > > Key: SCB-189 > URL: https://issues.apache.org/jira/browse/SCB-189 > Project: Apache ServiceComb > Issue Type: Sub-task > Components: Java-Chassis >Reporter: wujimin >Assignee: Bo Li >Priority: Major > Fix For: service-center-1.0.0-m2 > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)