[ 
https://issues.apache.org/jira/browse/SCB-579?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16480318#comment-16480318
 ] 

ASF GitHub Bot commented on SCB-579:
------------------------------------

yhs0092 commented on a change in pull request #714: [SCB-579] fix 
NullPointerException when consumer upload null file
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/714#discussion_r189192248
 
 

 ##########
 File path: 
common/common-rest/src/main/java/org/apache/servicecomb/common/rest/codec/param/RestClientRequestImpl.java
 ##########
 @@ -169,6 +173,10 @@ private void attachFile(String boundary, 
Iterator<Entry<String, Part>> uploadsIt
     // because pojo consumer not easy to set name to part
     String name = entry.getKey();
     Part part = entry.getValue();
+    if (null == part) {
 
 Review comment:
   Redundant null check has been removed. Please review 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:
[email protected]


> NullPointerException is thrown when consumer upload null
> --------------------------------------------------------
>
>                 Key: SCB-579
>                 URL: https://issues.apache.org/jira/browse/SCB-579
>             Project: Apache ServiceComb
>          Issue Type: Bug
>          Components: Java-Chassis
>            Reporter: YaoHaishi
>            Assignee: YaoHaishi
>            Priority: Major
>             Fix For: java-chassis-1.0.0-m2
>
>
> When consumer upload null file, there is a NullPointerException
> {quote}
> Caused by: java.lang.NullPointerException
> at 
> org.apache.servicecomb.common.rest.codec.param.RestClientRequestImpl.attachFile(RestClientRequestImpl.java:172)
> at 
> org.apache.servicecomb.common.rest.codec.param.RestClientRequestImpl.attachFiles(RestClientRequestImpl.java:157)
> at 
> org.apache.servicecomb.common.rest.codec.param.RestClientRequestImpl.doEndWithUpload(RestClientRequestImpl.java:109)
> at 
> org.apache.servicecomb.common.rest.codec.param.RestClientRequestImpl.end(RestClientRequestImpl.java:94)
> at 
> org.apache.servicecomb.transport.rest.client.http.VertxHttpMethod.lambda$doMethod$1(VertxHttpMethod.java:101)
> ... 7 more
> {quote}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to