Browse Source

Merge branch '1.9.x'

master
Stefan Bodewig 8 years ago
parent
commit
1bc100ff05
3 changed files with 10 additions and 10 deletions
  1. +2
    -2
      manual/Tasks/junit.html
  2. +1
    -1
      src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java
  3. +7
    -7
      src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java

+ 2
- 2
manual/Tasks/junit.html View File

@@ -376,7 +376,7 @@ subelement.</p>
<p>The location of modules can be specified using this <a href="../using.html#path">PATH like structure</a>.<br/> <p>The location of modules can be specified using this <a href="../using.html#path">PATH like structure</a>.<br/>
The modulepath requires <i>fork</i> to be set to <code>true</code>. The modulepath requires <i>fork</i> to be set to <code>true</code>.


<p><em>since Ant 1.10.0</em></p>
<p><em>since Ant 1.9.8</em></p>


<h4>upgrademodulepath</h4> <h4>upgrademodulepath</h4>


@@ -384,7 +384,7 @@ The modulepath requires <i>fork</i> to be set to <code>true</code>.
can be specified using this <a href="../using.html#path">PATH like structure</a>.<br/> can be specified using this <a href="../using.html#path">PATH like structure</a>.<br/>
The upgrademodulepath requires <i>fork</i> to be set to <code>true</code>. The upgrademodulepath requires <i>fork</i> to be set to <code>true</code>.


<p><em>since Ant 1.10.0</em></p>
<p><em>since Ant 1.9.8</em></p>


<h4>formatter</h4> <h4>formatter</h4>




+ 1
- 1
src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java View File

@@ -411,7 +411,7 @@ public abstract class DefaultCompilerAdapter
} }
final Path ump = getUpgrademodulepath(); final Path ump = getUpgrademodulepath();
if (ump.size() > 0) { if (ump.size() > 0) {
cmd.createArgument().setValue("-upgrademodulepath");
cmd.createArgument().setValue("--upgrade-module-path");
cmd.createArgument().setPath(ump); cmd.createArgument().setPath(ump);
} }
if (attributes.getNativeHeaderDir() != null) { if (attributes.getNativeHeaderDir() != null) {


+ 7
- 7
src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java View File

@@ -515,7 +515,7 @@ public class JUnitTask extends Task {
* Add a path to the modulepath. * Add a path to the modulepath.
* *
* @return created modulepath. * @return created modulepath.
* @since 1.10.0
* @since 1.9.8
*/ */
public Path createModulepath() { public Path createModulepath() {
return getCommandline().createModulepath(getProject()).createPath(); return getCommandline().createModulepath(getProject()).createPath();
@@ -525,7 +525,7 @@ public class JUnitTask extends Task {
* Add a path to the upgrademodulepath. * Add a path to the upgrademodulepath.
* *
* @return created upgrademodulepath. * @return created upgrademodulepath.
* @since 1.10.0
* @since 1.9.8
*/ */
public Path createUpgrademodulepath() { public Path createUpgrademodulepath() {
return getCommandline().createUpgrademodulepath(getProject()).createPath(); return getCommandline().createUpgrademodulepath(getProject()).createPath();
@@ -1718,7 +1718,7 @@ public class JUnitTask extends Task {


/** /**
* Checks a validity of module specific options. * Checks a validity of module specific options.
* @since 1.10.0
* @since 1.9.8
*/ */
private void checkModules() { private void checkModules() {
if (hasPath(getCommandline().getModulepath()) || if (hasPath(getCommandline().getModulepath()) ||
@@ -1740,7 +1740,7 @@ public class JUnitTask extends Task {
* Checks is a junit is on given path. * Checks is a junit is on given path.
* @param path the {@link Path} to check * @param path the {@link Path} to check
* @return true when given {@link Path} contains junit * @return true when given {@link Path} contains junit
* @since 1.10.0
* @since 1.9.8
*/ */
private boolean hasJunit(final Path path) { private boolean hasJunit(final Path path) {
try (AntClassLoader loader = AntClassLoader.newAntClassLoader( try (AntClassLoader loader = AntClassLoader.newAntClassLoader(
@@ -1761,7 +1761,7 @@ public class JUnitTask extends Task {
* Expands a module path to flat path of jars and root folders usable by classloader. * Expands a module path to flat path of jars and root folders usable by classloader.
* @param modulePath to be expanded * @param modulePath to be expanded
* @return the expanded path * @return the expanded path
* @since 1.10.0
* @since 1.9.8
*/ */
private Path expandModulePath(Path modulePath) { private Path expandModulePath(Path modulePath) {
final Path expanded = new Path(getProject()); final Path expanded = new Path(getProject());
@@ -2380,7 +2380,7 @@ public class JUnitTask extends Task {
* Checks if a path exists and is non empty. * Checks if a path exists and is non empty.
* @param path to be checked * @param path to be checked
* @return true if the path is non <code>null</code> and non empty. * @return true if the path is non <code>null</code> and non empty.
* @since 1.10.0
* @since 1.9.8
*/ */
private static boolean hasPath(final Path path) { private static boolean hasPath(final Path path) {
return path != null && path.size() > 0; return path != null && path.size() > 0;
@@ -2390,7 +2390,7 @@ public class JUnitTask extends Task {
* Checks if a given folder is an unpacked module. * Checks if a given folder is an unpacked module.
* @param root the fodler to be checked * @param root the fodler to be checked
* @return true if the root is an unpacked module * @return true if the root is an unpacked module
* @since 1.10.0
* @since 1.9.8
*/ */
private static boolean hasModuleInfo(final File root) { private static boolean hasModuleInfo(final File root) {
return new File(root, "module-info.class").exists(); //NOI18N return new File(root, "module-info.class").exists(); //NOI18N


Loading…
Cancel
Save