From 2fd6804db8aebfe6634e4df7d5e5c71fe856d4f6 Mon Sep 17 00:00:00 2001 From: Alexander Kriegisch Date: Sun, 14 Mar 2021 00:09:02 +0700 Subject: Fix 'ajdoc' tests for Java 15 build Signed-off-by: Alexander Kriegisch --- .../java/org/aspectj/ajdt/ajc/BuildArgParser.java | 28 +++++++++++----------- .../internal/compiler/batch/CommandTestCase.java | 22 ++++++++--------- .../java/org/aspectj/tools/ajc/AjcTestCase.java | 2 +- 3 files changed, 26 insertions(+), 26 deletions(-) (limited to 'org.aspectj.ajdt.core') diff --git a/org.aspectj.ajdt.core/src/main/java/org/aspectj/ajdt/ajc/BuildArgParser.java b/org.aspectj.ajdt.core/src/main/java/org/aspectj/ajdt/ajc/BuildArgParser.java index 7717355bf..be594860b 100644 --- a/org.aspectj.ajdt.core/src/main/java/org/aspectj/ajdt/ajc/BuildArgParser.java +++ b/org.aspectj.ajdt.core/src/main/java/org/aspectj/ajdt/ajc/BuildArgParser.java @@ -1,13 +1,13 @@ /* ******************************************************************* * Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC). - * All rights reserved. - * This program and the accompanying materials are made available - * under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * PARC initial implementation + * All rights reserved. + * This program and the accompanying materials are made available + * under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * PARC initial implementation * ******************************************************************/ package org.aspectj.ajdt.ajc; @@ -364,7 +364,7 @@ public class BuildArgParser extends Main { List ret = new ArrayList<>(); if (parser.bootclasspath == null) { - if (LangUtil.is19VMOrGreater()) { + if (LangUtil.is9VMOrGreater()) { addClasspath(LangUtil.getJrtFsFilePath(),ret); } else { addClasspath(System.getProperty("sun.boot.class.path", ""), ret); @@ -374,7 +374,7 @@ public class BuildArgParser extends Main { } return ret; } - + public List getModulepath(AjcConfigParser parser) { List ret = new ArrayList<>(); addClasspath(parser.modulepath, ret); @@ -391,7 +391,7 @@ public class BuildArgParser extends Main { public ArrayList handleClasspath(ArrayList classpaths, String customEncoding) { return super.handleClasspath(classpaths, customEncoding); } - + /** * If the classpath is not set, we use the environment's java.class.path, but remove the aspectjtools.jar entry from that list * in order to prevent wierd bootstrap issues (refer to bug#39959). @@ -474,7 +474,7 @@ public class BuildArgParser extends Main { public List getUnparsedArgs() { return unparsedArgs; } - + public String getModuleInfoArgument() { return this.moduleInfoArgument; } @@ -914,12 +914,12 @@ public class BuildArgParser extends Main { } } - + @Override public boolean checkVMVersion(long minimalSupportedVersion) { return super.checkVMVersion(minimalSupportedVersion); } - + @Override public void initRootModules(LookupEnvironment environment, FileSystem fileSystem) { super.initRootModules(environment, fileSystem); diff --git a/org.aspectj.ajdt.core/src/test/java/org/aspectj/ajdt/internal/compiler/batch/CommandTestCase.java b/org.aspectj.ajdt.core/src/test/java/org/aspectj/ajdt/internal/compiler/batch/CommandTestCase.java index 78b82d223..daa23dd98 100644 --- a/org.aspectj.ajdt.core/src/test/java/org/aspectj/ajdt/internal/compiler/batch/CommandTestCase.java +++ b/org.aspectj.ajdt.core/src/test/java/org/aspectj/ajdt/internal/compiler/batch/CommandTestCase.java @@ -1,13 +1,13 @@ /* ******************************************************************* * Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC). - * All rights reserved. - * This program and the accompanying materials are made available - * under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * PARC initial implementation + * All rights reserved. + * This program and the accompanying materials are made available + * under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * PARC initial implementation * ******************************************************************/ package org.aspectj.ajdt.internal.compiler.batch; @@ -33,7 +33,7 @@ public abstract class CommandTestCase extends TestCase { /** * Constructor for CommandTestCase. - * + * * @param name */ public CommandTestCase(String name) { @@ -52,7 +52,7 @@ public abstract class CommandTestCase extends TestCase { protected void runMain(String className) { TestUtil.runMain(getSandboxName(), className); } - + public void checkCompile(String source, String[] extraArgs, int[] expectedErrors) { checkCompile(source,extraArgs,expectedErrors,getSandboxName()); } @@ -169,7 +169,7 @@ public abstract class CommandTestCase extends TestCase { /** get the location of the org.aspectj.lang & runtime classes */ protected static String getRuntimeClasspath() { StringBuilder classpath = new StringBuilder(); - if (LangUtil.is19VMOrGreater()) { + if (LangUtil.is9VMOrGreater()) { classpath.append(LangUtil.getJrtFsFilePath()).append(File.pathSeparator); } classpath.append(Constants.aspectjrtClasspath()); diff --git a/org.aspectj.ajdt.core/src/test/java/org/aspectj/tools/ajc/AjcTestCase.java b/org.aspectj.ajdt.core/src/test/java/org/aspectj/tools/ajc/AjcTestCase.java index d1395ac81..a24edb804 100644 --- a/org.aspectj.ajdt.core/src/test/java/org/aspectj/tools/ajc/AjcTestCase.java +++ b/org.aspectj.ajdt.core/src/test/java/org/aspectj/tools/ajc/AjcTestCase.java @@ -947,7 +947,7 @@ public abstract class AjcTestCase extends TestCase { args = newargs; } } - boolean needsJRTFS = LangUtil.is19VMOrGreater(); + boolean needsJRTFS = LangUtil.is9VMOrGreater(); if (needsJRTFS) { if (!args[cpIndex].contains(LangUtil.JRT_FS)) { String jrtfsPath = LangUtil.getJrtFsFilePath(); -- cgit v1.2.3