From 839cb03690f75f1bc0c713751d0c1ce8eb0fedbb Mon Sep 17 00:00:00 2001 From: Kohsuke Kawaguchi Date: Sat, 15 Aug 2015 07:17:15 -0700 Subject: [PATCH] Overzealous FindBugs changes. String given without the encoding mandated by a protocol/design/etc should be converted with the platform default encoding. After all it exists for a reason! --- src/main/java/org/kohsuke/github/GHContent.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/kohsuke/github/GHContent.java b/src/main/java/org/kohsuke/github/GHContent.java index 0fbb59484..c79e00e38 100644 --- a/src/main/java/org/kohsuke/github/GHContent.java +++ b/src/main/java/org/kohsuke/github/GHContent.java @@ -163,12 +163,14 @@ public class GHContent { }; } + @SuppressFBWarnings("DM_DEFAULT_ENCODING") public GHContentUpdateResponse update(String newContent, String commitMessage) throws IOException { - return update(newContent.getBytes(getEncoding()), commitMessage, null); + return update(newContent.getBytes(), commitMessage, null); } + @SuppressFBWarnings("DM_DEFAULT_ENCODING") public GHContentUpdateResponse update(String newContent, String commitMessage, String branch) throws IOException { - return update(newContent.getBytes(getEncoding()), commitMessage, branch); + return update(newContent.getBytes(), commitMessage, branch); } public GHContentUpdateResponse update(byte[] newContentBytes, String commitMessage) throws IOException {