Code changed. git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@526541 13f79535-47bb-0310-9956-ffa450edef68master
| @@ -22,6 +22,8 @@ | |||||
| */ | */ | ||||
| package org.apache.tools.ant.taskdefs.optional.jlink; | package org.apache.tools.ant.taskdefs.optional.jlink; | ||||
| import org.apache.tools.ant.util.FileUtils; | |||||
| import java.io.BufferedInputStream; | import java.io.BufferedInputStream; | ||||
| import java.io.File; | import java.io.File; | ||||
| import java.io.FileInputStream; | import java.io.FileInputStream; | ||||
| @@ -180,13 +182,7 @@ public class jlink { | |||||
| addFile(output, f, "", compression); | addFile(output, f, "", compression); | ||||
| } | } | ||||
| } | } | ||||
| if (output != null) { | |||||
| try { | |||||
| output.close(); | |||||
| } catch (IOException ioe) { | |||||
| //do nothing | |||||
| } | |||||
| } | |||||
| FileUtils.close(output); | |||||
| } | } | ||||
| @@ -58,7 +58,11 @@ public class JUnitVersionHelper { | |||||
| * @return the name of the test. | * @return the name of the test. | ||||
| */ | */ | ||||
| public static String getTestCaseName(Test t) { | public static String getTestCaseName(Test t) { | ||||
| if (t != null && t.getClass().getName().equals("junit.framework.JUnit4TestCaseFacade")) { | |||||
| if (t == null) | |||||
| { | |||||
| return "unknown"; | |||||
| } | |||||
| if (t.getClass().getName().equals("junit.framework.JUnit4TestCaseFacade")) { | |||||
| // Self-describing as of JUnit 4 (#38811). But trim "(ClassName)". | // Self-describing as of JUnit 4 (#38811). But trim "(ClassName)". | ||||
| String name = t.toString(); | String name = t.toString(); | ||||
| if (name.endsWith(")")) { | if (name.endsWith(")")) { | ||||