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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user