VersionDifference difference = null; if(leftVersion != null && rightVersion != null){ difference = comparator.difference(leftVersion, rightVersion);
private static ProductArtifact toProductArtifact(Product p, Artifact a, String origVersion, VersionComparator comparator) { ProductArtifact ret = new ProductArtifact(); ret.setArtifact(a.getGav()); ret.setProductName(p.getName()); ret.setProductVersion(p.getVersion()); ret.setSupportStatus(p.getStatus()); ret.setDifferenceType(comparator.difference(origVersion, a.getGav().getVersion()) .toString()); return ret; }