Search in sources :

Example 1 with DiffException

use of org.osjava.jardiff.DiffException in project semantic-versioning by jeluard.

the class Comparer method diff.

/**
     * @return all {@link Difference} between both JARs
     * @throws IOException
     */
public final Delta diff() throws IOException {
    try {
        final JarDiff jarDiff = new JarDiff();
        jarDiff.loadOldClasses(this.previousJAR);
        jarDiff.loadNewClasses(this.currentJAR);
        final DifferenceAccumulatingHandler handler = new DifferenceAccumulatingHandler(this.includes, this.includesAreRegExp, this.excludes, this.excludesAreRegExp);
        jarDiff.diff(handler, diffCriteria);
        return handler.getDelta();
    } catch (DiffException e) {
        throw new RuntimeException(e);
    }
}
Also used : DifferenceAccumulatingHandler(org.semver.jardiff.DifferenceAccumulatingHandler) DiffException(org.osjava.jardiff.DiffException) JarDiff(org.osjava.jardiff.JarDiff)

Aggregations

DiffException (org.osjava.jardiff.DiffException)1 JarDiff (org.osjava.jardiff.JarDiff)1 DifferenceAccumulatingHandler (org.semver.jardiff.DifferenceAccumulatingHandler)1