Commit 9e555084 authored by Luna Riegel's avatar Luna Riegel
Browse files

Fix: Fixed NPE in stream-healing

parent 430a0630
...@@ -13,6 +13,7 @@ import java.util.Map; ...@@ -13,6 +13,7 @@ import java.util.Map;
import java.util.Objects; import java.util.Objects;
import de.hft.stuttgart.citydoctor2.database.CityObjectCache; import de.hft.stuttgart.citydoctor2.database.CityObjectCache;
import de.hft.stuttgart.citydoctor2.database.UnconnectedCache;
import de.hft.stuttgart.citydoctor2.exceptions.CityObjectCacheException; import de.hft.stuttgart.citydoctor2.exceptions.CityObjectCacheException;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
...@@ -189,7 +190,12 @@ public class Healer { ...@@ -189,7 +190,12 @@ public class Healer {
} }
}; };
} }
if(checker.getModel() != null){
cache = checker.getModel().getCache(); cache = checker.getModel().getCache();
} else {
//Stream healing is being used, use an unconnected cache
cache = new UnconnectedCache();
}
this.l = l; this.l = l;
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment