Skip to content
This repository was archived by the owner on Jan 13, 2023. It is now read-only.

Releases: LifeMC/bytecode-version-analyzer

v0.6

05 Apr 12:43
2b7c7dc

Choose a tag to compare

Release notes (not all changes):

This release does not contain much new features and therefore it is a general maintenance release including bug fixes and other enchancements. We planned to release this as Java 16 upgrade but apparently CodeQL / LGTM blocked us, and we will not gonna delay it anymore.

Added:

Featured:

  • Added a warning for when the target jar contains META-INF/versions, but the META-INF/MANIFEST.MF does not contain Multi-Release: true entry. The suggested fix for this is either add that entry or use -Djdk.util.jar.enableMultiRelease=force when launching your program. Note that the latter does not fix this warning, though.

Others:

  • New CLI message on exit that prints exit code.
  • Added version information to handleError() for fatal errors.
  • Added more debug messages when creating threads and for supressed exceptions, etc.

Changed:

Semi-breaking:

  • Arguments can be specified multiple times now without side-effects.

Featured:

  • Now gets the license name from the POM, too.
  • Expose Lazy#supplierInvoked via Lazy#isSupplierInvoked.
  • Run I/O actions in a ManagedBlock, resulting in a performance boost when I/O is the bottleneck. It will create a new thread to maximize CPU power, since while the other threads would be blocking in I/O, the new thread can process. For this purpose, there is a new class, SupplierManagedBlock, that uses Lazy internally and uses Lazy#isSupplierInvoked.
  • Use scheduleWithFixedDelay instead of scheduleAtFixedRate, since the latter does not include the time spent in running the task.
  • Set thread-priorities properly to improve performance.
  • More performance improvements.

Others:

  • Upgraded to Contributor Covenant 2.0.
  • Updated shell-check and setup-java in GH Actions, possibly changing default build JDK from Zulu to AdoptOpenJDK.
  • Upgraded to Maven & maven-model 3.8.1.
  • Upgraded to ECJ 3.25.0.
  • JavaDoc additions, clarifications and typo fixes.
  • Exported range limiting functionality to separate methods.
  • Other general code quality and naming changes (length() --> isEmpty(), getHasPrintedAtLeastOneVersion() --> hasPrintedAtLeastOneVersion(), etc.).

Fixed:

  • Fixed wrong repo URL in CONTRIBUTING.md.
  • Fixed 404 in License URL in POM.
  • Fixed default --fail-verbosity of Verbosity#ERROR is not working (works when explicitly specified, though), this because of ArgumentAction being only run when the argument is entered. The fix is running the ArgumentAction after loadArguments() for the argument to process default value exactly as-is like it was specified explicitly.
  • Fixed a false positive LGTM memory leak warning with a work-around.
  • Fixed Logging.debug() method using info(""), replaced with debug(() -> "") instead. Note that however, while this is a valid fix, this method is not used in any of the releases, so this bug does not affect any release, including this release, even without this fix.

See full changes here:
v0.5...v0.6

v0.5

05 Mar 06:25

Choose a tag to compare

Release notes (not all changes):

We are coming close to v1.0, so this release includes a refactor of the project! It is now splitted properly onto multiple packages and source files instead of just one. There is still a lot of work to be done, however!

Added:

Featured:

  • Added parallel processing! This will utilize all your processor cores instead of just one and will improve performance dramatically if you have many cores! For example, if you have 4 cores, the program would just limit itself to a %25 global CPU usage (1 thread out of 4 threads) before, but now it will use up to %100 on all cores and this would result in a %75 performance increase!

Others:

  • New CLI arguments: --verbosity, --fail-verbosity, --async, --buffered, --help, --parallel, --threads, --timing, --track, --verify

Changed:

Semi-breaking:

  • Now gives errors for missing argument values. i.e. java -jar bytecode-version-analyzer.jar --filter would not do anything before, but will give an error now. This use case is however, already invalid behaviour, so this not a totally breaking change, that should have been like this from scratch.

  • The program will now return non-zero exit code to OS properly in case of an error or fatal error by default. You can control this behaviour via the CLI option --fail-verbosity. Current possible values are: none, fatal, error, warn, info and debug. For up-to-date values, check the Verbosity enum in the source code or JavaDocs.

Others:

  • Refactored workflow of CI; now uses latest Maven Wrapper instead of relying on system provided Maven version.
  • Now uses lazy-init for many static variables to optimize start-up time.

