1
0
mirror of https://github.com/demodude4u/Factorio-FBSR.git synced 2025-02-19 19:59:54 +02:00

Fixed handling empty body

This commit is contained in:
Weston Rye (Demod) 2017-07-15 00:34:01 -04:00
parent e465334c6e
commit 8ed174664d

View File

@ -47,7 +47,7 @@ public class WebAPIService extends AbstractIdleService {
On.post("/blueprint").serve((req, resp) -> {
TaskReporting reporting = new TaskReporting();
try {
String content = new String(req.body());
String content = Optional.ofNullable(req.body()).map(String::new).orElse("");
reporting.setContext(content);
List<BlueprintStringData> blueprintStrings = BlueprintFinder.search(content, reporting);