插入一段代码:
public static void initialize(Listener var0, String var1) throws ConfigError { try { label179: { String var3 = ""; BufferedReader var2 = new BufferedReader(new FileReader(new File(var1))); String var4 = null; boolean var5 = false; while((var4 = var2.readLine()) != null) { int var31; if ((var31 = var4.indexOf("SLF4JLogPropertiesFilePath=")) == 0) { var3 = var4.substring(var31 + "SLF4JLogPropertiesFilePath=".length(), var4.length()); if (!(new File(var3)).exists()) { System.err.println("can not find " + var3); System.exit(0); } break; } } boolean var10000; if (var3.equals("")) { if (!(new File("log4j.xml")).exists()) { var10000 = false; break label179; } var3 = "log4j.xml"; } PropertyConfigurator.configure(var3); var10000 = true; } } catch (IOException var24) { System.err.println("error during initialize Log"); }
方法中var1参数是一个文件名,调试断点在方法体红色代码处,代码运行到断点处时,var1显示的文件名是正确的,而且debug进入下一步时,直接跳到了绿色代码处,也就直接是抛了IO异常。这中间究竟发生了什么?如何解决这种问题?