git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ant git commit: Tidy up the code


By and large I approve of these changes, but I felt compelled to express
the opinion that I do not believe adding else after if/continue does
anything to simplify the code. IMO it does the opposite.

Matt

On Thu, Apr 5, 2018, 1:15 AM <gintas@xxxxxxxxxx> wrote:

> Repository: ant
> Updated Branches:
>   refs/heads/master 845c2c5b3 -> 66d7986c3
>
>
> Tidy up the code
>
> Project: http://git-wip-us.apache.org/repos/asf/ant/repo
> Commit: http://git-wip-us.apache.org/repos/asf/ant/commit/66d7986c
> Tree: http://git-wip-us.apache.org/repos/asf/ant/tree/66d7986c
> Diff: http://git-wip-us.apache.org/repos/asf/ant/diff/66d7986c
>
> Branch: refs/heads/master
> Commit: 66d7986c3ad41040528a118052c4ef5b2e65ef89
> Parents: 845c2c5
> Author: Gintas Grigelionis <gintas@xxxxxxxxxx>
> Authored: Thu Apr 5 08:15:07 2018 +0200
> Committer: Gintas Grigelionis <gintas@xxxxxxxxxx>
> Committed: Thu Apr 5 08:15:07 2018 +0200
>
> ----------------------------------------------------------------------
>  src/main/org/apache/tools/ant/DirectoryScanner.java       |  1 +
>  src/main/org/apache/tools/ant/filters/ConcatFilter.java   |  8 +++-----
>  src/main/org/apache/tools/ant/filters/HeadFilter.java     |  8 +++-----
>  src/main/org/apache/tools/ant/filters/SortFilter.java     |  5 +----
>  src/main/org/apache/tools/ant/filters/TailFilter.java     |  8 +++-----
>  .../apache/tools/ant/filters/util/JavaClassHelper.java    |  1 -
>  src/main/org/apache/tools/ant/launch/Locator.java         |  9 ++++++---
>  src/main/org/apache/tools/ant/taskdefs/Expand.java        |  1 -
>  src/main/org/apache/tools/ant/taskdefs/Get.java           | 10 +++-------
>  src/main/org/apache/tools/ant/taskdefs/UpToDate.java      |  1 -
>  .../tools/ant/taskdefs/optional/RenameExtensions.java     |  1 +
>  .../tools/ant/taskdefs/optional/jdepend/JDependTask.java  |  2 ++
>  .../junitlauncher/AbstractJUnitResultFormatter.java       |  2 --
>  .../optional/junitlauncher/JUnitLauncherTask.java         |  2 --
>  .../junitlauncher/LegacyPlainResultFormatter.java         |  1 -
>  .../optional/junitlauncher/LegacyXmlResultFormatter.java  |  1 -
>  src/main/org/apache/tools/ant/types/Commandline.java      |  1 -
>  src/main/org/apache/tools/ant/types/CommandlineJava.java  |  1 -
>  src/main/org/apache/tools/ant/util/JavaEnvUtils.java      |  1 +
>  .../junit/org/apache/tools/ant/util/JavaEnvUtilsTest.java |  2 ++
>  20 files changed, 26 insertions(+), 40 deletions(-)
> ----------------------------------------------------------------------
>
>
>
> http://git-wip-us.apache.org/repos/asf/ant/blob/66d7986c/src/main/org/apache/tools/ant/DirectoryScanner.java
> ----------------------------------------------------------------------
> diff --git a/src/main/org/apache/tools/ant/DirectoryScanner.java
> b/src/main/org/apache/tools/ant/DirectoryScanner.java
> index 1a7a7e0..967c9ca 100644
> --- a/src/main/org/apache/tools/ant/DirectoryScanner.java
> +++ b/src/main/org/apache/tools/ant/DirectoryScanner.java
> @@ -613,6 +613,7 @@ public class DirectoryScanner
>       *
>       * @since Ant 1.6
>       */
> +    @SuppressWarnings("deprecated")
>      public static void resetDefaultExcludes() {
>          synchronized (defaultExcludes) {
>              defaultExcludes.clear();
>
>
> http://git-wip-us.apache.org/repos/asf/ant/blob/66d7986c/src/main/org/apache/tools/ant/filters/ConcatFilter.java
> ----------------------------------------------------------------------
> diff --git a/src/main/org/apache/tools/ant/filters/ConcatFilter.java
> b/src/main/org/apache/tools/ant/filters/ConcatFilter.java
> index 817572f..72b68f8 100644
> --- a/src/main/org/apache/tools/ant/filters/ConcatFilter.java
> +++ b/src/main/org/apache/tools/ant/filters/ConcatFilter.java
> @@ -192,13 +192,11 @@ public final class ConcatFilter extends
> BaseParamFilterReader
>          final Parameter[] params = getParameters();
>          if (params != null) {
>              for (Parameter param : params) {
> -                if ("prepend".equals(param.getName())) {
> +                final String paramName = param.getName();
> +                if ("prepend".equals(paramName)) {
>                      setPrepend(new File(param.getValue()));
> -                    continue;
> -                }
> -                if ("append".equals(param.getName())) {
> +                } else if ("append".equals(paramName)) {
>                      setAppend(new File(param.getValue()));
> -                    continue;
>                  }
>              }
>          }
>
>
> http://git-wip-us.apache.org/repos/asf/ant/blob/66d7986c/src/main/org/apache/tools/ant/filters/HeadFilter.java
> ----------------------------------------------------------------------
> diff --git a/src/main/org/apache/tools/ant/filters/HeadFilter.java
> b/src/main/org/apache/tools/ant/filters/HeadFilter.java
> index 29806b3..24e2403 100644
> --- a/src/main/org/apache/tools/ant/filters/HeadFilter.java
> +++ b/src/main/org/apache/tools/ant/filters/HeadFilter.java
> @@ -188,13 +188,11 @@ public final class HeadFilter extends
> BaseParamFilterReader
>          Parameter[] params = getParameters();
>          if (params != null) {
>              for (Parameter param : params) {
> -                if (LINES_KEY.equals(param.getName())) {
> +                final String paramName = param.getName();
> +                if (LINES_KEY.equals(paramName)) {
>                      lines = Long.parseLong(param.getValue());
> -                    continue;
> -                }
> -                if (SKIP_KEY.equals(param.getName())) {
> +                } else if (SKIP_KEY.equals(paramName)) {
>                      skip = Long.parseLong(param.getValue());
> -                    continue;
>                  }
>              }
>          }
>
>
> http://git-wip-us.apache.org/repos/asf/ant/blob/66d7986c/src/main/org/apache/tools/ant/filters/SortFilter.java
> ----------------------------------------------------------------------
> diff --git a/src/main/org/apache/tools/ant/filters/SortFilter.java
> b/src/main/org/apache/tools/ant/filters/SortFilter.java
> index ec682ef..60e0e93 100644
> --- a/src/main/org/apache/tools/ant/filters/SortFilter.java
> +++ b/src/main/org/apache/tools/ant/filters/SortFilter.java
> @@ -318,16 +318,13 @@ public final class SortFilter extends
> BaseParamFilterReader
>                  final String paramName = param.getName();
>                  if (REVERSE_KEY.equals(paramName)) {
>                      setReverse(Boolean.valueOf(param.getValue()));
> -                    continue;
> -                }
> -                if (COMPARATOR_KEY.equals(paramName)) {
> +                } else if (COMPARATOR_KEY.equals(paramName)) {
>                      try {
>                          String className = param.getValue();
>                          @SuppressWarnings("unchecked")
>                          final Comparator<? super String>
> comparatorInstance
>                                  = (Comparator<? super String>)
> (Class.forName(className).newInstance());
>                          setComparator(comparatorInstance);
> -                        continue;
>                      } catch (InstantiationException |
> ClassNotFoundException | IllegalAccessException e) {
>                          /*
>                           * IAE probably means an inner non-static class,
> that case is not considered
>
>
> http://git-wip-us.apache.org/repos/asf/ant/blob/66d7986c/src/main/org/apache/tools/ant/filters/TailFilter.java
> ----------------------------------------------------------------------
> diff --git a/src/main/org/apache/tools/ant/filters/TailFilter.java
> b/src/main/org/apache/tools/ant/filters/TailFilter.java
> index 26c3a57..7cad43e 100644
> --- a/src/main/org/apache/tools/ant/filters/TailFilter.java
> +++ b/src/main/org/apache/tools/ant/filters/TailFilter.java
> @@ -188,13 +188,11 @@ public final class TailFilter extends
> BaseParamFilterReader
>          Parameter[] params = getParameters();
>          if (params != null) {
>              for (Parameter param : params) {
> -                if (LINES_KEY.equals(param.getName())) {
> +                final String paramName = param.getName();
> +                if (LINES_KEY.equals(paramName)) {
>                      setLines(Long.parseLong(param.getValue()));
> -                    continue;
> -                }
> -                if (SKIP_KEY.equals(param.getName())) {
> +                } else if (SKIP_KEY.equals(paramName)) {
>                      skip = Long.parseLong(param.getValue());
> -                    continue;
>                  }
>              }
>          }
>
>
> http://git-wip-us.apache.org/repos/asf/ant/blob/66d7986c/src/main/org/apache/tools/ant/filters/util/JavaClassHelper.java
> ----------------------------------------------------------------------
> diff --git
> a/src/main/org/apache/tools/ant/filters/util/JavaClassHelper.java
> b/src/main/org/apache/tools/ant/filters/util/JavaClassHelper.java
> index 70d763f..23148e4 100644
> --- a/src/main/org/apache/tools/ant/filters/util/JavaClassHelper.java
> +++ b/src/main/org/apache/tools/ant/filters/util/JavaClassHelper.java
> @@ -23,7 +23,6 @@ import java.io.IOException;
>  import org.apache.bcel.classfile.ClassParser;
>  import org.apache.bcel.classfile.ConstantValue;
>  import org.apache.bcel.classfile.Field;
> -import org.apache.bcel.classfile.JavaClass;
>
>  // CheckStyle:HideUtilityClassConstructorCheck OFF - bc
>  /**
>
>
> http://git-wip-us.apache.org/repos/asf/ant/blob/66d7986c/src/main/org/apache/tools/ant/launch/Locator.java
> ----------------------------------------------------------------------
> diff --git a/src/main/org/apache/tools/ant/launch/Locator.java
> b/src/main/org/apache/tools/ant/launch/Locator.java
> index 11769aa..aee91c8 100644
> --- a/src/main/org/apache/tools/ant/launch/Locator.java
> +++ b/src/main/org/apache/tools/ant/launch/Locator.java
> @@ -17,6 +17,8 @@
>   */
>  package org.apache.tools.ant.launch;
>
> +import org.apache.tools.ant.util.FileUtils;
> +
>  import java.io.ByteArrayOutputStream;
>  import java.io.File;
>  import java.io.UnsupportedEncodingException;
> @@ -472,8 +474,9 @@ public final class Locator {
>       */
>      public static URL[] getLocationURLs(File location,
>                                          final String... extensions)
> -         throws MalformedURLException {
> +            throws MalformedURLException {
>          URL[] urls = new URL[0];
> +        FileUtils utils = FileUtils.getFileUtils();
>
>          if (!location.exists()) {
>              return urls;
> @@ -484,7 +487,7 @@ public final class Locator {
>              String littlePath = path.toLowerCase(Locale.ENGLISH);
>              for (String extension : extensions) {
>                  if (littlePath.endsWith(extension)) {
> -                    urls[0] = fileToURL(location);
> +                    urls[0] = utils.getFileURL(location);
>                      break;
>                  }
>              }
> @@ -496,7 +499,7 @@ public final class Locator {
>          });
>          urls = new URL[matches.length];
>          for (int i = 0; i < matches.length; ++i) {
> -            urls[i] = fileToURL(matches[i]);
> +            urls[i] = utils.getFileURL(matches[i]);
>          }
>          return urls;
>      }
>
>
> http://git-wip-us.apache.org/repos/asf/ant/blob/66d7986c/src/main/org/apache/tools/ant/taskdefs/Expand.java
> ----------------------------------------------------------------------
> diff --git a/src/main/org/apache/tools/ant/taskdefs/Expand.java
> b/src/main/org/apache/tools/ant/taskdefs/Expand.java
> index fb1141a..8a3aafc 100644
> --- a/src/main/org/apache/tools/ant/taskdefs/Expand.java
> +++ b/src/main/org/apache/tools/ant/taskdefs/Expand.java
> @@ -27,7 +27,6 @@ import java.nio.file.Files;
>  import java.util.Date;
>  import java.util.Enumeration;
>  import java.util.HashSet;
> -import java.util.Iterator;
>  import java.util.List;
>  import java.util.Set;
>  import java.util.Vector;
>
>
> http://git-wip-us.apache.org/repos/asf/ant/blob/66d7986c/src/main/org/apache/tools/ant/taskdefs/Get.java
> ----------------------------------------------------------------------
> diff --git a/src/main/org/apache/tools/ant/taskdefs/Get.java
> b/src/main/org/apache/tools/ant/taskdefs/Get.java
> index e920bde..af81a0c 100644
> --- a/src/main/org/apache/tools/ant/taskdefs/Get.java
> +++ b/src/main/org/apache/tools/ant/taskdefs/Get.java
> @@ -180,13 +180,9 @@ public class Get extends Task {
>      public boolean doGet(final int logLevel, final DownloadProgress
> progress)
>              throws IOException {
>          checkAttributes();
> -        for (final Resource r : sources) {
> -            final URLProvider up = r.as(URLProvider.class);
> -            final URL source = up.getURL();
> -            return doGet(source, destination, logLevel, progress);
> -        }
> -        /*NOTREACHED*/
> -        return false;
> +        return
> doGet(sources.iterator().next().as(URLProvider.class).getURL(),
> +                destination, logLevel, progress);
> +
>      }
>
>      /**
>
>
> http://git-wip-us.apache.org/repos/asf/ant/blob/66d7986c/src/main/org/apache/tools/ant/taskdefs/UpToDate.java
> ----------------------------------------------------------------------
> diff --git a/src/main/org/apache/tools/ant/taskdefs/UpToDate.java
> b/src/main/org/apache/tools/ant/taskdefs/UpToDate.java
> index 2c7fc1f..3e72f4f 100644
> --- a/src/main/org/apache/tools/ant/taskdefs/UpToDate.java
> +++ b/src/main/org/apache/tools/ant/taskdefs/UpToDate.java
> @@ -19,7 +19,6 @@
>  package org.apache.tools.ant.taskdefs;
>
>  import java.io.File;
> -import java.util.Iterator;
>  import java.util.List;
>  import java.util.Vector;
>
>
>
> http://git-wip-us.apache.org/repos/asf/ant/blob/66d7986c/src/main/org/apache/tools/ant/taskdefs/optional/RenameExtensions.java
> ----------------------------------------------------------------------
> diff --git
> a/src/main/org/apache/tools/ant/taskdefs/optional/RenameExtensions.java
> b/src/main/org/apache/tools/ant/taskdefs/optional/RenameExtensions.java
> index c4acadb..b1b27b9 100644
> --- a/src/main/org/apache/tools/ant/taskdefs/optional/RenameExtensions.java
> +++ b/src/main/org/apache/tools/ant/taskdefs/optional/RenameExtensions.java
> @@ -43,6 +43,7 @@ import org.apache.tools.ant.types.Mapper;
>   * @deprecated since 1.5.x.
>   *             Use &lt;move&gt; instead
>   */
> +@Deprecated
>  public class RenameExtensions extends MatchingTask {
>
>      private String fromExtension = "";
>
>
> http://git-wip-us.apache.org/repos/asf/ant/blob/66d7986c/src/main/org/apache/tools/ant/taskdefs/optional/jdepend/JDependTask.java
> ----------------------------------------------------------------------
> diff --git
> a/src/main/org/apache/tools/ant/taskdefs/optional/jdepend/JDependTask.java
> b/src/main/org/apache/tools/ant/taskdefs/optional/jdepend/JDependTask.java
> index 612e58c..18b7763 100644
> ---
> a/src/main/org/apache/tools/ant/taskdefs/optional/jdepend/JDependTask.java
> +++
> b/src/main/org/apache/tools/ant/taskdefs/optional/jdepend/JDependTask.java
> @@ -389,6 +389,7 @@ public class JDependTask extends Task {
>       * @exception BuildException if an error occurs
>       */
>      @Override
> +    @SuppressWarnings("deprecated")
>      public void execute() throws BuildException {
>
>          CommandlineJava commandline = new CommandlineJava();
> @@ -627,6 +628,7 @@ public class JDependTask extends Task {
>          return new ExecuteWatchdog(getTimeout());
>      }
>
> +    @SuppressWarnings("deprecated")
>      private Optional<Path> getWorkingPath() {
>          Optional<Path> result = Optional.ofNullable(getClassespath());
>          if (result.isPresent()) {
>
>
> http://git-wip-us.apache.org/repos/asf/ant/blob/66d7986c/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/AbstractJUnitResultFormatter.java
> ----------------------------------------------------------------------
> diff --git
> a/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/AbstractJUnitResultFormatter.java
> b/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/AbstractJUnitResultFormatter.java
> index 16ff97f..3188743 100644
> ---
> a/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/AbstractJUnitResultFormatter.java
> +++
> b/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/AbstractJUnitResultFormatter.java
> @@ -42,7 +42,6 @@ abstract class AbstractJUnitResultFormatter implements
> TestResultFormatter {
>              this.sysOutStore.store(data);
>          } catch (IOException e) {
>              handleException(e);
> -            return;
>          }
>      }
>
> @@ -55,7 +54,6 @@ abstract class AbstractJUnitResultFormatter implements
> TestResultFormatter {
>              this.sysErrStore.store(data);
>          } catch (IOException e) {
>              handleException(e);
> -            return;
>          }
>      }
>
>
>
> http://git-wip-us.apache.org/repos/asf/ant/blob/66d7986c/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/JUnitLauncherTask.java
> ----------------------------------------------------------------------
> diff --git
> a/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/JUnitLauncherTask.java
> b/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/JUnitLauncherTask.java
> index ac4ef44..c505ee0 100644
> ---
> a/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/JUnitLauncherTask.java
> +++
> b/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/JUnitLauncherTask.java
> @@ -394,7 +394,6 @@ public class JUnitLauncherTask extends Task {
>              } catch (IOException e) {
>                  task.log("Failed while streaming " + (this.streamType ==
> StreamType.SYS_OUT ? "sysout" : "syserr") + " data",
>                          e, Project.MSG_INFO);
> -                return;
>              } finally {
>                  streamContentDeliver.stop = true;
>                  // just "wakeup" the delivery thread, to take into account
> @@ -500,7 +499,6 @@ public class JUnitLauncherTask extends Task {
>                      closeAndWait(sysErr);
>                  } catch (InterruptedException e) {
>                      Thread.currentThread().interrupt();
> -                    return;
>                  }
>              }
>          }
>
>
> http://git-wip-us.apache.org/repos/asf/ant/blob/66d7986c/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/LegacyPlainResultFormatter.java
> ----------------------------------------------------------------------
> diff --git
> a/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/LegacyPlainResultFormatter.java
> b/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/LegacyPlainResultFormatter.java
> index 0e6dab7..15ae463 100644
> ---
> a/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/LegacyPlainResultFormatter.java
> +++
> b/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/LegacyPlainResultFormatter.java
> @@ -99,7 +99,6 @@ class LegacyPlainResultFormatter extends
> AbstractJUnitResultFormatter implements
>              }
>          } catch (IOException ioe) {
>              handleException(ioe);
> -            return;
>          }
>      }
>
>
>
> http://git-wip-us.apache.org/repos/asf/ant/blob/66d7986c/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/LegacyXmlResultFormatter.java
> ----------------------------------------------------------------------
> diff --git
> a/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/LegacyXmlResultFormatter.java
> b/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/LegacyXmlResultFormatter.java
> index 3a94a80..6ca2e51 100644
> ---
> a/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/LegacyXmlResultFormatter.java
> +++
> b/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/LegacyXmlResultFormatter.java
> @@ -61,7 +61,6 @@ class LegacyXmlResultFormatter extends
> AbstractJUnitResultFormatter implements T
>              new XMLReportWriter().write();
>          } catch (IOException | XMLStreamException e) {
>              handleException(e);
> -            return;
>          }
>      }
>
>
>
> http://git-wip-us.apache.org/repos/asf/ant/blob/66d7986c/src/main/org/apache/tools/ant/types/Commandline.java
> ----------------------------------------------------------------------
> diff --git a/src/main/org/apache/tools/ant/types/Commandline.java
> b/src/main/org/apache/tools/ant/types/Commandline.java
> index f843801..0ff63f8 100644
> --- a/src/main/org/apache/tools/ant/types/Commandline.java
> +++ b/src/main/org/apache/tools/ant/types/Commandline.java
> @@ -30,7 +30,6 @@ import java.util.stream.Stream;
>  import org.apache.tools.ant.BuildException;
>  import org.apache.tools.ant.ProjectComponent;
>  import org.apache.tools.ant.taskdefs.condition.Os;
> -import org.apache.tools.ant.util.StringUtils;
>
>  /**
>   * Commandline objects help handling command lines specifying processes to
>
>
> http://git-wip-us.apache.org/repos/asf/ant/blob/66d7986c/src/main/org/apache/tools/ant/types/CommandlineJava.java
> ----------------------------------------------------------------------
> diff --git a/src/main/org/apache/tools/ant/types/CommandlineJava.java
> b/src/main/org/apache/tools/ant/types/CommandlineJava.java
> index 3feaea6..c202a03 100644
> --- a/src/main/org/apache/tools/ant/types/CommandlineJava.java
> +++ b/src/main/org/apache/tools/ant/types/CommandlineJava.java
> @@ -18,7 +18,6 @@
>
>  package org.apache.tools.ant.types;
>
> -import java.util.Enumeration;
>  import java.util.LinkedList;
>  import java.util.List;
>  import java.util.ListIterator;
>
>
> http://git-wip-us.apache.org/repos/asf/ant/blob/66d7986c/src/main/org/apache/tools/ant/util/JavaEnvUtils.java
> ----------------------------------------------------------------------
> diff --git a/src/main/org/apache/tools/ant/util/JavaEnvUtils.java
> b/src/main/org/apache/tools/ant/util/JavaEnvUtils.java
> index b8cb9e1..fd00780 100644
> --- a/src/main/org/apache/tools/ant/util/JavaEnvUtils.java
> +++ b/src/main/org/apache/tools/ant/util/JavaEnvUtils.java
> @@ -279,6 +279,7 @@ public final class JavaEnvUtils {
>       * @return true if the version of Java is the same as the given
> version.
>       * @since Ant 1.5
>       */
> +    @SuppressWarnings("deprecated")
>      public static boolean isJavaVersion(String version) {
>          return javaVersion.equals(version)
>              || (javaVersion.equals(JAVA_9) && JAVA_1_9.equals(version));
>
>
> http://git-wip-us.apache.org/repos/asf/ant/blob/66d7986c/src/tests/junit/org/apache/tools/ant/util/JavaEnvUtilsTest.java
> ----------------------------------------------------------------------
> diff --git
> a/src/tests/junit/org/apache/tools/ant/util/JavaEnvUtilsTest.java
> b/src/tests/junit/org/apache/tools/ant/util/JavaEnvUtilsTest.java
> index d37d4a9..fcffdce 100644
> --- a/src/tests/junit/org/apache/tools/ant/util/JavaEnvUtilsTest.java
> +++ b/src/tests/junit/org/apache/tools/ant/util/JavaEnvUtilsTest.java
> @@ -124,6 +124,7 @@ public class JavaEnvUtilsTest {
>      }
>
>      @Test
> +    @SuppressWarnings("deprecated")
>      public void isJavaVersionSupportsBothVersionsOfJava9() {
>          assumeTrue(JavaEnvUtils.isJavaVersion(JavaEnvUtils.JAVA_9));
>          assertTrue("JAVA_1_9 is not considered equal to JAVA_9",
> @@ -131,6 +132,7 @@ public class JavaEnvUtilsTest {
>      }
>
>      @Test
> +    @SuppressWarnings("deprecated")
>      public void java10IsDetectedProperly() {
>
>  assumeTrue("10".equals(System.getProperty("java.specification.version")));
>          assertEquals("10", JavaEnvUtils.getJavaVersion());
>
>


( ! ) Warning: include(msgfooter.php): failed to open stream: No such file or directory in /var/www/git/apache-ant-development/msg01762.html on line 605
Call Stack
#TimeMemoryFunctionLocation
10.0010393240{main}( ).../msg01762.html:0

( ! ) Warning: include(): Failed opening 'msgfooter.php' for inclusion (include_path='.:/var/www/git') in /var/www/git/apache-ant-development/msg01762.html on line 605
Call Stack
#TimeMemoryFunctionLocation
10.0010393240{main}( ).../msg01762.html:0