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!
This commit is contained in:
Kohsuke Kawaguchi
2015-08-15 07:17:15 -07:00
parent 2bcd99b14f
commit 839cb03690

View File

@@ -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 {