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

ningjiang pushed a commit to branch master
in repository 
https://gitbox.apache.org/repos/asf/incubator-servicecomb-java-chassis.git

commit 1c9e31dd7440bf9a05c929f84bd81775def7c17f
Author: wujimin <[email protected]>
AuthorDate: Wed Dec 13 10:47:31 2017 +0800

    JAV-548 fix springmvc upload bug, avoid sample not close inputstream
---
 integration-tests/springmvc-tests/pom.xml                            | 4 ----
 .../demo/springmvc/tests/endpoints/CodeFirstSpringmvcBase.java       | 5 ++++-
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/integration-tests/springmvc-tests/pom.xml 
b/integration-tests/springmvc-tests/pom.xml
index 692554f..f376446 100644
--- a/integration-tests/springmvc-tests/pom.xml
+++ b/integration-tests/springmvc-tests/pom.xml
@@ -40,10 +40,6 @@
     </dependency>
     <dependency>
       <groupId>io.servicecomb</groupId>
-      <artifactId>provider-rest-common</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>io.servicecomb</groupId>
       <artifactId>provider-springmvc</artifactId>
     </dependency>
   </dependencies>
diff --git 
a/integration-tests/springmvc-tests/src/test/java/io/servicecomb/demo/springmvc/tests/endpoints/CodeFirstSpringmvcBase.java
 
b/integration-tests/springmvc-tests/src/test/java/io/servicecomb/demo/springmvc/tests/endpoints/CodeFirstSpringmvcBase.java
index 6f73b33..35d6266 100644
--- 
a/integration-tests/springmvc-tests/src/test/java/io/servicecomb/demo/springmvc/tests/endpoints/CodeFirstSpringmvcBase.java
+++ 
b/integration-tests/springmvc-tests/src/test/java/io/servicecomb/demo/springmvc/tests/endpoints/CodeFirstSpringmvcBase.java
@@ -18,6 +18,7 @@
 package io.servicecomb.demo.springmvc.tests.endpoints;
 
 import java.io.IOException;
+import java.nio.charset.StandardCharsets;
 import java.util.Date;
 import java.util.List;
 import java.util.Map;
@@ -76,7 +77,9 @@ public class CodeFirstSpringmvcBase {
 
   public String fileUpload(MultipartFile file1, MultipartFile file2, String 
name) {
     try {
-      return IOUtils.toString(file1.getInputStream()) + 
IOUtils.toString(file2.getInputStream()) + name;
+      return IOUtils.toString(file1.getBytes(), StandardCharsets.UTF_8.name())
+          + IOUtils.toString(file2.getBytes(), StandardCharsets.UTF_8.name())
+          + name;
     } catch (IOException e) {
       throw new IllegalArgumentException(e);
     }

-- 
To stop receiving notification emails like this one, please contact
"[email protected]" <[email protected]>.

Reply via email to