aboutsummaryrefslogtreecommitdiffstats
path: root/api/src/main/java
diff options
context:
space:
mode:
authorJulien Eluard <[email protected]>2014-03-24 08:38:06 -0300
committerJulien Eluard <[email protected]>2014-03-24 08:38:06 -0300
commit1130c9261b179f0efdf49badba9554d1c9d63822 (patch)
treeb9e702c9e6d107f8b0dd930dc9aa585fb5c3d489 /api/src/main/java
parent37639815664ce78bb1d2c1f2240d133209ba1398 (diff)
parent69909650ee34de32eceeee0b4dc6e0ab89f2a5b3 (diff)
Merge pull request #19 from dvryaboy/issue_18
Adding a test to demo issue #18
Diffstat (limited to 'api/src/main/java')
-rw-r--r--api/src/main/java/org/osjava/jardiff/JarDiff.java19
1 files changed, 12 insertions, 7 deletions
diff --git a/api/src/main/java/org/osjava/jardiff/JarDiff.java b/api/src/main/java/org/osjava/jardiff/JarDiff.java
index ed10e4d..9ea9dfb 100644
--- a/api/src/main/java/org/osjava/jardiff/JarDiff.java
+++ b/api/src/main/java/org/osjava/jardiff/JarDiff.java
@@ -24,10 +24,8 @@ import java.net.URL;
import java.net.URLClassLoader;
import java.util.Enumeration;
import java.util.HashMap;
-import java.util.HashSet;
import java.util.Iterator;
import java.util.Map;
-import java.util.Set;
import java.util.TreeSet;
import java.util.TreeMap;
import java.util.jar.JarEntry;
@@ -165,8 +163,8 @@ public class JarDiff
* @param reader the ClassReader
* @return the ClassInfo
*/
- private synchronized ClassInfo loadClassInfo(ClassReader reader)
- throws IOException
+ private synchronized ClassInfo loadClassInfo(ClassReader reader)
+ throws IOException
{
infoVisitor.reset();
reader.accept(infoVisitor, 0);
@@ -180,7 +178,7 @@ public class JarDiff
* which contain classes in subdirectories or in the current directory.
*
* @param infoMap the map to store the ClassInfo in.
- * @throws DiffException if there is an exception reading info about a
+ * @throws DiffException if there is an exception reading info about a
* class.
*/
private void loadClasses(Map infoMap, URL path) throws DiffException {
@@ -219,7 +217,7 @@ public class JarDiff
*
* @param infoMap the map to store the ClassInfo in.
* @param file the jarfile to load classes from.
- * @throws IOException if there is an IOException reading info about a
+ * @throws IOException if there is an IOException reading info about a
* class.
*/
private void loadClasses(Map infoMap, File file) throws DiffException {
@@ -291,7 +289,14 @@ public class JarDiff
* writing to a file caused an IOException
*/
public void diff(DiffHandler handler, DiffCriteria criteria)
- throws DiffException
+ throws DiffException
+ {
+ diff(handler, criteria, oldVersion, newVersion, oldClassInfo, newClassInfo);
+ }
+
+ private void diff(DiffHandler handler, DiffCriteria criteria,
+ String oldVersion, String newVersion,
+ Map oldClassInfo, Map newClassInfo) throws DiffException
{
// TODO: Build the name from the MANIFEST rather than the filename
handler.startDiff(oldVersion, newVersion);