Jkube: Use `java.util.function.Function` instead of Guava's `com.google.common.base.Function`

Created on 25 Jan 2021  路  3Comments  路  Source: eclipse/jkube

Since we're already on JDK8 we can refactor these places to use java.util.function.Function instead. As pointed by Sonar[0], we should use native Java 8 features instead of guava. You can use this grep to find all the occurrences of guava's Function:

jkube : $ git grep -in "com.google.common.base.Function"
jkube-kit/build/service/docker/src/main/java/org/eclipse/jkube/kit/build/service/docker/config/handler/property/ValueProvider.java:129:    public <T> T getObject(ConfigKey key, T fromConfig, final com.google.common.base.Function<String, T> converter) {
jkube-kit/common/src/main/java/org/eclipse/jkube/kit/common/util/EnvUtil.java:16:import com.google.common.base.Function;
jkube-kit/common/src/main/java/org/eclipse/jkube/kit/common/util/ProcessUtil.java:16:import com.google.common.base.Function;

[0] https://sonarcloud.io/organizations/jkubeio/rules?open=java%3AS4738&rule_key=java%3AS4738

good first issue help wanted

All 3 comments

@rohanKanojia Is it okay of I work on this? If yes, could you please assign it to me.

@abhijeetshuklaoist : I'm assigning it to you. Thanks a lot!

Was this page helpful?
0 / 5 - 0 ratings