Fixed:

  • Fixed NullPointerException when first argument is null in main method.

  • Fixed Young GCs caused by creation of new ClassFileVersion objects. They will now be cached by major version at least, maybe we will cache minor too in future.

  • Fixed expensive ZipFile#read calls made by shouldSkip method. Replaced new ZipFile in there to use a single instance like JarFile. This results in a good flat performance boost in my testing and makes the program more smooth, avoiding more GCs combined with the ClassFileVersion cache.

See full changes here:
v0.4.1...v0.5

v0.4.1

25 Feb 01:06

Choose a tag to compare

Release notes (not all changes):

Fixed:

  • Fixed start-up error appeared on v0.4 release.

See full changes here:
v0.4...v0.4.1

v0.4

25 Feb 00:40

Choose a tag to compare

Release notes (not all changes):

Added:

Featured:

  • Added progress tracker for processed entry count. This keeps you updated with processed entry count in case you are processing a big JAR.

Others:

  • Added module info as a Multi-Release class.
  • Added errors when a directory or unreadable file is given.
  • Added information/warning messages about JAR manifests (no manifest, multi-release, sealed, signed).
  • Added loadPom and threads argument. (Threads argument is reserved for future usage)

Changed:

Semi-breaking:

  • Now gives errors for unrecognized arguments. This not considered as a breaking thing since it will only break stuff such as -x would be treated as an archive name before, but treated as an (unrecognized) argument now.

Others:

  • Refactored argument parsing.
  • Improved portability by using File#separator instead of / in source
  • Improved performance by using Buffered* where possible (i.e BufferedInputStream)
  • Switched from Pattern#split into String#split if the pattern is single character. JDK 7+ has a fast path for single character patterns.
  • Now gives errors for unrecognized arguments.

Fixed:

  • Fixed (again) showing %0 when the percent is i.e %0.01.
  • Fixed formatDouble returning different results depending on Locale, i.e . on en-US and , on tr-TR, now it will always use the Locale.ROOT (i.e no localization), this results in . being used.
  • Fixed NumberFormatException stack performance. (#6)
  • Fixed ArrayList#contains performance by using HashSet instead. (#7)

See full changes here:
v0.3...v0.4

v0.3

13 Feb 05:06

Choose a tag to compare

Release notes (not all changes):

This mainly a bug fix and enchancement release over v0.2.

Featured:

  • Fixed false positives about compiler generated synthetic classes
  • Only load pom when needed (speeds up processing time)
  • Fixed JarFile memory leak (closes JarFile after using)
  • Fixed ThreadLocal memory leak about not calling remove method

Others:

  • Combined if statements
  • Ignored SonarLint issue store in gitignore
  • Refactored big methods into smaller ones, helps inlining

See full changes here:
v0.2...v0.3

v0.2

12 Feb 06:59

Choose a tag to compare

Release notes (not all changes):

Featured:

  • Added Multi-Release JAR support
  • Added percent total info, e.g 5 out of total 75 classes (%6,66) use 59.0 (Java 15) class file version
  • Added preview (classes compiled with --enable-preview) class file version support
  • Added process time to output, e.g took 196ms

Others:

  • Upgraded plexus utils version
  • Fixed one of the maven shade plugin build warnings, other one remains (see apache/maven-shade-plugin#83)
  • Bumped required Maven version to apply plugin updates
  • Make build run on latest Ubuntu (20.04) and Java (15.0.2)
  • Gets githubUrl and issuesUrl programmatically from pom now
  • Builds are reproducible now
  • Added filter argument for filtering --print-if-above and --print-if-below messages
  • Added cross compile for Java 8, 11 and 15. This to make sure of best performance (better runtime string methods, no syntethic accessor methods, etc.) and test the Multi-Release JAR support on the analyzer JAR itself.
  • Fixed LGTM not building the project
  • Removed unused dependencies (commons-lang)
  • Fixed memory leaks
  • Changed to not use autoboxed Objects#hashCode

See full changes here:
v0.1...v0.2

v0.1

09 Feb 11:03

Choose a tag to compare

This the first and official release of Bytecode Version Analyzer. This not the complete release (v1.0), so expect things to change.

This only a minimal, single class version. Refactorings will be made in the coming releases to make it more organized. See the to-do on readme for more information about the current goals.