Skip to content

Commit f03411c

Browse files
rsafonsecayadvr
authored andcommitted
Fix 2 findbugs encoding warnings in VmwareContext.java StreamReaders should use encoding specified in the connection object
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com> This closes apache#405
1 parent 00cdd66 commit f03411c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎vmware-base/src/com/cloud/hypervisor/vmware/util/VmwareContext.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ public void uploadFile(String urlString, File localFile) throws Exception {
357357
}
358358
out.flush();
359359

360-
br = new BufferedReader(new InputStreamReader(conn.getInputStream()));
360+
br = new BufferedReader(new InputStreamReader(conn.getInputStream(),conn.getContentEncoding()));
361361
String line;
362362
while ((line = br.readLine()) != null) {
363363
if (s_logger.isTraceEnabled())
@@ -483,7 +483,7 @@ public void uploadResourceContent(String urlString, byte[] content) throws Excep
483483
out.write(content);
484484
out.flush();
485485

486-
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
486+
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream(),conn.getContentEncoding()));
487487
String line;
488488
while ((line = in.readLine()) != null) {
489489
if (s_logger.isTraceEnabled())

0 commit comments

Comments
 (0)