The method FunctionSupport#constant still references the Guava Functions class.
Its body could be simplified to:
return x -> target;
...thus removing this reference.
There don't appear to be any explicit calls to this method in our code, but it is used heavily in configuration. There are no unit tests for FunctionSupport that I can see. I'd therefore want to include writing unit tests for FunctionSupport as part of this change, not just the one line above.
Environment
None
Activity
Scott Cantor
December 7, 2023 at 3:59 PM
Closing since we do not in fact use Guava for this.
Ian Young
June 4, 2020 at 1:04 PM
You're right, I guess I was grepping from the wrong directory or something, I can see calls now in (e.g.) OpenSAML.
I still think there should be unit tests in the defining module, though.
Scott Cantor
June 4, 2020 at 12:22 PM
I believe it's used heavily in the tests. The reason it exists is there's a problem with the handling of generics in the Guava version.
Our biggest remaining use of Guava generally is probably Predicates.alwaysTrue/False.
The method
FunctionSupport#constant
still references the GuavaFunctions
class.Its body could be simplified to:
return x -> target;
...thus removing this reference.
There don't appear to be any explicit calls to this method in our code, but it is used heavily in configuration. There are no unit tests for
FunctionSupport
that I can see. I'd therefore want to include writing unit tests forFunctionSupport
as part of this change, not just the one line above.