Revert to more convenient signature in FunctionCatalog

This commit is contained in:
Dave Syer
2018-09-17 14:48:40 +01:00
parent 033ab38579
commit f7b184c4c3
11 changed files with 84 additions and 92 deletions

View File

@@ -43,7 +43,7 @@ public interface FunctionCatalog {
* @param name the name of the functional interface. Must not be null;
* @return instance of the functional interface registered with this catalog
*/
<T> T lookup(Class<T> type, String name);
<T> T lookup(Class<?> type, String name);
Set<String> getNames(Class<?> type);

View File

@@ -118,7 +118,7 @@ public class InMemoryFunctionCatalog
@Override
@SuppressWarnings("unchecked")
public <T> T lookup(Class<T> type, String name) {
public <T> T lookup(Class<?> type, String name) {
T function = null;
if (type == null) {
function = (T) functions.values().stream().filter(map -> map.get(name) != null).map(map -> map.get(name)).findFirst().orElse(null);

View File

@@ -119,7 +119,7 @@ public class ContextFunctionCatalogAutoConfiguration {
@Override
@SuppressWarnings("unchecked")
public <T> T lookup(Class<T> type, String name) {
public <T> T lookup(Class<?> type, String name) {
T function = null;
if (type == null) {
function = (T) processor.lookupFunction(name);