add null check in FunctionController
This commit is contained in:
@@ -59,8 +59,11 @@ public class FunctionController {
|
|||||||
return debug ? result.log() : result;
|
return debug ? result.log() : result;
|
||||||
}
|
}
|
||||||
Consumer<String> consumer = functions.lookupConsumer(name);
|
Consumer<String> consumer = functions.lookupConsumer(name);
|
||||||
body.subscribe(consumer::accept);
|
if (consumer != null) {
|
||||||
return null;
|
body.subscribe(consumer::accept);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
throw new IllegalArgumentException("no such function: " + name);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping(path = "/{name}")
|
@GetMapping(path = "/{name}")
|
||||||
|
|||||||
Reference in New Issue
Block a user