private void ensureNamespaceExists(Result result){
  DockerImage image=DockerImage.fromImageName(result.name);
  if (image.getNamespace() == null) {
    result.name=String.format("%s/%s",DEFAULT_NAMESPACE,image.getRepository());
  }
}

private void ensureNamespaceExists ( Result result ) { DockerImage image = DockerImage . fromImageName ( result . name ) ; if ( image . getNamespace ( ) == null ) { result . name = String . format ( "%s/%s" , DEFAULT_NAMESPACE , image . getRepository ( ) ) ; } }
ensures that an image name has a namespace prefix . an image pushed to a v1 registry without namespace prefix is processed in the following way : < registry_name > / < repository_name > - > < registry_name > / library / < repository_name > results from v1 queries , however , do not contain the default prefix . this could be a problem later when we instantiate containers based on these images . an image pushed to a v2 registry does not get the default prefix .
