This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to annotated tag japicmp-base-0.0.1 in repository https://gitbox.apache.org/repos/asf/commons-vfs.git
commit 645e7aa5c978e80d9998b0d679cc3d00647b82df Author: siom79 <[email protected]> AuthorDate: Mon Sep 30 22:47:02 2013 +0200 extended README.md --- README.md | 31 ++++++++++++++++++++++ .../java/japicmp/util/StringArrayEnumeration.java | 2 -- 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 58f16a9..a6502ab 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,12 @@ investigation depends on are available on the classpath. To prevent the inclusio can be a lot of work for bigger applications, this library makes use of the [javassist](http://www.csg.ci.i.u-tokyo.ac.jp/~chiba/javassist/) library to inspect the class files. This way you only have to provide the two jar archives on the command line, that's it. +##Features## + +* Comparison of two jar archives without the need to add all of their dependencies to the classpath +* Differences are printed on the command line in a simple diff format. +* Differences can optionally be printed to an xml file. This can be transformed to an HTML file using XSLT. + ##Usage## The tool has a set of CLI parameters that are described in the following: @@ -31,6 +37,31 @@ The tool has a set of CLI parameters that are described in the following: -n <pathToNewVersionJar> Provides the path to the new version of the jar. -x <pathToXmlOutputFile> Provides the path to the xml output file. If not given, stdout is used. -m Outputs only modified classes/methods. If not given, all classes and methods are printed. + +###Example### + +In the following you see the beginning of the xml output file after having computed the differences between the versions 4.0.1 and 4.2.3 of httpclient: + + <?xml version="1.0" encoding="UTF-8" standalone="yes"?> + <japicmp newJar="D:\Programmierung\japicmp\github\japicmp\japicmp\httpclient-4.2.3.jar" oldJar="D:\Programmierung\japicmp\github\japicmp\japicmp\httpclient-4.0.1.jar"> + <class changeStatus="REMOVED" fullyQualifiedName="org.apache.http.annotation.GuardedBy" type="ANNOTATION"> + <method changeStatus="REMOVED" name="value" returnType="java.lang.String"/> + </class> + <class changeStatus="REMOVED" fullyQualifiedName="org.apache.http.annotation.Immutable" type="ANNOTATION"/> + <class changeStatus="REMOVED" fullyQualifiedName="org.apache.http.annotation.NotThreadSafe" type="ANNOTATION"/> + <class changeStatus="REMOVED" fullyQualifiedName="org.apache.http.annotation.ThreadSafe" type="ANNOTATION"/> + <class changeStatus="NEW" fullyQualifiedName="org.apache.http.auth.AuthOption" type="CLASS"> + <method changeStatus="NEW" name="getAuthScheme" returnType="org.apache.http.auth.AuthScheme"/> + <method changeStatus="NEW" name="getCredentials" returnType="org.apache.http.auth.Credentials"/> + <method changeStatus="NEW" name="toString" returnType="java.lang.String"/> + </class> + <class changeStatus="NEW" fullyQualifiedName="org.apache.http.auth.AuthProtocolState" type="ENUM"> + <method changeStatus="NEW" name="valueOf" returnType="org.apache.http.auth.AuthProtocolState"> + <parameter type="java.lang.String"/> + </method> + <method changeStatus="NEW" name="values" returnType="org.apache.http.auth.AuthProtocolState[]"/> + </class> + ... ##Downloads## diff --git a/japicmp/src/main/java/japicmp/util/StringArrayEnumeration.java b/japicmp/src/main/java/japicmp/util/StringArrayEnumeration.java index 050f26c..19d84fd 100644 --- a/japicmp/src/main/java/japicmp/util/StringArrayEnumeration.java +++ b/japicmp/src/main/java/japicmp/util/StringArrayEnumeration.java @@ -13,12 +13,10 @@ public class StringArrayEnumeration implements Enumeration<String> { System.arraycopy(array, 0, this.array, 0, array.length); } - @Override public boolean hasMoreElements() { return pos < array.length; } - @Override public String nextElement() { if(hasMoreElements()) { return array[pos++];
