unleash-client-java icon indicating copy to clipboard operation
unleash-client-java copied to clipboard

chorus: using more semantic java interface

Open jeffque opened this issue 3 years ago • 1 comments

using more semantic java functional interface BiPredicate instead of BiFunction.

About the changes

Has potential to break compatibility with previous versions (see Discussion points), but makes the code more semantic.

Closes #176.

Important files

  • src/main/java/io/getunleash/Unleash.java
  • src/test/java/io/getunleash/UnleashTest.java

Discussion points

This might break some API consumers if they are using directly the interface BiFunction instead of a lambda.

jeffque avatar Oct 17 '22 18:10 jeffque

:warning: 1 God Class was detected by Lift in this project. Visit the Lift web console for more details.

sonatype-lift[bot] avatar Oct 17 '22 18:10 sonatype-lift[bot]

Hi @jeffque , sorry for the delayed answer. Thanks for this, it's a fair question. I think the honest answer to the question for why BiFunction rather than BiPredicate is that I wasn't aware that we had a BiPredicate. I knew of Predicate, Function and BiFunction, so should've deduced that there was a BiPredicate as well.

This is a breaking change, so will require a new major release. I still feel like it's the correct thing to do. Let me check with the team to verify if there's anything we really want to get in before a major, and I'll merge this.

Again, thank you!

chriswk avatar Nov 02 '22 08:11 chriswk