clirr-devel Mailing List for Clirr (Page 20)
Status: Alpha
Brought to you by:
lkuehne
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(15) |
Oct
(23) |
Nov
|
Dec
(25) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(9) |
Feb
|
Mar
|
Apr
|
May
(76) |
Jun
(207) |
Jul
(242) |
Aug
(42) |
Sep
(33) |
Oct
|
Nov
(7) |
Dec
(1) |
2005 |
Jan
|
Feb
|
Mar
(5) |
Apr
|
May
|
Jun
|
Jul
(3) |
Aug
(66) |
Sep
(38) |
Oct
(6) |
Nov
|
Dec
(2) |
2006 |
Jan
(17) |
Feb
(5) |
Mar
(28) |
Apr
(6) |
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
(1) |
Nov
(1) |
Dec
(7) |
2007 |
Jan
|
Feb
|
Mar
|
Apr
(7) |
May
(33) |
Jun
(4) |
Jul
(3) |
Aug
|
Sep
(5) |
Oct
|
Nov
|
Dec
|
2008 |
Jan
(4) |
Feb
(3) |
Mar
(2) |
Apr
|
May
(1) |
Jun
|
Jul
(6) |
Aug
(8) |
Sep
(5) |
Oct
(20) |
Nov
(7) |
Dec
(9) |
2009 |
Jan
(8) |
Feb
(3) |
Mar
(20) |
Apr
(10) |
May
(40) |
Jun
(11) |
Jul
(23) |
Aug
(4) |
Sep
(1) |
Oct
(1) |
Nov
|
Dec
(2) |
2010 |
Jan
(5) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
(3) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
|
Apr
(6) |
May
(22) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
(1) |
Dec
(2) |
2014 |
Jan
(5) |
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2015 |
Jan
(1) |
Feb
(2) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Simon K. <s_k...@us...> - 2004-07-20 07:08:25
|
Update of /cvsroot/clirr/clirr/core/src/test/net/sf/clirr/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11536 Modified Files: CheckerFactory.java Log Message: Add factory method for Checker instance with default set of checks. Index: CheckerFactory.java =================================================================== RCS file: /cvsroot/clirr/clirr/core/src/test/net/sf/clirr/core/CheckerFactory.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- CheckerFactory.java 11 Jul 2004 10:29:24 -0000 1.1 +++ CheckerFactory.java 20 Jul 2004 07:08:17 -0000 1.2 @@ -13,4 +13,9 @@ { return new Checker(check); } + + public static Checker createChecker() + { + return new Checker(); + } } |
From: Simon K. <s_k...@us...> - 2004-07-20 07:04:02
|
Update of /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10799 Modified Files: Message.java Log Message: Added basic toString() method for assistance in debugging. Index: Message.java =================================================================== RCS file: /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core/Message.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- Message.java 10 Jul 2004 13:37:26 -0000 1.1 +++ Message.java 20 Jul 2004 07:03:53 -0000 1.2 @@ -63,4 +63,9 @@ { return id; } + + public String toString() + { + return "Message#" + id; + } } |
From: Simon K. <s_k...@us...> - 2004-07-18 01:14:28
|
Update of /cvsroot/clirr/clirr/core/xdocs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28375 Modified Files: exegesis.xml Log Message: Fix spelling accessable -> accessible Index: exegesis.xml =================================================================== RCS file: /cvsroot/clirr/clirr/core/xdocs/exegesis.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- exegesis.xml 16 Jul 2004 08:45:24 -0000 1.2 +++ exegesis.xml 18 Jul 2004 01:14:19 -0000 1.3 @@ -140,7 +140,7 @@ <p> Section 13.4.3 of the java language specification states explicitly that an IllegalAccessError should occur if a pre-existing binary tries - to access a type when the type accessability has been changed to + to access a type when the type accessibility has been changed to something that would cause a compile-time error. However this does not appear to be enforced in practice, at least in current JVMs. Nevertheless this <i>should</i> be an error, and so clirr reports @@ -577,7 +577,7 @@ </p> </section> - <section name="7009 - Method is now Less Accessable"> + <section name="7009 - Method is now Less Accessible"> <p>Severity: <code>ERROR</code></p> <p> The access permissions associated with the specified method have @@ -597,7 +597,7 @@ </p> </section> - <section name="7010 - Method is now More Accessable"> + <section name="7010 - Method is now More Accessible"> <p>Severity: <code>INFO</code></p> <p> The access permissions associated with the specified method have |
From: Simon K. <s_k...@us...> - 2004-07-18 01:13:52
|
Update of /cvsroot/clirr/clirr/core/xdocs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28229 Modified Files: changes.xml Log Message: Add entry re package/private changes always being INFO severity Fix spelling accessability -> accessibility Index: changes.xml =================================================================== RCS file: /cvsroot/clirr/clirr/core/xdocs/changes.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- changes.xml 10 Jul 2004 13:24:04 -0000 1.1 +++ changes.xml 18 Jul 2004 01:13:44 -0000 1.2 @@ -33,7 +33,7 @@ are no longer reported as a compatibility problem. </action> <action dev="s_kitching" type="add"> - Report on classes changing accessability (top-level classes changing + Report on classes changing accessibility (top-level classes changing between public and package, or nested classes changing between any of public/protected/package/private). </action> @@ -50,6 +50,12 @@ <action dev="lkuehne" type="add"> Error messages are now localized. Initial supported languages are english and german. </action> + <action dev="s_kitching" type="fix"> + Treat all changes in package and private items as being of INFO level + severity only, ie changes which would result in an ERROR being + reported if they were public or protected are reported with a severity + of INFO if they are package or private. + </action> </release> <release version="0.3" date="2004-05-23"> |
From: Simon K. <s_k...@us...> - 2004-07-18 01:12:52
|
Update of /cvsroot/clirr/clirr/core/src/test/net/sf/clirr/core/internal/checks In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28118 Modified Files: TestDiffListener.java Log Message: Generate nice error message if an unexpected diff is encountered during a test. New code is needed because the toString() method of the ApiDifference class no longer generates a "report" string [because it needs a MessageTranslator parameter]. Index: TestDiffListener.java =================================================================== RCS file: /cvsroot/clirr/clirr/core/src/test/net/sf/clirr/core/internal/checks/TestDiffListener.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- TestDiffListener.java 16 Jul 2004 09:09:23 -0000 1.2 +++ TestDiffListener.java 18 Jul 2004 01:12:42 -0000 1.3 @@ -59,10 +59,12 @@ } } - for (Iterator it = diffs.iterator(); it.hasNext();) { + StringBuffer buf = null; + for (Iterator it = diffs.iterator(); it.hasNext();) + { ApiDifference actual = (ApiDifference) it.next(); - // see if the generated diff is in fact in the expected set + // see if the actual (generated) diff is in the expected set boolean found = false; for(int i=0; i<expectedDiffs.length && !found; ++i) { @@ -71,8 +73,23 @@ if (!found) { - TestCase.fail("unexpected diff " + actual); + if (buf == null) + { + buf = new StringBuffer(); + buf.append("Unexpected diffs: "); + } + else + { + buf.append(", "); + } + buf.append(actual.toString(translator)); } } + + if (buf != null) + { + // we must have found at least one unexpected diff + TestCase.fail(buf.toString()); + } } } |
From: Simon K. <s_k...@us...> - 2004-07-18 01:11:32
|
Update of /cvsroot/clirr/clirr/core/src/test/net/sf/clirr/core/internal/checks In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28090 Modified Files: MethodSetCheckTest.java Log Message: Fix spelling: accessability -> accessibility Index: MethodSetCheckTest.java =================================================================== RCS file: /cvsroot/clirr/clirr/core/src/test/net/sf/clirr/core/internal/checks/MethodSetCheckTest.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- MethodSetCheckTest.java 11 Jul 2004 10:29:24 -0000 1.1 +++ MethodSetCheckTest.java 18 Jul 2004 01:11:23 -0000 1.2 @@ -21,7 +21,7 @@ // method addition and removal new ExpectedDiff("Method 'public void removedMethod(java.lang.String)' has been removed", Severity.ERROR, "testlib.MethodsChange", "public void removedMethod(java.lang.String)", null), - new ExpectedDiff("Accessability of method 'public int getPriv2()' has been decreased from public to private", + new ExpectedDiff("Accessibility of method 'public int getPriv2()' has been decreased from public to private", Severity.ERROR, "testlib.MethodsChange", "public int getPriv2()", null), new ExpectedDiff("Method 'protected MethodsChange(int, boolean)' has been added", Severity.INFO, "testlib.MethodsChange", "protected MethodsChange(int, boolean)", null), |
From: Simon K. <s_k...@us...> - 2004-07-18 01:10:55
|
Update of /cvsroot/clirr/clirr/core/src/test/net/sf/clirr/core/internal/checks In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28027 Modified Files: FieldSetCheckTest.java Log Message: Fix spelling mistake: accessability -> accessibility Index: FieldSetCheckTest.java =================================================================== RCS file: /cvsroot/clirr/clirr/core/src/test/net/sf/clirr/core/internal/checks/FieldSetCheckTest.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- FieldSetCheckTest.java 11 Jul 2004 10:29:24 -0000 1.1 +++ FieldSetCheckTest.java 18 Jul 2004 01:10:46 -0000 1.2 @@ -18,13 +18,13 @@ { ExpectedDiff[] expected = new ExpectedDiff[] { new ExpectedDiff("Removed field stat7", Severity.ERROR, "testlib.MembersChange", null, "stat7"), - new ExpectedDiff("Accessability of field fin2 has been weakened from public to protected", Severity.ERROR, "testlib.MembersChange", null, "fin2"), - new ExpectedDiff("Accessability of field stat4 has been weakened from public to protected", Severity.ERROR, "testlib.MembersChange", null, "stat4"), - new ExpectedDiff("Accessability of field priv2 has been increased from private to public", Severity.INFO, "testlib.MembersChange", null, "priv2"), - new ExpectedDiff("Accessability of field stat5 has been weakened from public to private", Severity.ERROR, "testlib.MembersChange", null, "stat5"), + new ExpectedDiff("Accessibility of field fin2 has been weakened from public to protected", Severity.ERROR, "testlib.MembersChange", null, "fin2"), + new ExpectedDiff("Accessibility of field stat4 has been weakened from public to protected", Severity.ERROR, "testlib.MembersChange", null, "stat4"), + new ExpectedDiff("Accessibility of field priv2 has been increased from private to public", Severity.INFO, "testlib.MembersChange", null, "priv2"), + new ExpectedDiff("Accessibility of field stat5 has been weakened from public to private", Severity.ERROR, "testlib.MembersChange", null, "stat5"), new ExpectedDiff("Field stat2 is now final", Severity.ERROR, "testlib.MembersChange", null, "stat2"), new ExpectedDiff("Field pub3 is now final", Severity.ERROR, "testlib.MembersChange", null, "pub3"), - new ExpectedDiff("Accessability of field stat6 has been weakened from public to package", Severity.ERROR, "testlib.MembersChange", null, "stat6"), + new ExpectedDiff("Accessibility of field stat6 has been weakened from public to package", Severity.ERROR, "testlib.MembersChange", null, "stat6"), new ExpectedDiff("Field stat3 is now non-static", Severity.ERROR, "testlib.MembersChange", null, "stat3"), new ExpectedDiff("Field fin3 is now non-static", Severity.ERROR, "testlib.MembersChange", null, "fin3"), new ExpectedDiff("Added public field stat8", Severity.INFO, "testlib.MembersChange", null, "stat8"), |
From: Simon K. <s_k...@us...> - 2004-07-18 01:09:23
|
Update of /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core/internal/checks In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27906 Modified Files: MethodSetCheck.java Log Message: Fix spelling mistake: accessability -> accessibility Index: MethodSetCheck.java =================================================================== RCS file: /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core/internal/checks/MethodSetCheck.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- MethodSetCheck.java 16 Jul 2004 10:36:19 -0000 1.4 +++ MethodSetCheck.java 18 Jul 2004 01:09:15 -0000 1.5 @@ -150,7 +150,7 @@ * <p> * For these: * <ul> - * <li>report on changes in accessability, return type, etc + * <li>report on changes in accessibility, return type, etc * <li>remove from the list * </ul> * @@ -202,7 +202,7 @@ * <p> * There may also be other differences between methods that are regarded * as "soft matches": the exceptions thrown, the deprecation status of the - * methods, their accessability, etc. + * methods, their accessibility, etc. */ private boolean isSoftMatch(Method oldMethod, Method newMethod) { @@ -604,7 +604,7 @@ } /** - * Report changes in the declared accessability of a method + * Report changes in the declared accessibility of a method * (public/protected/etc). */ private void checkVisibility(JavaClass compatBaseline, Method baselineMethod, Method currentMethod) |
From: Simon K. <s_k...@us...> - 2004-07-18 01:07:10
|
Update of /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27656 Modified Files: XmlDiffListener.java Log Message: Removed unneeded imports Index: XmlDiffListener.java =================================================================== RCS file: /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core/XmlDiffListener.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- XmlDiffListener.java 11 Jul 2004 10:33:50 -0000 1.2 +++ XmlDiffListener.java 18 Jul 2004 01:07:02 -0000 1.3 @@ -19,10 +19,6 @@ package net.sf.clirr.core; -import net.sf.clirr.core.ApiDifference; -import net.sf.clirr.core.FileDiffListener; -import net.sf.clirr.core.MessageTranslator; - import java.io.IOException; import java.io.PrintStream; |
From: Simon K. <s_k...@us...> - 2004-07-18 01:06:19
|
Update of /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27488 Modified Files: ScopeSelector.java Log Message: * Fix checkstyle issue: lines longer than 110 chars * Fix spelling accessability -> accessibility Index: ScopeSelector.java =================================================================== RCS file: /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core/ScopeSelector.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- ScopeSelector.java 11 Jul 2004 10:33:50 -0000 1.2 +++ ScopeSelector.java 18 Jul 2004 01:06:10 -0000 1.3 @@ -43,7 +43,7 @@ public final class ScopeSelector { /** - * Represents an "accessability" level for a java class, field or method. + * Represents an "accessibility" level for a java class, field or method. * <p> * Change of access rights from lower to higher visibility rating is a * binary-compatible change. Change of access rights from higher to @@ -149,7 +149,7 @@ * base class and so are valid parameters to this method. * <p> * Note that despite JavaClass objects extending AccessFlags, the - * methods which determine the accessability of a JavaClass fail + * methods which determine the accessibility of a JavaClass fail * miserably (bad bcel design) for nested classes. Therefore this * method <i>must not</i> be passed a JavaClass object as a parameter. * If this is done, a RuntimeException will be thrown to indicate a @@ -183,7 +183,7 @@ * base class and so are valid parameters to this method. * <p> * Note that despite JavaClass objects extending AccessFlags, the - * methods which determine the accessability of a JavaClass fail + * methods which determine the accessibility of a JavaClass fail * miserably (bad bcel design) for nested classes. Therefore this * method <i>must not</i> be passed a JavaClass object as a parameter. * If this is done, a RuntimeException will be thrown to indicate a @@ -217,7 +217,7 @@ * base class and so are valid parameters to this method. * <p> * Note that despite JavaClass objects extending AccessFlags, the - * methods which determine the accessability of a JavaClass fail + * methods which determine the accessibility of a JavaClass fail * miserably (bad bcel design) for nested classes. Therefore this * method <i>must not</i> be passed a JavaClass object as a parameter. * If this is done, a RuntimeException will be thrown to indicate a @@ -251,7 +251,7 @@ * base class and so are valid parameters to this method. * <p> * Note that despite JavaClass objects extending AccessFlags, the - * methods which determine the accessability of a JavaClass fail + * methods which determine the accessibility of a JavaClass fail * miserably (bad bcel design) for nested classes. Therefore this * method <i>must not</i> be passed a JavaClass object as a parameter. * If this is done, a RuntimeException will be thrown to indicate a @@ -261,7 +261,9 @@ { if (object instanceof JavaClass) { - throw new RuntimeException("getScope called for JavaClass object. This is not permitted;" + " use method getClassScope for JavaClass objects."); + throw new RuntimeException( + "getScope called for JavaClass object. This is not permitted;" + + " use method getClassScope for JavaClass objects."); } @@ -337,7 +339,9 @@ if (enclosingClass == null) { - throw new CheckerException("Unable to locate enclosing class " + enclosingClassName + " for nested class " + jclassName); + throw new CheckerException( + "Unable to locate enclosing class " + enclosingClassName + + " for nested class " + jclassName); } ConstantPool pool = enclosingClass.getConstantPool(); @@ -367,7 +371,9 @@ } // weird; no nested class info found - throw new CheckerException("Unable to find information in class " + enclosingClass.getClassName() + " referring back to nested class " + jclassName); + throw new CheckerException( + "Unable to find information in class " + enclosingClass.getClassName() + + " referring back to nested class " + jclassName); } } |
From: Simon K. <s_k...@us...> - 2004-07-18 01:05:02
|
Update of /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27314 Modified Files: PlainDiffListener.java Log Message: Removed unneeded imports Index: PlainDiffListener.java =================================================================== RCS file: /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core/PlainDiffListener.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- PlainDiffListener.java 10 Jul 2004 13:37:26 -0000 1.1 +++ PlainDiffListener.java 18 Jul 2004 01:04:54 -0000 1.2 @@ -19,11 +19,6 @@ package net.sf.clirr.core; -import net.sf.clirr.core.ApiDifference; -import net.sf.clirr.core.FileDiffListener; -import net.sf.clirr.core.Message; -import net.sf.clirr.core.MessageTranslator; - import java.io.IOException; import java.io.PrintStream; |
From: Simon K. <s_k...@us...> - 2004-07-18 01:04:33
|
Update of /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27250 Modified Files: MessageTranslator.java Log Message: Remove unneeded imports Index: MessageTranslator.java =================================================================== RCS file: /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core/MessageTranslator.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- MessageTranslator.java 10 Jul 2004 13:37:26 -0000 1.1 +++ MessageTranslator.java 18 Jul 2004 01:04:22 -0000 1.2 @@ -19,9 +19,6 @@ package net.sf.clirr.core; -import net.sf.clirr.core.EventMessages; -import net.sf.clirr.core.Message; - import java.util.Locale; import java.util.Iterator; import java.util.Collection; |
From: Simon K. <s_k...@us...> - 2004-07-18 01:03:58
|
Update of /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27132 Modified Files: MessageManager.java Log Message: Remove unneeded import Index: MessageManager.java =================================================================== RCS file: /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core/MessageManager.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- MessageManager.java 10 Jul 2004 13:37:26 -0000 1.1 +++ MessageManager.java 18 Jul 2004 01:03:34 -0000 1.2 @@ -19,8 +19,6 @@ package net.sf.clirr.core; -import net.sf.clirr.core.Message; - import java.util.Iterator; import java.util.ArrayList; import java.util.Comparator; |
From: Simon K. <s_k...@us...> - 2004-07-18 01:02:20
|
Update of /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26949 Modified Files: FileDiffListener.java Log Message: Removed unneeded imports Index: FileDiffListener.java =================================================================== RCS file: /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core/FileDiffListener.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- FileDiffListener.java 10 Jul 2004 13:37:26 -0000 1.1 +++ FileDiffListener.java 18 Jul 2004 01:02:06 -0000 1.2 @@ -19,8 +19,6 @@ package net.sf.clirr.core; -import net.sf.clirr.core.DiffListenerAdapter; - import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.OutputStream; |
From: Simon K. <s_k...@us...> - 2004-07-18 01:01:37
|
Update of /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26872 Modified Files: DiffListenerAdapter.java Log Message: Removed unneeded imports Index: DiffListenerAdapter.java =================================================================== RCS file: /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core/DiffListenerAdapter.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- DiffListenerAdapter.java 11 Jul 2004 10:33:50 -0000 1.2 +++ DiffListenerAdapter.java 18 Jul 2004 01:01:28 -0000 1.3 @@ -19,10 +19,6 @@ package net.sf.clirr.core; -import net.sf.clirr.core.ApiDifference; -import net.sf.clirr.core.DiffListener; - - /** * Provides empty implementations for all methods * in the DiffListener interface. |
From: Simon K. <s_k...@us...> - 2004-07-18 01:00:46
|
Update of /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26777 Modified Files: DiffListener.java Log Message: Removed unused import Index: DiffListener.java =================================================================== RCS file: /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core/DiffListener.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- DiffListener.java 10 Jul 2004 13:37:26 -0000 1.1 +++ DiffListener.java 18 Jul 2004 01:00:38 -0000 1.2 @@ -19,8 +19,6 @@ package net.sf.clirr.core; -import net.sf.clirr.core.ApiDifference; - /** * Listener for API differences. * |
From: Simon K. <s_k...@us...> - 2004-07-18 01:00:07
|
Update of /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26580 Modified Files: Checker.java Log Message: Fix checkstyle issue: lines longer than 110 chars Index: Checker.java =================================================================== RCS file: /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core/Checker.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- Checker.java 11 Jul 2004 10:33:50 -0000 1.2 +++ Checker.java 18 Jul 2004 00:59:56 -0000 1.3 @@ -153,7 +153,11 @@ * old and new jars are to be compared. This parameter may be null, in * which case all classes in the old and new jars are compared. */ - public void reportDiffs(File[] origJars, File[] newJars, ClassLoader origThirdPartyLoader, ClassLoader newThirdPartyLoader, ClassSelector classSelector) throws CheckerException + public void reportDiffs( + File[] origJars, File[] newJars, + ClassLoader origThirdPartyLoader, ClassLoader newThirdPartyLoader, + ClassSelector classSelector) + throws CheckerException { if (classSelector == null) { @@ -161,9 +165,11 @@ classSelector = new ClassSelector(ClassSelector.MODE_UNLESS); } - final ClassSet origClasses = createClassSet(origJars, origThirdPartyLoader, classSelector); + final ClassSet origClasses = + createClassSet(origJars, origThirdPartyLoader, classSelector); - final ClassSet newClasses = createClassSet(newJars, newThirdPartyLoader, classSelector); + final ClassSet newClasses = + createClassSet(newJars, newThirdPartyLoader, classSelector); reportDiffs(origClasses, newClasses); } @@ -180,7 +186,9 @@ * old and new jars are to be compared. This parameter may be null, in * which case all classes in the old and new jars are compared. */ - private static ClassSet createClassSet(File[] jarFiles, ClassLoader thirdPartyClasses, ClassSelector classSelector) throws CheckerException + private static ClassSet createClassSet( + File[] jarFiles, ClassLoader thirdPartyClasses, ClassSelector classSelector) + throws CheckerException { if (classSelector == null) { @@ -204,7 +212,8 @@ } catch (IOException ex) { - throw new CheckerException("Cannot open " + jarFile + " for reading", ex); + throw new CheckerException( + "Cannot open " + jarFile + " for reading", ex); } Enumeration enumEntries = zip.entries(); while (enumEntries.hasMoreElements()) @@ -225,7 +234,9 @@ return ret; } - private static JavaClass extractClass(ZipEntry zipEntry, ZipFile zip, Repository repository) throws CheckerException + private static JavaClass extractClass( + ZipEntry zipEntry, ZipFile zip, Repository repository) + throws CheckerException { String name = zipEntry.getName(); InputStream is = null; @@ -240,7 +251,9 @@ } catch (IOException ex) { - throw new CheckerException("Cannot read " + zipEntry.getName() + " from " + zip.getName(), ex); + throw new CheckerException( + "Cannot read " + zipEntry.getName() + " from " + zip.getName(), + ex); } finally { @@ -258,7 +271,8 @@ } } - private static ClassLoader createClassLoader(File[] jarFiles, ClassLoader thirdPartyClasses) + private static ClassLoader createClassLoader( + File[] jarFiles, ClassLoader thirdPartyClasses) { final URL[] jarUrls = new URL[jarFiles.length]; for (int i = 0; i < jarFiles.length; i++) @@ -272,7 +286,9 @@ catch (MalformedURLException ex) { // this should never happen - final IllegalArgumentException illegalArgumentException = new IllegalArgumentException("Cannot create classloader with jar file " + jarFile); + final IllegalArgumentException illegalArgumentException = + new IllegalArgumentException( + "Cannot create classloader with jar file " + jarFile); illegalArgumentException.initCause(ex); throw illegalArgumentException; } @@ -291,19 +307,24 @@ * @param currentVersion the classes that are checked for * compatibility with compatibilityBaseline */ - private void reportDiffs(ClassSet compatibilityBaseline, ClassSet currentVersion) throws CheckerException + private void reportDiffs( + ClassSet compatibilityBaseline, ClassSet currentVersion) + throws CheckerException { fireStart(); runClassChecks(compatibilityBaseline, currentVersion); fireStop(); } - private void runClassChecks(ClassSet compatBaseline, ClassSet currentVersion) throws CheckerException + private void runClassChecks( + ClassSet compatBaseline, ClassSet currentVersion) + throws CheckerException { JavaClass[] compat = compatBaseline.toArray(); JavaClass[] current = currentVersion.toArray(); - CoIterator iter = new CoIterator(JavaClassNameComparator.COMPARATOR, compat, current); + CoIterator iter = new CoIterator( + JavaClassNameComparator.COMPARATOR, compat, current); while (iter.hasNext()) { @@ -315,13 +336,19 @@ if (compatBaselineClass == null) { final String className = currentClass.getClassName(); - final ApiDifference diff = new ApiDifference(MSG_CLASS_ADDED, Severity.INFO, className, null, null, null); + final ApiDifference diff = + new ApiDifference( + MSG_CLASS_ADDED, Severity.INFO, className, + null, null, null); fireDiff(diff); } else if (currentClass == null) { final String className = compatBaselineClass.getClassName(); - final ApiDifference diff = new ApiDifference(MSG_CLASS_REMOVED, Severity.ERROR, className, null, null, null); + final ApiDifference diff = + new ApiDifference( + MSG_CLASS_REMOVED, Severity.ERROR, className, + null, null, null); fireDiff(diff); } else @@ -331,7 +358,8 @@ for (Iterator it = classChecks.iterator(); it.hasNext() && continueTesting;) { ClassChangeCheck classChangeCheck = (ClassChangeCheck) it.next(); - continueTesting = classChangeCheck.check(compatBaselineClass, currentClass); + continueTesting = classChangeCheck.check( + compatBaselineClass, currentClass); } } } |
From: Simon K. <s_k...@us...> - 2004-07-18 00:58:43
|
Update of /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26507 Modified Files: ApiDifference.java Log Message: Fix checkstyle issue: line longer than 110 chars Index: ApiDifference.java =================================================================== RCS file: /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core/ApiDifference.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- ApiDifference.java 16 Jul 2004 09:39:04 -0000 1.2 +++ ApiDifference.java 18 Jul 2004 00:58:35 -0000 1.3 @@ -126,7 +126,11 @@ * made available for the message description string to reference via * the standard {n} syntax. */ - public ApiDifference(Message message, Severity binarySeverity, Severity sourceSeverity, String clazz, String method, String field, String[] args) + public ApiDifference( + Message message, + Severity binarySeverity, Severity sourceSeverity, + String clazz, String method, String field, + String[] args) { checkNonNull(message); checkNonNull(binarySeverity); |
From: Simon K. <s_k...@us...> - 2004-07-18 00:57:39
|
Update of /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/cli In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26418 Modified Files: Clirr.java Log Message: Fix checkstyle issues: lines longer than 110 chars Index: Clirr.java =================================================================== RCS file: /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/cli/Clirr.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- Clirr.java 11 Jul 2004 10:33:50 -0000 1.2 +++ Clirr.java 18 Jul 2004 00:57:31 -0000 1.3 @@ -65,9 +65,12 @@ options.addOption("o", "old-version", true, "jar files of old version"); options.addOption("n", "new-version", true, "jar files of new version"); options.addOption("s", "style", true, "output style [text|xml]"); - options.addOption("i", "include-pkg", true, "include only classes from this package and its subpackages"); - options.addOption("p", "show-pkg-scope", false, "show package scope classes"); - options.addOption("a", "show-all-scopes", false, "show private and package classes"); + options.addOption("i", "include-pkg", true, + "include only classes from this package and its subpackages"); + options.addOption("p", "show-pkg-scope", false, + "show package scope classes"); + options.addOption("a", "show-all-scopes", false, + "show private and package classes"); options.addOption("f", "output-file", true, "output file name"); CommandLine cmdline = null; @@ -174,7 +177,10 @@ { HelpFormatter hf = new HelpFormatter(); PrintWriter out = new PrintWriter(System.err); - hf.printHelp(75, "java " + getClass().getName() + " -o path -n path [options]", null, options, null); + hf.printHelp( + 75, + "java " + getClass().getName() + " -o path -n path [options]", + null, options, null); } private File[] pathToFileArray(String path) |
From: Simon K. <s_k...@us...> - 2004-07-18 00:56:27
|
Update of /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/ant In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26238 Modified Files: AntTask.java Log Message: Fix checkstyle issues: lines longer than 110 chars Index: AntTask.java =================================================================== RCS file: /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/ant/AntTask.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- AntTask.java 10 Jul 2004 13:37:26 -0000 1.1 +++ AntTask.java 18 Jul 2004 00:56:18 -0000 1.2 @@ -76,9 +76,11 @@ public void setType(String type) { String lowerCase = type.toLowerCase(); - if (!lowerCase.equals(FORMATTER_TYPE_XML) && !lowerCase.equals(FORMATTER_TYPE_PLAIN)) + if (!lowerCase.equals(FORMATTER_TYPE_XML) + && !lowerCase.equals(FORMATTER_TYPE_PLAIN)) { - throw new BuildException("Illegal formatter type, only plain and xml are supported"); + throw new BuildException( + "Illegal formatter type, only plain and xml are supported"); } this.type = type; @@ -189,7 +191,8 @@ if (origFiles == null || newFiles == null) { - throw new BuildException("Missing nested filesets origFiles and newFiles.", getLocation()); + throw new BuildException( + "Missing nested filesets origFiles and newFiles.", getLocation()); } if (newClassPath == null) @@ -207,12 +210,16 @@ if (origJars.length == 0) { - throw new BuildException("No files in nested fileset origFiles - nothing to check!" + " Please check your fileset specification."); + throw new BuildException( + "No files in nested fileset origFiles - nothing to check!" + + " Please check your fileset specification."); } if (newJars.length == 0) { - throw new BuildException("No files in nested fileset newFiles - nothing to check!" + " Please check your fileset specification."); + throw new BuildException( + "No files in nested fileset newFiles - nothing to check!" + + " Please check your fileset specification."); } final ClassLoader origThirdPartyLoader = createClasspathLoader(origClassPath); @@ -244,7 +251,8 @@ } catch (IOException ex) { - log("unable to initialize formatter: " + ex.getMessage(), Project.MSG_WARN); + log("unable to initialize formatter: " + ex.getMessage(), + Project.MSG_WARN); } } @@ -256,19 +264,22 @@ checker.addDiffListener(counter); try { - checker.reportDiffs(origJars, newJars, origThirdPartyLoader, newThirdPartyLoader, null); + checker.reportDiffs( + origJars, newJars, origThirdPartyLoader, newThirdPartyLoader, null); } catch (CheckerException ex) { throw new BuildException(ex.getMessage()); } - if (counter.getBinWarnings() > 0 && failOnBinWarning || counter.getBinErrors() > 0 && failOnBinError) + if ((counter.getBinWarnings() > 0 && failOnBinWarning) + || (counter.getBinErrors() > 0 && failOnBinError)) { throw new BuildException("detected binary incompatible API changes"); } - if (counter.getSrcWarnings() > 0 && failOnSrcWarning || counter.getSrcErrors() > 0 && failOnSrcError) + if ((counter.getSrcWarnings() > 0 && failOnSrcWarning) + || (counter.getSrcErrors() > 0 && failOnSrcError)) { throw new BuildException("detected source incompatible API changes"); } @@ -290,7 +301,9 @@ } catch (MalformedURLException ex) { - final IllegalArgumentException illegalArgEx = new IllegalArgumentException("Cannot create classLoader from classpath entry " + entry); + final IllegalArgumentException illegalArgEx = + new IllegalArgumentException( + "Cannot create classLoader from classpath entry " + entry); illegalArgEx.initCause(ex); throw illegalArgEx; } |
From: Simon K. <s_k...@us...> - 2004-07-18 00:55:22
|
Update of /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/ant In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26119 Modified Files: AntLogger.java Log Message: Fix checkstyle issue: line longer than 110 chars Index: AntLogger.java =================================================================== RCS file: /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/ant/AntLogger.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- AntLogger.java 11 Jul 2004 10:33:50 -0000 1.2 +++ AntLogger.java 18 Jul 2004 00:55:04 -0000 1.3 @@ -49,6 +49,9 @@ { final Severity severity = difference.getMaximumSeverity(); final Integer prio = (Integer) severityPrioMap.get(severity); - task.log(severity.toString() + ": " + difference.getAffectedClass() + ": " + difference.getReport(translator), prio.intValue()); + task.log( + severity.toString() + ": " + difference.getAffectedClass() + + ": " + difference.getReport(translator), + prio.intValue()); } } |
From: Simon K. <s_k...@us...> - 2004-07-18 00:53:07
|
Update of /cvsroot/clirr/clirr/core/src/conf/net/sf/clirr/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25953 Modified Files: EventMessages_en.properties Log Message: Fix (my) spelling mistake: accessability -> accessibility. Index: EventMessages_en.properties =================================================================== RCS file: /cvsroot/clirr/clirr/core/src/conf/net/sf/clirr/core/EventMessages_en.properties,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- EventMessages_en.properties 10 Jul 2004 13:37:26 -0000 1.1 +++ EventMessages_en.properties 18 Jul 2004 00:52:55 -0000 1.2 @@ -54,8 +54,8 @@ m6006=Field {2} is now final m6007=Field {2} is now non-static m6008=Field {2} is now static -m6009=Accessability of field {2} has been increased from {3} to {4} -m6010=Accessability of field {2} has been weakened from {3} to {4} +m6009=Accessibility of field {2} has been increased from {3} to {4} +m6010=Accessibility of field {2} has been weakened from {3} to {4} #----------------------------------------------------------------------------- # MethodSetCheck messages @@ -69,8 +69,8 @@ m7006=Return type of method ''{1}'' has been changed to {3} m7007=Method ''{1}'' has been deprecated m7008=Method ''{1}'' is no longer deprecated -m7009=Accessability of method ''{1}'' has been decreased from {3} to {4} -m7010=Accessability of method ''{1}'' has been increased from {3} to {4} +m7009=Accessibility of method ''{1}'' has been decreased from {3} to {4} +m7010=Accessibility of method ''{1}'' has been increased from {3} to {4} m7011=Method ''{1}'' has been added m7012=Method ''{1}'' has been added to an interface m7013=Abstract method ''{1}'' has been added |
From: Simon K. <s_k...@us...> - 2004-07-16 10:37:16
|
Update of /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core/internal/checks In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14375 Modified Files: GenderChangeCheck.java Log Message: Fixed checkstyle problems Index: GenderChangeCheck.java =================================================================== RCS file: /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core/internal/checks/GenderChangeCheck.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- GenderChangeCheck.java 16 Jul 2004 10:14:08 -0000 1.3 +++ GenderChangeCheck.java 16 Jul 2004 10:36:52 -0000 1.4 @@ -32,7 +32,7 @@ * @author lkuehne */ public final class GenderChangeCheck - extends AbstractDiffReporter + extends AbstractDiffReporter implements ClassChangeCheck { private static final Message MSG_GENDER_CLASS_TO_INTERFACE = new Message(2000); |
From: Simon K. <s_k...@us...> - 2004-07-16 10:36:47
|
Update of /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core/internal/checks In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14349 Modified Files: FieldSetCheck.java Log Message: Fixed checkstyle problems Index: FieldSetCheck.java =================================================================== RCS file: /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core/internal/checks/FieldSetCheck.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- FieldSetCheck.java 16 Jul 2004 10:11:21 -0000 1.3 +++ FieldSetCheck.java 16 Jul 2004 10:36:38 -0000 1.4 @@ -38,8 +38,8 @@ * * @author lkuehne */ -public class FieldSetCheck - extends AbstractDiffReporter +public class FieldSetCheck + extends AbstractDiffReporter implements ClassChangeCheck { private static final Message MSG_FIELD_ADDED = new Message(6000); @@ -98,8 +98,8 @@ { final String name = cField.getName(); String scope = ScopeSelector.getScopeDesc(cField); - fireDiff(MSG_FIELD_ADDED, - Severity.INFO, currentClass, cField, + fireDiff(MSG_FIELD_ADDED, + Severity.INFO, currentClass, cField, new String[]{scope}); } } @@ -239,10 +239,10 @@ } private void fireDiff( - Message msg, - Severity severity, - JavaClass clazz, - Field field, + Message msg, + Severity severity, + JavaClass clazz, + Field field, String[] args) { final String className = clazz.getClassName(); |
From: Simon K. <s_k...@us...> - 2004-07-16 10:36:34
|
Update of /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core/internal/checks In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14285 Modified Files: MethodSetCheck.java Log Message: Use new getSeverity method to suppress ERRORs for package & private diffs. Corrected spelling of accessable->accessible. Added some TODO comments. Wrapped some overly-long lines. Index: MethodSetCheck.java =================================================================== RCS file: /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core/internal/checks/MethodSetCheck.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- MethodSetCheck.java 11 Jul 2004 10:38:32 -0000 1.3 +++ MethodSetCheck.java 16 Jul 2004 10:36:19 -0000 1.4 @@ -43,7 +43,9 @@ * * @author lkuehne */ -public class MethodSetCheck extends AbstractDiffReporter implements ClassChangeCheck +public class MethodSetCheck + extends AbstractDiffReporter + implements ClassChangeCheck { private static final Message MSG_METHOD_NOW_IN_SUPERCLASS = new Message(7000); private static final Message MSG_METHOD_NOW_IN_INTERFACE = new Message(7001); @@ -54,8 +56,8 @@ private static final Message MSG_METHOD_RETURNTYPE_CHANGED = new Message(7006); private static final Message MSG_METHOD_DEPRECATED = new Message(7007); private static final Message MSG_METHOD_UNDEPRECATED = new Message(7008); - private static final Message MSG_METHOD_LESS_ACCESSABLE = new Message(7009); - private static final Message MSG_METHOD_MORE_ACCESSABLE = new Message(7010); + private static final Message MSG_METHOD_LESS_ACCESSIBLE = new Message(7009); + private static final Message MSG_METHOD_MORE_ACCESSIBLE = new Message(7010); private static final Message MSG_METHOD_ADDED = new Message(7011); private static final Message MSG_METHOD_ADDED_TO_INTERFACE = new Message(7012); private static final Message MSG_ABSTRACT_METHOD_ADDED = new Message(7013); @@ -63,7 +65,8 @@ private ScopeSelector scopeSelector; /** - * Instatiates the check. + * Instantiates the check. + * * @param dispatcher the dispatcher where detected differences shoudl be reported. * @param scopeSelector defines the scopes to look at when searching for differences. */ @@ -114,9 +117,14 @@ List baselineMethods = (List) bNameToMethod.get(baselineMethodName); List currentMethods = (List) cNameToMethod.get(currentMethodName); - filterSoftMatchedMethods(compatBaseline, baselineMethods, currentVersion, currentMethods); - - filterChangedMethods(baselineMethodName, compatBaseline, baselineMethods, currentVersion, currentMethods); + filterSoftMatchedMethods( + compatBaseline, baselineMethods, + currentVersion, currentMethods); + + filterChangedMethods( + baselineMethodName, + compatBaseline, baselineMethods, + currentVersion, currentMethods); // if any methods are left, they have no matching method in // the other version, so report as removed or added respectively. @@ -155,7 +163,11 @@ * Note that one or both method lists may be empty on return from * this method. */ - private void filterSoftMatchedMethods(JavaClass compatBaseline, List baselineMethods, JavaClass currentVersion, List currentMethods) + private void filterSoftMatchedMethods( + JavaClass compatBaseline, + List baselineMethods, + JavaClass currentVersion, + List currentMethods) { for (Iterator bIter = baselineMethods.iterator(); bIter.hasNext();) { @@ -220,7 +232,12 @@ * <p> * On return, at least one of the method lists will be empty. */ - private void filterChangedMethods(String methodName, JavaClass compatBaseline, List baselineMethods, JavaClass currentVersion, List currentMethods) + private void filterChangedMethods( + String methodName, + JavaClass compatBaseline, + List baselineMethods, + JavaClass currentVersion, + List currentMethods) { // ok, we now have to deal with the tricky cases, where it is not // immediately obvious which old methods correspond to which new @@ -349,7 +366,10 @@ /** * Given a list of methods, report each one as being removed. */ - private void reportMethodsRemoved(JavaClass baselineClass, List baselineMethods, JavaClass currentClass) + private void reportMethodsRemoved( + JavaClass baselineClass, + List baselineMethods, + JavaClass currentClass) { for (Iterator i = baselineMethods.iterator(); i.hasNext();) { @@ -364,7 +384,10 @@ * @param oldMethod the method that has been removed * @param currentClass the superclass where the method is now available, might be null */ - private void reportMethodRemoved(JavaClass oldClass, Method oldMethod, JavaClass currentClass) + private void reportMethodRemoved( + JavaClass oldClass, + Method oldMethod, + JavaClass currentClass) { if (!scopeSelector.isSelected(oldMethod)) { @@ -381,22 +404,30 @@ if (superClassName != null) { - fireDiff(MSG_METHOD_NOW_IN_SUPERCLASS, Severity.INFO, oldClass, oldMethod, new String[]{superClassName}); + fireDiff(MSG_METHOD_NOW_IN_SUPERCLASS, + Severity.INFO, oldClass, oldMethod, + new String[] {superClassName}); } else if (superInterfaceName != null) { - fireDiff(MSG_METHOD_NOW_IN_INTERFACE, Severity.INFO, oldClass, oldMethod, new String[]{superInterfaceName}); + fireDiff(MSG_METHOD_NOW_IN_INTERFACE, + Severity.INFO, oldClass, oldMethod, + new String[] {superInterfaceName}); } else { - fireDiff(MSG_METHOD_REMOVED, Severity.ERROR, oldClass, oldMethod, null); + fireDiff(MSG_METHOD_REMOVED, + getSeverity(oldClass, oldMethod, Severity.ERROR), + oldClass, oldMethod, null); } } /** * Given a list of methods, report each one as being added. */ - private void reportMethodsAdded(JavaClass currentClass, List currentMethods) + private void reportMethodsAdded( + JavaClass currentClass, + List currentMethods) { for (Iterator i = currentMethods.iterator(); i.hasNext();) { @@ -417,15 +448,42 @@ if (newClass.isInterface()) { - fireDiff(MSG_METHOD_ADDED_TO_INTERFACE, Severity.ERROR, newClass, newMethod, null); + // TODO: this is not an incompatibility if the new method + // actually already exists on a parent interface of the + // old interface. In that case, any class implementing the + // old version of this interface must already have an + // implementation of this method. See bugtracker #961217 + fireDiff(MSG_METHOD_ADDED_TO_INTERFACE, + getSeverity(newClass, newMethod, Severity.ERROR), + newClass, newMethod, null); } else if (newMethod.isAbstract()) { - fireDiff(MSG_ABSTRACT_METHOD_ADDED, Severity.ERROR, newClass, newMethod, null); + // TODO: this is not an incompatibility if the new method + // actually already exists on a parent interface of the + // old interface and was abstract. In that case, any class + // extending the old version of this class must already + // have an implementation of this method. + // + // Note that abstract methods can never be package or private + // scope, so we don't need to use the getSeverity method. + fireDiff(MSG_ABSTRACT_METHOD_ADDED, + Severity.ERROR, newClass, newMethod, null); } else { - fireDiff(MSG_METHOD_ADDED, Severity.INFO, newClass, newMethod, null); + // TODO: + //. (a) check whether this method exists on a parent of the + // new class. If so, indicate that this new method is overriding + // some inherited method. + // (b) if not a, then check whether this method exists on a parent + // of the old class. If so, then report that the method has + // been moved from the parent to the child class. This is + // potentially useful info for the user. + // + // See bugtracker #959225 + fireDiff(MSG_METHOD_ADDED, + Severity.INFO, newClass, newMethod, null); } } @@ -473,7 +531,9 @@ if (bArgs.length != cArgs.length) { - fireDiff(MSG_METHOD_ARGCOUNT_CHANGED, Severity.ERROR, compatBaseline, baselineMethod, null); + fireDiff(MSG_METHOD_ARGCOUNT_CHANGED, + getSeverity(compatBaseline, baselineMethod, Severity.ERROR), + compatBaseline, baselineMethod, null); return; } @@ -489,8 +549,14 @@ } // TODO: Check assignability... - String[] args = {"" + (i + 1), cArg.toString()}; - fireDiff(MSG_METHOD_PARAMTYPE_CHANGED, Severity.ERROR, compatBaseline, baselineMethod, args); + String[] args = + { + "" + (i + 1), + cArg.toString() + }; + fireDiff(MSG_METHOD_PARAMTYPE_CHANGED, + getSeverity(compatBaseline, baselineMethod, Severity.ERROR), + compatBaseline, baselineMethod, args); } } @@ -504,27 +570,36 @@ // compatible even when binary-incompatible. if (!bReturnType.toString().equals(cReturnType.toString())) { - fireDiff(MSG_METHOD_RETURNTYPE_CHANGED, Severity.ERROR, compatBaseline, baselineMethod, new String[]{cReturnType.toString()}); + fireDiff(MSG_METHOD_RETURNTYPE_CHANGED, + getSeverity(compatBaseline, baselineMethod, Severity.ERROR), + compatBaseline, baselineMethod, + new String[] {cReturnType.toString()}); } } - private void checkDeclaredExceptions(JavaClass compatBaseline, Method baselineMethod, Method currentMethod) + private void checkDeclaredExceptions( + JavaClass compatBaseline, + Method baselineMethod, Method currentMethod) { // TODO } - private void checkDeprecated(JavaClass compatBaseline, Method baselineMethod, Method currentMethod) + private void checkDeprecated( + JavaClass compatBaseline, + Method baselineMethod, Method currentMethod) { boolean bIsDeprecated = isDeprecated(baselineMethod); boolean cIsDeprecated = isDeprecated(currentMethod); if (bIsDeprecated && !cIsDeprecated) { - fireDiff(MSG_METHOD_UNDEPRECATED, Severity.INFO, compatBaseline, baselineMethod, null); + fireDiff(MSG_METHOD_UNDEPRECATED, + Severity.INFO, compatBaseline, baselineMethod, null); } else if (!bIsDeprecated && cIsDeprecated) { - fireDiff(MSG_METHOD_DEPRECATED, Severity.INFO, compatBaseline, baselineMethod, null); + fireDiff(MSG_METHOD_DEPRECATED, + Severity.INFO, compatBaseline, baselineMethod, null); } } @@ -540,12 +615,15 @@ if (cScope.isLessVisibleThan(bScope)) { String[] args = {bScope.getDesc(), cScope.getDesc()}; - fireDiff(MSG_METHOD_LESS_ACCESSABLE, Severity.ERROR, compatBaseline, baselineMethod, args); + fireDiff(MSG_METHOD_LESS_ACCESSIBLE, + getSeverity(compatBaseline, baselineMethod, Severity.ERROR), + compatBaseline, baselineMethod, args); } else if (cScope.isMoreVisibleThan(bScope)) { String[] args = {bScope.getDesc(), cScope.getDesc()}; - fireDiff(MSG_METHOD_MORE_ACCESSABLE, Severity.INFO, compatBaseline, baselineMethod, args); + fireDiff(MSG_METHOD_MORE_ACCESSIBLE, + Severity.INFO, compatBaseline, baselineMethod, args); } } @@ -601,9 +679,10 @@ private void fireDiff(Message msg, Severity severity, JavaClass clazz, Method method, String[] args) { final String className = clazz.getClassName(); - final ApiDifference diff = new ApiDifference(msg, severity, className, getMethodId(clazz, method), null, args); + final ApiDifference diff = + new ApiDifference( + msg, severity, className, getMethodId(clazz, method), null, args); getApiDiffDispatcher().fireDiff(diff); - } private boolean isDeprecated(Method method) |