private boolean imageRequiresPull(boolean hasImage, ImagePullPolicy pullPolicy, String imageName)
        throws MojoExecutionException {

        // The logic here is like this (see also #96):
        // otherwise: don't pull

        if (pullPolicy == ImagePullPolicy.Never) {
            if (!hasImage) {
                throw new MojoExecutionException(
                    String.format("No image '%s' found and pull policy 'Never' is set. Please chose another pull policy or pull the image yourself)", imageName));
            }
            return false;
        }

        // If the image is not available and mode is not ImagePullPolicy.Never --> pull
        if (!hasImage) {
            return true;
        }

        // If pullPolicy == Always --> pull, otherwise not (we have it already)
        return pullPolicy == ImagePullPolicy.Always;
    }
private boolean imageRequiresPull ( boolean hasImage , ImagePullPolicy pullPolicy , String imageName ) throws MojoExecutionException { if ( pullPolicy == ImagePullPolicy . Never ) { if ( ! hasImage ) { throw new MojoExecutionException ( String . format ( "No image '%s' found and pull policy 'Never' is set. Please chose another pull policy or pull the image yourself)" , imageName ) ) ; } return false ; } if ( ! hasImage ) { return true ; } return pullPolicy == ImagePullPolicy . Always ; }
============================================================================================================