Browse Source

Don't let ForkDefinition, in confined package, have a compile dependency on classes outside that package

master
Jaikiran Pai 6 years ago
parent
commit
83aa80729a
2 changed files with 4 additions and 3 deletions
  1. +3
    -2
      src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/confined/ForkDefinition.java
  2. +1
    -1
      src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/confined/package-info.java

+ 3
- 2
src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/confined/ForkDefinition.java View File

@@ -20,7 +20,6 @@ package org.apache.tools.ant.taskdefs.optional.junitlauncher.confined;

import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Project;
import org.apache.tools.ant.taskdefs.optional.junitlauncher.StandaloneLauncher;
import org.apache.tools.ant.types.Commandline;
import org.apache.tools.ant.types.CommandlineJava;
import org.apache.tools.ant.types.Environment;
@@ -33,6 +32,8 @@ import org.apache.tools.ant.types.PropertySet;
*/
public class ForkDefinition {

private static final String STANDALONE_LAUNCHER_CLASS_NAME = "org.apache.tools.ant.taskdefs.optional.junitlauncher.StandaloneLauncher";

private boolean includeAntRuntimeLibraries = true;
private boolean includeJUnitPlatformLibraries = true;

@@ -114,7 +115,7 @@ public class ForkDefinition {
} catch (CloneNotSupportedException e) {
throw new BuildException(e);
}
cmdLine.setClassname(StandaloneLauncher.class.getName());
cmdLine.setClassname(STANDALONE_LAUNCHER_CLASS_NAME);
// VM arguments
final Project project = task.getProject();
final ClassLoader taskClassLoader = task.getClass().getClassLoader();


+ 1
- 1
src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/confined/package-info.java View File

@@ -20,7 +20,7 @@
* have any compile time dependency on any of JUnit platform or
* engine classes/interfaces. They <em>must not</em> even have any
* compile time dependency on any classes/interfaces that belong to the
* {@link org.apache.tools.ant.taskdefs.optional.junitlauncher} package.
* {@code org.apache.tools.ant.taskdefs.optional.junitlauncher} package.
*
* @since Ant 1.10.6
*/

Loading…
Cancel
Save