andhow-0.4.2
Special thanks to first time contributor @alex-kar for many high-quality code fixes and improvements in this release.
Larger / User-Visible Changes
New website, improved documentation, and examples
With this release, AndHow has moved to a new home site with its own domain name, andhowconfig.org. Documentation has been updated and improved, a live-code Repl.it example added, and more.
AndHow.findConfig() is the way to find or create AndHow's configuration
AndHow.findConfig() should now be used any place there is a need to access the configuration for AndHow, and the configuration returned from that call is the same configuration for each call. This greatly simplifies startup configuration and usage. See samples for examples of this new best practice.
Shorter Property validation method names
The 'must' prefix on validation method names has been removed, for instance:
IntProp COUNT_DOWN = IntProp.builder().mustBeGreaterThan(1).build; //old
IntProp COUNT_DOWN = IntProp.builder().greaterThan(1).build; //New!
Other validation methods have similar renames. The prior validation methods have been deprecated.
AndHow.getGroupForProperty method has been removed
This method has no user-code purpose and 'breaks' the security model. See Issue 624.
New JUnit 5 testing extensions simplify testing
The are new JUnit 5 extensions in the new andhow-junit5-extensions
are used as annotations on test classes or methods and make testing applications with AndHow much simpler. With that change, the older JUnit 4 test base has been deprecated.
Bug Fixes
Issue #630: Using javac --release=8
causing build to fail (for AndHow and apps using it)
Issue #615 & #655: Generated configuration templates were unexpectedly setting values. As a result of these changes, generated templates now have empty values or commented out lines in some cases.
Isse #659 Trimming was not applied to non-String Property values in some cases
Other changes with zero or minimal impact to users of 1.4.1
- Move AndHowTestInit and TestInitLoader from test-harness to core.
- Switch to using the new JUnit 5 extensions for testing AndHow itself
- The AndHowConfiguration interface now includes all methods that were implemented in the StdConfig class. The functionality of StdConfig had grown without porting the methods back to the interface.
- BaseConfig.getDefaultLoaderList() is now an instance method, not static.
- Deprecate AndHow.isInitialize(), which was missing the trailing 'd'. New method named
isInitialized()
- Deprecated AndHow.instance(config) since its usage is no longer best practice after full support of the AndHow.findConfig() method (see above)
- Add AndHow.setConfig(config), primarily to make testing user apps easier
- Deprecated AndHowConfig.build() since its usage is no longer best practice after full support of the AndHow.findConfig() method (see above)
- Lots of internal changes to how configuration takes place, improving encapsilation, testability and ease of use
- Switch from Cobertura to JaCoCo for code coverage (@alex-kar)
- Switch to new CodeCov uploader which was being deprecated by CodeCov. The new uploader along with JaCoCo adds complexity reports as an added feature (@alex-kar)
- Fixed several small potential bugs in Loader code (@alex-kar)
- Fixed several maven deprecation warning (Thanks @alex-kar)
- Fixed an issue causing the build to fail on JDK 16 (@alex-kar)
- Deprecate KeyValuePairLoader.setKeyValuePairs(String... keyValuePairs) method (unneeded / unused) (@alex-kar)