Skip to content

Commit

Permalink
fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
wh1t3p1g committed Jan 12, 2023
1 parent b38fbcd commit 9bb7983
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/main/java/tabby/core/scanner/ClassInfoScanner.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,11 @@ public void run(List<String> paths){

public Map<String, CompletableFuture<ClassReference>> loadAndExtract(List<String> targets){
Map<String, CompletableFuture<ClassReference>> results = new HashMap<>();
int counter = 0;
log.info("Start to collect {} targets' class information.", targets.size());
Map<String, List<String>> moduleClasses = null;
if(JavaVersion.isAtLeast(9)){
moduleClasses = ModulePathSourceLocator.v().getClassUnderModulePath("jrt:/");
}
int size = targets.size();
int step = Math.min(size/10, size);
for (final String path : targets) {
List<String> classes = getTargetClasses(path, moduleClasses);
if(classes == null) continue;
Expand All @@ -78,9 +75,6 @@ public Map<String, CompletableFuture<ClassReference>> loadAndExtract(List<String
// e.printStackTrace();
}
}
if(++counter%step == 0){
log.info("Load {}% targets", String.format("%.1f",counter*0.1/size*1000));
}
}
log.info("Total {} classes.", results.size());
return results;
Expand Down

0 comments on commit 9bb7983

Please sign in to comment.