The previous implementation was *so* complex! I realize that you grabbed it
from the previous implementation, but you ran into one of our biggest
failings, too much complexity, too early. Among other things the looping
priority was inverted (looping on the wrong thing). This simplifies the whole
into a handful of lines, and once again notice the judicious use of
constructors to make it testable.
Signed-off-by: Ben Hale <bhale@vmware.com>
* Simplify name from CnbBindings (a convention that makes my eyes bleed) so
that you aren't stuttering. I'm still a bit undecided on the naming of the
modules themselves as well.
* Documentation, documentation, documentation!
* Lots of the final keyword. Prevents unanticipated modification via extension.
* Constructor/Method overloading allows you to isolate the behaviors that are
really hard to test. Note that I've isolated everything that needs to read
from the environment and feel confident that the methods that include it are
so trivial they're not worth testing. Some overloads are non-public to enable
testing but not later usage.
* Since this is a public API, I'm being really verbose with the nullability
annotations. Most of the time you wouldn't use them, by they do make IDE
users' lives better.
Signed-off-by: Ben Hale <bhale@vmware.com>
Previously there was a lot of cruft in the POM file that related to previous
examples of this library. When in doubt, trust Boot's opinions and minimize
your POM's as much as possible. We can always add it back in the future.
Signed-off-by: Ben Hale <bhale@vmware.com>