[ci skip] spotlessApply with the new settings

This commit is contained in:
Raven Szewczyk committed 2023-01-29 11:36:41 +00:00
1 parent 6b208b98bc
commit a309488cdf
214 files changed
+9283 -9265

No files matched your search

@@ -1,17 +1,17 @@
package minetweaker.api.logger;
import minetweaker.runtime.ILogger;
import java.io.*;
import java.util.regex.Pattern;
import minetweaker.runtime.ILogger;
/**
* @author Stan Hebben
*/
public class FileLogger implements ILogger {
private static final Pattern FORMATTING_CODE_PATTERN = Pattern.compile("(?i)" + String.valueOf('\u00a7') + "[0-9A-FK-OR]");
private static final Pattern FORMATTING_CODE_PATTERN = Pattern
.compile("(?i)" + String.valueOf('\u00a7') + "[0-9A-FK-OR]");
private final Writer writer;
private final PrintWriter printWriter;
@@ -19,9 +19,9 @@ public class FileLogger implements ILogger {
try {
writer = new OutputStreamWriter(new FileOutputStream(output), "utf-8");
printWriter = new PrintWriter(writer);
} catch(UnsupportedEncodingException ex) {
} catch (UnsupportedEncodingException ex) {
throw new RuntimeException("What the heck?");
} catch(FileNotFoundException ex) {
} catch (FileNotFoundException ex) {
throw new RuntimeException("Could not open log file " + output);
}
}
@@ -31,7 +31,7 @@ public class FileLogger implements ILogger {
try {
writer.write(stripMessage(message) + "\n");
writer.flush();
} catch(IOException ex) {
} catch (IOException ex) {
throw new RuntimeException(ex);
}
}
@@ -41,7 +41,7 @@ public class FileLogger implements ILogger {
try {
writer.write("INFO: " + stripMessage(message) + "\n");
writer.flush();
} catch(IOException ex) {
} catch (IOException ex) {
throw new RuntimeException(ex);
}
}
@@ -51,7 +51,7 @@ public class FileLogger implements ILogger {
try {
writer.write("WARNING: " + stripMessage(message) + "\n");
writer.flush();
} catch(IOException ex) {
} catch (IOException ex) {
throw new RuntimeException(ex);
}
}
@@ -65,11 +65,11 @@ public class FileLogger implements ILogger {
public void logError(String message, Throwable exception) {
try {
writer.write("ERROR: " + stripMessage(message) + "\n");
if(exception != null) {
if (exception != null) {
exception.printStackTrace(printWriter);
}
writer.flush();
} catch(IOException ex) {
} catch (IOException ex) {
throw new RuntimeException(ex);
}
}