All Versions
Latest Version
Avg Release Cycle
10 days
Latest Release
791 days ago

Changelog History
Page 5

  • v4.8.53 Changes

    November 04, 2019
    • ๐Ÿ”ฆ Exposed raw type descriptor and/or type signature strings for methods, fields and classes (#380):
      • MethodInfo#getTypeDescriptorStr()
      • MethodInfo#getTypeSignatureStr()
      • MethodInfo#getTypeSignatureOrTypeDescriptorStr()
      • FieldInfo#getTypeDescriptorStr()
      • FieldInfo#getTypeSignatureStr()
      • FieldInfo#getTypeSignatureOrTypeDescriptorStr()
      • ClassInfo#getTypeSignatureStr()
    • โœ‚ Removed static final check on fields before scanning for constant initializer values, to allow constant initializers to be read for non-static / non-final fields in Kotlin. (Java does not generate these, and technically Kotlin should not either, but one user relies on this in their Kotlin API -- #379.)

    Thanks to @rankinc for both these feature requests!

  • v4.8.52 Changes

    October 20, 2019

    โœ‚ Remove the shutdown hook entirely (#376).

    ๐Ÿ“š A shutdown hook has been in place for numerous releases, and its purpose was to call ScanResult#close() on any open ScanResult instances before JVM shutdown, in order to free up resources (delete any temporary files that had to be created to extract deflated nested jars; unmap mapped byte buffers; close open modules; close open files; free up allocated memory; etc.). However the JVM's own shutdown processes should take care of all of these steps, including the removal of any temporary files that are created, as they are marked for deletion on JVM shutdown. More importantly, ScanResult implements Autocloseable, and the ClassGraph documentation strongly recommends assigning ScanResult in a try-with-resources block so that each ScanResult is properly closed, so the shutdown hook was always just a fallback.

    If you want to close all open (unclosed) ScanResult instances at once, you can call the new static method ScanResult.closeAll(). You might want to do this on container unload/destroy, in a containerized runtime.

    ClassGraph automatically registers lifecycle listeners for servlet containers and Spring applications that call ScanResult.closeAll(), to ensure that resources are properly freed when containers are destroyed or unloaded.

    Note that if you call ScanResult.closeAll(), you need to ensure that the lifecycle of the classloader matches the lifecycle of your application, or that two concurrent applications don't share the same classloader, otherwise one application might close another application's ScanResult instances while they are still in use.

  • v4.8.51 Changes

    October 20, 2019

    In servlet containers and Spring applications, rather than adding a shutdown hook to close any unclosed ScanResult objects (to prevent resource leaks), instead add an event listener that closes unclosed ScanResult objects when the container is being torn down. This prevents a leak of the container's classloader (#376, thanks to @vimil for reporting).

    Please report any regressions with servlet containers or Spring.

  • v4.8.50 Changes

    October 17, 2019

    โš  No new functionality; only fixes static analysis warnings (switched on Eclipse JDT's nullability analysis warnings; fixed all warnings).

  • v4.8.49 Changes

    October 17, 2019

    ๐Ÿ›  Fix getClassInfo() cannot be called here exception for BaseTypeSignature triggered by having an annotation with an array of primitive type references, e.g. @MyAnnotation({ int.class }). Thanks to @johndevs for reporting (#375).