Polish previous commit

Add FunctionInspector dependency back to SimpleFunctionRegistry since we can't remove it yet to avoid backward comatibility issues

Resolves #617
This commit is contained in:
Oleg Zhurakousky
2020-12-08 18:44:16 +01:00
parent b4f193fd3c
commit 6b03cf7a1e

View File

@@ -77,7 +77,7 @@ import org.springframework.util.StringUtils;
* @author Oleg Zhurakousky
*
*/
public class SimpleFunctionRegistry implements FunctionRegistry {
public class SimpleFunctionRegistry implements FunctionRegistry, FunctionInspector {
protected Log logger = LogFactory.getLog(this.getClass());
/*
* - do we care about FunctionRegistration after it's been registered? What additional value does it bring?
@@ -113,6 +113,13 @@ public class SimpleFunctionRegistry implements FunctionRegistry {
this.functionInvocationHelper = functionInvocationHelper;
}
@Override
public FunctionRegistration<?> getRegistration(Object function) {
throw new UnsupportedOperationException("FunctionInspector is deprecated. There is no need "
+ "to access FunctionRegistration directly since you can interogate the actual "
+ "looked-up function (see FunctionInvocationWrapper.");
}
public SimpleFunctionRegistry(ConversionService conversionService, CompositeMessageConverter messageConverter, JsonMapper jsonMapper) {
this(conversionService, messageConverter, jsonMapper, null);
}