Skip to content

Commit

Permalink
fix comment and remove unneccesary logging of common scenario
Browse files Browse the repository at this point in the history
  • Loading branch information
hcoles committed Aug 30, 2024
1 parent 4c86cb4 commit 376d386
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@
import java.util.Optional;
import java.util.Set;
import java.util.function.Predicate;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.stream.Collectors;

Expand Down Expand Up @@ -377,17 +376,15 @@ private CoverageGenerator coverage() {
return this.strategies.coverage();
}

// For reasons not yet understood classes from rt.jar are not resolved for some
// projects during static analysis phase. For now fall back to the classloader when
// a class not provided by project classpath
// Since java 9 rt.jar is no longer on the classpath so jdk classes will not resolve from
// the filesystem and must be pulled out via the classloader
private ClassByteArraySource fallbackToClassLoader(final ClassByteArraySource bas) {
final ClassByteArraySource clSource = ClassloaderByteArraySource.fromContext();
return clazz -> {
final Optional<byte[]> maybeBytes = bas.getBytes(clazz);
if (maybeBytes.isPresent()) {
return maybeBytes;
}
LOG.log(Level.FINE, "Could not find " + clazz + " on classpath for analysis. Falling back to classloader");
return clSource.getBytes(clazz);
};
}
Expand Down

0 comments on commit 376d386

Please sign in to comment.