Skip to content

Commit eee600a

Browse files
committed
= show-duplicate-java-classes refactor: reorder parameters of collect_class_path_to_classes
1 parent d81e89d commit eee600a

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ addons:
1616
# https://docs.travis-ci.com/user/installing-dependencies/#installing-packages-on-macos
1717
jobs:
1818
include:
19+
- os: osx
20+
osx_image: xcode11.3
1921
- os: linux
2022
dist: precise
2123
- os: linux
@@ -26,8 +28,6 @@ jobs:
2628
dist: bionic
2729
- os: linux
2830
dist: focal
29-
- os: osx
30-
osx_image: xcode11.3
3131

3232
script:
3333
- test-cases/integration-test.sh

bin/show-duplicate-java-classes

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ def list_class_under_class_dir(class_dir, progress):
199199
for filename in file_names if filename.lower().endswith('.class')}
200200

201201

202-
def collect_class_path_to_classes(jar_files, class_dirs, recursive_jar):
202+
def collect_class_path_to_classes(class_dirs, jar_files, recursive_jar):
203203
class_path_to_classes = {}
204204
total_count = len(jar_files) + len(class_dirs)
205205
index = 0
@@ -335,9 +335,8 @@ def main():
335335
if not options.class_dirs and not lib_dirs:
336336
lib_dirs = ['.']
337337

338-
class_path_to_classes = collect_class_path_to_classes(
339-
list_jar_file_under_lib_dirs(lib_dirs, recursive=options.recursive_lib),
340-
options.class_dirs, recursive_jar=options.recursive_jar)
338+
jar_files = list_jar_file_under_lib_dirs(lib_dirs, recursive=options.recursive_lib)
339+
class_path_to_classes = collect_class_path_to_classes(options.class_dirs, jar_files, options.recursive_jar)
341340

342341
print_responsive_message('find duplicate classes...')
343342
class_to_class_paths = invert_as_class_to_class_paths(class_path_to_classes)

0 commit comments

Comments
 (0)