Releases: sbabcoc/Java-Utils
Upgrade dependencies and plugins
This release contains no functional changes but is instead focused on project housekeeping.
I also fixed a platform-specific bug in one of the unit tests and resolves a JavaDoc warning.
Revise cross-compile configuration
This release is solely focused on non-functional aspects of the project, Specifically, I revised the POM to use the cross-compilation features that were added in Java 9. This eliminated the need for maven-toolchains-plugin
, which obviated the Eclipse M2E lifecycle-mapping
configuration. I also migrated the project to the newer Sonatype s01
staging host for the deployment of releases.
In addition to this project configuration refresh, I corrected the formatting of line breaks in my JavaDoc comments.
Genericize database methods; require result instead of masking lack thereof
This release is focused on a few pervasive issues in the DatabaseUtils class:
- Prior to this release, many methods returned
Object
instead of specifying a generic return type. This required client code to declare explicit type-cast operations and ignore the resulting "unchecked cast" warnings. These have all been updated to eliminate the need for these type-casts. - If the specified query or stored procedure failed to return a result, the two
getString(...)
methods would returnnull
and the twogetInt(...)
methods would return-1
. In this release, failure to return a result for these methods will now cause IllegalStateException to be thrown.
I also added README references to a few neglected utility classes that I hope folks will find useful.
Add documentation and attributions for JarUtils
This release is focused on adding documentation for the JarUtils class. After all, features that no one can find don't exist.
I also added attributions regarding the provenance of the core function of this class. Credit where credit is due!
Add new JarUtils class
This release adds a new JarUtils class that provides methods related to Java JAR files:
- getClasspath assemble a classpath string from the specified array of dependencies.
- findJarPathFor find the path to the JAR file from which the named class was loaded.
- getJarPremainClass gets the
Premain-Class
attribute from the indicated JAR file.
These methods are especially useful for building command lines to spawn Java processes.
Expand documentation, with special attention to VARAGS
This is a documentation-only release, with no code changes. The implementation of stored procedure collections in DatabaseUtils
has always supported VARARGS, but the feature was only mentioned in passing. I expanded the JavaDoc for the SProcAPI
interface to add details and a sample implementation. I also added details and a sample implementation to the QueryAPI
interface, including creation of a configurable query collection with the Settings API
.
Enable clients to modify path; add unit tests
In this release, I added the ability for clients to modify the paths associated to Maven reports directory constants.
Upgrade several dependencies
This project was behind the times on its dependencies. The most urgent of these was Guava (19.0 => 28.1-android). The older release contained a defect that could allow an attacker to execute malicious code.
Finish conversion to Java 7
Add tool chain to ensure compilation with JDK 7; replace Java 8 implementation and libraries with equivalent Java 7
Enable inclusion in Java 7 projects
Replace Java 8 implementation with equivalent Java 7 code