Skip to content

Commit

Permalink
remove duplicated import
Browse files Browse the repository at this point in the history
  • Loading branch information
al3xliu committed Jun 19, 2023
1 parent a1f0433 commit 4ed0a77
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
2 changes: 0 additions & 2 deletions do_like_javac/tools/bixie.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

from . import common

from . import common

argparser = None

def run(args, javac_commands, jars):
Expand Down
11 changes: 5 additions & 6 deletions do_like_javac/tools/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

from . import common

from . import common

argparser = None

## other_args is other command-line arguments to javac.
Expand All @@ -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:
Expand All @@ -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):
Expand Down Expand Up @@ -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')
Expand Down Expand Up @@ -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")

Expand Down

0 comments on commit 4ed0a77

Please sign in to comment.