所以我手上有点神秘。我将一些参数传递给一个方法,但该方法永远不会执行。我已经检查以确保所有参数本身都不为空。它甚至不执行方法中的第一行(一个简单的System.out.println()
)。知道问题可能是什么吗?
这是正在审查的方法:
public static void passedTest(String title, String startPhase, String endPhase,
String startTime, String endTime, long startMilli, long endMilli, String testNum) {
System.out.println("PASSED");
endMilli = System.currentTimeMillis();
totalLength += (endMilli - startMilli);
passedCount++;
try {
out.newLine();
out.write("Test Case " + testNum);
out.newLine();
out.newLine();
out.write(title + " --- " + startPhase.toUpperCase() + " to "
+ endPhase.toUpperCase());
out.newLine();
out.write("PASSED");
out.newLine();
out.write("__________________________________________");
out.newLine();
out.write("");
out.newLine();
out.write("\tSTARTED: " + startTime);
out.newLine();
out.write("\tENDED: " + endTime);
out.newLine();
out.write("\tDURATION: " + timeConverter(endMilli - startMilli));
out.newLine();
out.write("");
out.newLine();
out.write("--------------------------------------------------------------------------------------------------------------------------------------------------");
out.newLine();
out.write("--------------------------------------------------------------------------------------------------------------------------------------------------");
out.newLine();
} catch (IOException e) {
}
}