Releases: eeverman/andhow
AndHow 1.5.0
Release 1.5.0
This release jumps from 0.4.2 to 1.5.0, reflecting that AndHow has been in production long enough to be considered production ready, and there are API changes. This release removes deprecated methods, clarifies / subtly changes some behavior, and has general improvements and bug fixes. It's likely that minor application updates will be needed to upgrade from 0.4.x to 1.5.0, however, those changes are small and highlighted here.
Changes likely requiring application code changes
- Property builder validation methods beginning with
mustXxx
have all been renamed to be shorter and clearer in meaning. These new methods were available in 1.4.2, but 1.5.0 removes the older deprecated methods. For instance:
StrProp OLD_STYLE = StrProp.builder()
.mustStartWithIgnoreCase("star").mustEndWith("ing").mustMatchRegex("star.+ing").build();
StrProp NEW_STYLE = StrProp.builder()
.startsWithIgnoringCase("star").endsWith("ing").matches("star.+ing").build();
- Some AndHow initialization methods were removed (they were deprecated previously). In particular:
AndHow.findConfig().build(); // <-- This build() method has been removed
AndHow.instance(configuration); // <-- This instance() method has been removed
These methods were replaced w/ new best practices. See Configuring AndHow and Testing for documentation and examples that would replace code potentially needing the removed methods.
- Deprecated methods generally have been removed. New usage patterns are well documented in the (User Manual)[http://andhowconfig.org] (Issue #663).
Behavior Changes which may impact applications
- BolProps and FlagProps now throw an exception for unrecognized values (Issue #658).
Prior to this release, BolProps and FlagProps had a list oftrue
values (e.g. 'true', 'yes', 'on', 't', etc.) and considered all other non-empty values false. This was changed to prevent configuration errors where a value looks true, like 'truee', but is interpreted as false. - FlagProps now act as flags only when loaded from command line (Issue #656)
Prior to this release, any reference to the name of a FlagProp in any configuration source would set its valueTrue
, however, this behavior is only needed / desirable when used as a command line switch. To migrate, ensure that all non-command-line configuration for FlagProps fully specify the value asTrue
orFalse
(or an equivalent yes/no etc.) - StdSysPropLoader & StdEnvVarLoader now trim String values (Issue #654)
If your application needs to preserve whitespace from these sources, wrap the complete value in double quotes. More details about whitespace handling is available. - The
Loader.load()
method signature has changed and a few loader implementations which were not directly used were removed (Issue #679). This only affects users who have created custom loaders.
Internal changes / changes unlikely to affect users
- The ValueType.isParsable method was removed (Issue #696). This would only affect user who have created custom ValueTypes.
Bug Fixes
- Calling setConfig() during initialization is now blocked (Issue #718)
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)
andhow-0.4.1.1
Bugfix release - See Issue #592 for details.
This bug affected most JVM environments, so upgrading is recommended for all.
See also the notes for the 0.4.1 release.
andhow-0.4.1
This larger update fixes several issues due to newer JVMs and the IntelliJ IDE
Special thanks to Vicky Ronnen for fixing Issue #497! This bug made AndHow unusable for anyone using IntelliJ.
Bug / Incompatibilities Fixes
- Fixed #497 Compiling or using AndHow in recent IntelliJ version throws errors
- Fixed #469 Eliminate compiler warnings about no specified Java language level
- Fixed #491 Use the Generated annotation on generated classes
General Improvements
- Fixed #257 to allow Windows builds to succeed (for building AndHow itself, not usage on Windows)
- Fixed #306 to make Properties non-discoverable to better ensure 'privacy' of configuration properties.
- Fixed #327 where Property values were never considered equal. This should not have affected anyone.
- Fixed #377 to block and report an error if the AndHow initiation detects a loop (re-entrant)
- Added Travis and CodeCoverage automation for better merge request and code quality
- Huge improvement in test coverage. This mostly had no impact on actual code other than a few minor bugs that were discovered and fixed (listed separately)
- Reorganized the Maven pom files and project structure.
- Project cleanup and improvements to encourage more participation from the open source community.
- Some unused constructors and methods were removed from internal classes. This should have no impact on users unless someone was subclassing or using internal classes.
- Upgraded the Enforcer plugin and its configuration to better ensure successful builds.
- Major JavaDoc improvements
- Improved test coverage and light refactoring of the sample generation code.
andhow-0.4.0
The 0.4.0 version was released on Dec. 28, 2017 and was the stable release until June 2, 2021.
This version has an issue with newer versions of IntelliJ that prevented AndHow's annotation processor from running, prompting the new release.
Versions prior to this release were experimental.
andhow-0.3.3: Merge pull request #220 from eeverman/Issue210
This release has several improvements
- JNDI loading has some issues fixed and is more flexible
- Messages on failure are now more reliably written
This release has one potential incompatible feature:
- If custom JndiLoader JNDI_ROOTs were specified, they now require a complete specification, including 'java:'. Prior to this change, the root 'java:' was always prepended and there was no way to remove it. Since 'java:' is not always correct, it was removed and custom roots must now fully specify it.
andhow-0.3.2
New Features
None
Bug Fixes
- Minor fix for a bad error message when an unrecognized property name is found bug - Issue #203
Improvement
- Better testing of properties via a test harness - Issue #198
Maven Dependency
<dependency>
<groupId>org.yarnandtail</groupId>
<artifactId>andhow</artifactId>
<version>0.3.2</version>
</dependency>
andhow-0.3.1
New Features
- Add Double Type - Issue #188
Previously had no support for decimal numbers. Rejoice! Now available.
Bug Fixes
-
Weird error from Prop File Loader from Classpath when prop name doesn't match known prop bug - Issue #153
This addresses an edge case where the configuration to specify the path to a property file was invalid. The error message generated in this case was confusing. -
Loader properties passed in constructor as null cause error bug - Issue #196
Another edge case where the configuration property to specify the path to a property file was null. In this case, the no error message was generated and AndHow crashed b/c the null was not handled. Now correctly handled and reported.
Maven Dependency
<dependency>
<groupId>org.yarnandtail</groupId>
<artifactId>andhow</artifactId>
<version>0.3.1</version>
</dependency>
andhow-0.3.0
Available in the maven central repo as:
<dependency>
<groupId>org.yarnandtail</groupId>
<artifactId>andhow</artifactId>
<version>0.3.0</version>
</dependency>
Dusty Corner Cleanup
Dusty Corner Cleanup - There are some areas where things are still a bit soft in definition: Nulls, whitespace handling and duplicate values. These were mostly discover while doing tasks for the 0.2 release.