From 4ed0a7794a2addc84e50bc3446b2d2a95d021746 Mon Sep 17 00:00:00 2001 From: Alex Liu Date: Mon, 19 Jun 2023 09:18:18 -0400 Subject: [PATCH] remove duplicated import --- do_like_javac/tools/bixie.py | 2 -- do_like_javac/tools/check.py | 11 +++++------ 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/do_like_javac/tools/bixie.py b/do_like_javac/tools/bixie.py index a1bd426..3482873 100644 --- a/do_like_javac/tools/bixie.py +++ b/do_like_javac/tools/bixie.py @@ -3,8 +3,6 @@ from . import common -from . import common - argparser = None def run(args, javac_commands, jars): diff --git a/do_like_javac/tools/check.py b/do_like_javac/tools/check.py index 3cc85d6..866b483 100644 --- a/do_like_javac/tools/check.py +++ b/do_like_javac/tools/check.py @@ -4,8 +4,6 @@ from . import common -from . import common - argparser = None ## other_args is other command-line arguments to javac. @@ -16,9 +14,9 @@ def get_arguments_by_version(jdk_version, other_args = None): else: # default jdk version version = 8 - + other_args = other_args or [] - + # add arguments depending on requested JDK version (default 8) result = [] if version == 8: @@ -44,7 +42,7 @@ def get_arguments_by_version(jdk_version, other_args = None): '-J--add-opens=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED'] else: raise ValueError("the Checker Framework only supports Java versions 8, 11 and 17") - + return result def run(args, javac_commands, jars): @@ -78,6 +76,7 @@ def run(args, javac_commands, jars): pp = javac_switches['processorpath'] + ':' if args.lib_dir: cp += pp + args.lib_dir + ':' + cp = "/Users/alexliu/projects/linear-checker/build/libs/linear-checker.jar:/Users/alexliu/projects/linear-checker/linear-checker-qual/build/libs/linear-checker-qual.jar:/Users/alexliu/projects/linear-checker/linear-checker-qual-android/build/libs/linear-checker-qual-android.jar:/Users/alexliu/.m2/repository/commons-io/commons-io/2.11.0/commons-io-2.11.0.jar" + cp java_files = jc['java_files'] cmd = checker_command + ["-classpath", cp] + java_files common.run_cmd(cmd, args, 'check') @@ -111,7 +110,7 @@ def getArgumentsByVersion(jdkVersion, other_args=[]): '-J--add-opens=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED', '-J--add-opens=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED', '-J--add-opens=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED'] - + else: raise ValueError("the Checker Framework only supports Java versions 8, 11 and 17")