GH-514 Remove 'proxyInvokerIfNecessary()' method

It is really not needed as it does not add much value other then allows user to cast POJO function to its actual type. The reality is that the actual goald of POJO function is to make sure they can be looked at as plain Functions.

Resolves #514
This commit is contained in:
Oleg Zhurakousky
2020-05-26 15:42:31 +02:00
parent 79becb3f6b
commit ce28ce2cb6
4 changed files with 9 additions and 54 deletions

View File

@@ -16,8 +16,6 @@
package org.springframework.cloud.function.context.catalog;
import java.util.function.Function;
import org.junit.Test;
@@ -32,7 +30,6 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.messaging.Message;
import org.springframework.messaging.support.MessageBuilder;
import static org.assertj.core.api.Assertions.assertThat;
/**
@@ -76,8 +73,8 @@ public class BeanFactoryAwarePojoFunctionRegistryTests {
public void testWithPojoFunction() {
FunctionCatalog catalog = this.configureCatalog();
MyFunctionLike f1 = catalog.lookup("myFunctionLike");
assertThat(f1.uppercase("foo")).isEqualTo("FOO");
// MyFunctionLike f1 = catalog.lookup("myFunctionLike");
// assertThat(f1.uppercase("foo")).isEqualTo("FOO");
Function<String, String> f2 = catalog.lookup("myFunctionLike");
assertThat(f2.apply("foo")).isEqualTo("FOO");
@@ -121,7 +118,6 @@ public class BeanFactoryAwarePojoFunctionRegistryTests {
public Function<String, String> func() {
return v -> v;
}
}
// POJO Function that implements Function