mirror of
https://github.com/chylex/Java-Checker.git
synced 2025-06-17 06:39:56 +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()){
|
if (!GraphicsEnvironment.isHeadless() && ForgeCompatibility.isClientSide()){
|
||||||
displayErrorPopup("Outdated Java",getHtmlReport(minVersion));
|
displayErrorPopup("Outdated Java", getHtmlReport(minVersion));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void displayErrorPopup(String title, String contents){
|
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.setBackground(new JLabel().getBackground());
|
||||||
pane.setEditable(false);
|
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){
|
private static String getConsoleReport(JavaVersion minVersion){
|
||||||
|
@ -7,18 +7,18 @@ import java.util.List;
|
|||||||
public final class ForgeCompatibility{
|
public final class ForgeCompatibility{
|
||||||
public static boolean tryLog(String data){
|
public static boolean tryLog(String data){
|
||||||
try{
|
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;
|
return true;
|
||||||
}catch(Throwable t){ // apache logging is not available
|
}catch(Throwable t){ // apache logging is not available
|
||||||
t.printStackTrace();
|
t.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
try{
|
try{
|
||||||
Class relaunchLog = findFMLClass("relaunch","FMLRelaunchLog");
|
Class relaunchLog = findFMLClass("relaunch", "FMLRelaunchLog");
|
||||||
Method logSevere = findMethod(relaunchLog,"severe",String.class,Object[].class);
|
Method logSevere = findMethod(relaunchLog, "severe", String.class, Object[].class);
|
||||||
|
|
||||||
if (logSevere != null){
|
if (logSevere != null){
|
||||||
logSevere.invoke(null,data,new Object[0]);
|
logSevere.invoke(null, data, new Object[0]);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}catch(Throwable t){ // relaunch log not available
|
}catch(Throwable t){ // relaunch log not available
|
||||||
@ -30,9 +30,9 @@ public final class ForgeCompatibility{
|
|||||||
|
|
||||||
public static boolean tryResetModState(){
|
public static boolean tryResetModState(){
|
||||||
try{
|
try{
|
||||||
Class cmm = findFMLClass("relauncher","CoreModManager");
|
Class cmm = findFMLClass("relauncher", "CoreModManager");
|
||||||
Method getCoremods = findMethodAlt(cmm,new String[]{ "getLoadedCoremods", "getIgnoredMods" });
|
Method getCoremods = findMethodAlt(cmm, new String[]{ "getLoadedCoremods", "getIgnoredMods" });
|
||||||
Method getReparsed = findMethodAlt(cmm,new String[]{ "getReparseableCoremods" });
|
Method getReparsed = findMethodAlt(cmm, new String[]{ "getReparseableCoremods" });
|
||||||
|
|
||||||
if (getCoremods == null || getReparsed == null)return false;
|
if (getCoremods == null || getReparsed == null)return false;
|
||||||
|
|
||||||
@ -76,7 +76,7 @@ public final class ForgeCompatibility{
|
|||||||
if (cls == null)return null;
|
if (cls == null)return null;
|
||||||
|
|
||||||
try{
|
try{
|
||||||
return cls.getMethod(methodName,params);
|
return cls.getMethod(methodName, params);
|
||||||
}catch(NoSuchMethodException e){}
|
}catch(NoSuchMethodException e){}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
@ -87,7 +87,7 @@ public final class ForgeCompatibility{
|
|||||||
|
|
||||||
for(String methodName:methodNames){
|
for(String methodName:methodNames){
|
||||||
try{
|
try{
|
||||||
return cls.getMethod(methodName,params);
|
return cls.getMethod(methodName, params);
|
||||||
}catch(NoSuchMethodException e){}
|
}catch(NoSuchMethodException e){}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user