diff --git a/engine/src/main/java/io/seldon/engine/predictors/PredictiveUnitState.java b/engine/src/main/java/io/seldon/engine/predictors/PredictiveUnitState.java index 7e9f054992..c545b06532 100644 --- a/engine/src/main/java/io/seldon/engine/predictors/PredictiveUnitState.java +++ b/engine/src/main/java/io/seldon/engine/predictors/PredictiveUnitState.java @@ -87,11 +87,11 @@ public PredictiveUnitState( if (containersMap.containsKey(name)){ this.image = containersMap.get(name).getImage(); - if (image.contains(":")) + int i = image.lastIndexOf(":"); + if (i >= 0) { - String[] parts = image.split(":"); - this.imageName = parts[0]; - this.imageVersion = parts[1]; + this.imageName = StringUtils.substring(image, 0, i); + this.imageVersion = StringUtils.substring(image, i+1); } else {