From d647b0d37dc04abefdb2ed6999030a6a8acd70ed Mon Sep 17 00:00:00 2001 From: Brandon Rozek Date: Thu, 9 Nov 2023 17:21:27 -0500 Subject: [PATCH] Fixed bug with empty plan --- src/main/java/org/rairlab/planner/Plan.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/org/rairlab/planner/Plan.java b/src/main/java/org/rairlab/planner/Plan.java index 2a9cfb0..a2a6a16 100644 --- a/src/main/java/org/rairlab/planner/Plan.java +++ b/src/main/java/org/rairlab/planner/Plan.java @@ -95,6 +95,9 @@ public class Plan { @Override public String toString() { + if (actions.size() == 0) { + return ""; + } return actions.stream().map(x-> x.toString() + " ").reduce((x,y) -> x + y).get(); }