diff --git a/ide/docker.api/src/org/netbeans/modules/docker/api/DockerAction.java b/ide/docker.api/src/org/netbeans/modules/docker/api/DockerAction.java index 38f3dac88ba9..b5b7681b15e1 100644 --- a/ide/docker.api/src/org/netbeans/modules/docker/api/DockerAction.java +++ b/ide/docker.api/src/org/netbeans/modules/docker/api/DockerAction.java @@ -148,9 +148,9 @@ public List getImages() { JSONObject json = (JSONObject) o; JSONArray repoTags = (JSONArray) json.get("RepoTags"); String id = (String) json.get("Id"); - long created = (long) json.get("Created"); - long size = (long) json.get("Size"); - long virtualSize = (long) json.get("VirtualSize"); + long created = (long) json.getOrDefault("Created", 0L); + long size = (long) json.getOrDefault("Size", 0L); + long virtualSize = (long) json.getOrDefault("VirtualSize", size); ret.add(new DockerImage(instance, repoTags, id, created, size, virtualSize)); } return ret; diff --git a/ide/docker.api/src/org/netbeans/modules/docker/api/DockerImage.java b/ide/docker.api/src/org/netbeans/modules/docker/api/DockerImage.java index 035eb01613f9..205d2124f6a6 100644 --- a/ide/docker.api/src/org/netbeans/modules/docker/api/DockerImage.java +++ b/ide/docker.api/src/org/netbeans/modules/docker/api/DockerImage.java @@ -88,6 +88,11 @@ public long getSize() { return size; } + /** + * @deprecated Removed from Docker Engine in v1.44. Return size value. + * @return + */ + @Deprecated public long getVirtualSize() { return virtualSize; }