Try to improve consistency
- Makes code formatting more consistent with the C++ codebase. Probably removes some trailing whitespace. Maybe it would be best to commit an Eclipse or IntelliJ code format preferences file? - Removes obscure suppressions. I personally think it's better to only suppress warnings that javac complains about. Suppressing a lot of non-standardised warnings (many of them turned off by default even in IntelliJ) just creates needless clutter. - Fixes some trivial warnings instead of suppressing them. serialVersionUID is sort of stupid, but I'd rather mentally ignore it or just fix it if it's really that annoying. Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
@ -55,7 +55,6 @@
|
||||
|
||||
package org.prismlauncher;
|
||||
|
||||
|
||||
import org.prismlauncher.exception.ParseException;
|
||||
import org.prismlauncher.launcher.Launcher;
|
||||
import org.prismlauncher.launcher.LauncherFactory;
|
||||
@ -69,7 +68,6 @@ import java.nio.charset.StandardCharsets;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
|
||||
public final class EntryPoint {
|
||||
private static final Logger LOGGER = Logger.getLogger("EntryPoint");
|
||||
|
||||
@ -92,11 +90,11 @@ public final class EntryPoint {
|
||||
throw new ParseException("Unexpected empty string! You should not pass empty newlines to stdin.");
|
||||
|
||||
|
||||
if ("launch".equalsIgnoreCase(input)) {
|
||||
if ("launch".equalsIgnoreCase(input))
|
||||
return PreLaunchAction.LAUNCH;
|
||||
} else if ("abort".equalsIgnoreCase(input)) {
|
||||
else if ("abort".equalsIgnoreCase(input))
|
||||
return PreLaunchAction.ABORT;
|
||||
} else {
|
||||
else {
|
||||
String[] pair = StringUtils.splitStringPair(' ', input);
|
||||
if (pair == null)
|
||||
throw new ParseException(String.format(
|
||||
@ -119,11 +117,10 @@ public final class EntryPoint {
|
||||
|
||||
while (preLaunchAction == PreLaunchAction.PROCEED) {
|
||||
//noinspection NestedAssignment
|
||||
if ((line = reader.readLine()) != null) {
|
||||
if ((line = reader.readLine()) != null)
|
||||
preLaunchAction = parseLine(line, parameters);
|
||||
} else {
|
||||
else
|
||||
preLaunchAction = PreLaunchAction.ABORT;
|
||||
}
|
||||
}
|
||||
} catch (IOException | ParseException e) {
|
||||
LOGGER.log(Level.SEVERE, "Launcher abort due to exception", e);
|
||||
@ -165,7 +162,6 @@ public final class EntryPoint {
|
||||
ABORT
|
||||
}
|
||||
|
||||
|
||||
private enum ExitCode {
|
||||
NORMAL(0),
|
||||
ABORT(1),
|
||||
|
Reference in New Issue
Block a user