github classgraph/classgraph classgraph-4.6.11

latest releases: classgraph-4.8.172, classgraph-4.8.171, classgraph-4.8.170...
5 years ago

Bugfixes:

  • Fixes several mmap bugs (e.g. files not being able to be deleted until System.gc() on Windows), by using the "cleaner hack" to directly unmap mmap'd files as soon as they are no longer needed (on Resource::close or ScanResult::close) (#290). This also makes it much less likely that you will hit the limit of 64k concurrent mmap'd files per process on Linux.
  • Removed System.gc() calls (these were previously used to close mmap'd files) in all cases except for when an OutOfMemoryError is thrown while trying to mmap a file (#290).
  • Re-enabled mmap for directory-based classpath entries on Windows (this gives a 10-20% speedup while scanning classfiles in directory-based classpath entries) (#290).
  • Fixes for Spring-Boot, when classes were in WEB-INF/classes rather than BOOT-INF/classes, and/or when the classpath URL ended with !/ (#296).

Other changes:

  • ClassGraph was changed to write to java.util.logging.Logger rather than stderr (thanks to @gimotte for the PR).
  • module-info.class was moved to META-INF/versions/9 for maximum backwards compatibility with JDK 7/8 (#291, #218).

New API calls:

  • The following new API calls were added for finding inter-class dependencies (#122):
    • ClassGraph ClassGraph#enableInterClassDependencies() (need to call this before #scan(); can also call ClassGraph#enableExternalClasses() if you want non-whitelisted classes in the results returned by the methods below)
    • ClassInfoList ClassInfo#getClassDependencies() to find the dependencies for a single class.
    • Map<ClassInfo, ClassInfoList> ScanResult#getClassDependencyMap() to find the dependencies for all classes.
    • Map<ClassInfo, ClassInfoList> ScanResult#getReverseClassDependencyMap() to find the dependent classes for all classes.
    • String ClassInfoList#generateGraphVizDotFileFromClassDependencies() to produce the dependency graph for all classes (e.g. call this on the result of ScanResult#getAllClasses()) in GraphViz .dot file format.

Don't miss a new classgraph release

NewReleases is sending notifications on new releases.