class CdhPackageLocationFilter implements PackageLocationFilter {

    @Override
    public boolean filterImage(Image image, Image currentImage) {
        if (isRelevantFieldNull(image, currentImage)) {
            LOGGER.debug("Image or some part of it is null: {}", image);
            return false;
        } else {
            String repoUrl = image.getStackDetails().getRepo().getStack().getOrDefault(currentImage.getOsType(), "");
            LOGGER.debug("Matching URL: [{}]", repoUrl);
            return URL_PATTERN.matcher(repoUrl).find();
        }
    }

}