mirror of
https://github.com/chylex/Java-Checker.git
synced 2025-05-23 12:34:05 +02:00
Fix code formatting (missing spaces after commas)
This commit is contained in:
parent
513e180108
commit
38ae8da593
src/main/java/chylex/javacheck
@ -20,12 +20,12 @@ public final class JavaCheckerReporter{
|
||||
}
|
||||
|
||||
if (!GraphicsEnvironment.isHeadless() && ForgeCompatibility.isClientSide()){
|
||||
displayErrorPopup("Outdated Java",getHtmlReport(minVersion));
|
||||
displayErrorPopup("Outdated Java", getHtmlReport(minVersion));
|
||||
}
|
||||
}
|
||||
|
||||
private static void displayErrorPopup(String title, String contents){
|
||||
JEditorPane pane = new JEditorPane("text/html","<html><body style='font-family:Dialog;font-size:12;font-weight:bold'>"+contents+"</body></html>");
|
||||
JEditorPane pane = new JEditorPane("text/html", "<html><body style='font-family:Dialog;font-size:12;font-weight:bold'>"+contents+"</body></html>");
|
||||
pane.setBackground(new JLabel().getBackground());
|
||||
pane.setEditable(false);
|
||||
|
||||
@ -42,7 +42,7 @@ public final class JavaCheckerReporter{
|
||||
}
|
||||
});
|
||||
|
||||
JOptionPane.showMessageDialog(null,pane,title,JOptionPane.ERROR_MESSAGE);
|
||||
JOptionPane.showMessageDialog(null, pane, title, JOptionPane.ERROR_MESSAGE);
|
||||
}
|
||||
|
||||
private static String getConsoleReport(JavaVersion minVersion){
|
||||
|
@ -7,18 +7,18 @@ import java.util.List;
|
||||
public final class ForgeCompatibility{
|
||||
public static boolean tryLog(String data){
|
||||
try{
|
||||
org.apache.logging.log4j.LogManager.getLogger("JavaChecker").log(org.apache.logging.log4j.Level.ERROR,data);
|
||||
org.apache.logging.log4j.LogManager.getLogger("JavaChecker").log(org.apache.logging.log4j.Level.ERROR, data);
|
||||
return true;
|
||||
}catch(Throwable t){ // apache logging is not available
|
||||
t.printStackTrace();
|
||||
}
|
||||
|
||||
try{
|
||||
Class relaunchLog = findFMLClass("relaunch","FMLRelaunchLog");
|
||||
Method logSevere = findMethod(relaunchLog,"severe",String.class,Object[].class);
|
||||
Class relaunchLog = findFMLClass("relaunch", "FMLRelaunchLog");
|
||||
Method logSevere = findMethod(relaunchLog, "severe", String.class, Object[].class);
|
||||
|
||||
if (logSevere != null){
|
||||
logSevere.invoke(null,data,new Object[0]);
|
||||
logSevere.invoke(null, data, new Object[0]);
|
||||
return true;
|
||||
}
|
||||
}catch(Throwable t){ // relaunch log not available
|
||||
@ -30,9 +30,9 @@ public final class ForgeCompatibility{
|
||||
|
||||
public static boolean tryResetModState(){
|
||||
try{
|
||||
Class cmm = findFMLClass("relauncher","CoreModManager");
|
||||
Method getCoremods = findMethodAlt(cmm,new String[]{ "getLoadedCoremods", "getIgnoredMods" });
|
||||
Method getReparsed = findMethodAlt(cmm,new String[]{ "getReparseableCoremods" });
|
||||
Class cmm = findFMLClass("relauncher", "CoreModManager");
|
||||
Method getCoremods = findMethodAlt(cmm, new String[]{ "getLoadedCoremods", "getIgnoredMods" });
|
||||
Method getReparsed = findMethodAlt(cmm, new String[]{ "getReparseableCoremods" });
|
||||
|
||||
if (getCoremods == null || getReparsed == null)return false;
|
||||
|
||||
@ -76,7 +76,7 @@ public final class ForgeCompatibility{
|
||||
if (cls == null)return null;
|
||||
|
||||
try{
|
||||
return cls.getMethod(methodName,params);
|
||||
return cls.getMethod(methodName, params);
|
||||
}catch(NoSuchMethodException e){}
|
||||
|
||||
return null;
|
||||
@ -87,7 +87,7 @@ public final class ForgeCompatibility{
|
||||
|
||||
for(String methodName:methodNames){
|
||||
try{
|
||||
return cls.getMethod(methodName,params);
|
||||
return cls.getMethod(methodName, params);
|
||||
}catch(NoSuchMethodException e){}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user