Fix: Utility classes should not have public constructors (squid:S1118)

This commit is contained in:
Jano Svitok 2018-07-30 13:12:15 +02:00
parent aec31abf1f
commit 42f0de589b
2 changed files with 8 additions and 0 deletions

View File

@ -7,6 +7,10 @@ import java.io.OutputStream;
import java.nio.charset.Charset;
public class Stream {
private Stream() {
throw new IllegalStateException("Utility class");
}
public static void copy(InputStream in, OutputStream out) throws IOException {
byte[] buffer = new byte[1024 * 10];
int len;

View File

@ -1,6 +1,10 @@
package se.vidstige.jadb.managers;
public class Bash {
private Bash() {
throw new IllegalStateException("Utility class");
}
public static String quote(String s) {
// Check that s contains no whitespace
if (s.matches("\\S+")) {