提交 4969ceda 编写于 作者: J Jerry Zhang 提交者: GitHub

Merge pull request #11 from...

Merge pull request #11 from DevFactory/release/classes-and-methods-that-rely-on-the-default-system-encoding-should-not-be-used-fix-1

Cleanup - squid:S1943 - Classes and methods that rely on the default …
...@@ -14,6 +14,8 @@ import org.tmatesoft.svn.core.wc.*; ...@@ -14,6 +14,8 @@ import org.tmatesoft.svn.core.wc.*;
import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;
import java.io.File; import java.io.File;
import java.io.UnsupportedEncodingException;
import java.nio.charset.StandardCharsets;
import java.util.Date; import java.util.Date;
...@@ -74,7 +76,7 @@ public class SVNHandler { ...@@ -74,7 +76,7 @@ public class SVNHandler {
SVNDepth.INFINITY, true, outputStream, null); SVNDepth.INFINITY, true, outputStream, null);
if (outputStream.size() > 0) { if (outputStream.size() > 0) {
commitClient.doCommit(xmlfilearray, false, outputStream.toString(), false, true); commitClient.doCommit(xmlfilearray, false, outputStream.toString("UTF-8"), false, true);
LOG.info("XML Checked in at " + new Date()); LOG.info("XML Checked in at " + new Date());
} }
...@@ -82,11 +84,11 @@ public class SVNHandler { ...@@ -82,11 +84,11 @@ public class SVNHandler {
SVNDepth.INFINITY, true, outputStream, null); SVNDepth.INFINITY, true, outputStream, null);
if (outputStream.size() > 0) { if (outputStream.size() > 0) {
commitClient.doCommit(jsonfilearray, false, outputStream.toString(), false, true); commitClient.doCommit(jsonfilearray, false, outputStream.toString("UTF-8"), false, true);
LOG.info("Json SVN Checked in at " + new Date()); LOG.info("Json SVN Checked in at " + new Date());
} }
} catch (SVNException e) { } catch (SVNException|UnsupportedEncodingException e) {
LOG.error(e.toString()); LOG.error(e.toString());
} finally { } finally {
ourClientManager.dispose(); ourClientManager.dispose();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册