clirr-devel Mailing List for Clirr (Page 21)
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-16 10:17:02
|
Update of /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core/internal/checks In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11612 Modified Files: InterfaceSetCheck.java Log Message: Use new getSeverity method to suppress ERRORs for package & private diffs. Added some TODO comments. Wrapped some overly-long lines. Index: InterfaceSetCheck.java =================================================================== RCS file: /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core/internal/checks/InterfaceSetCheck.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- InterfaceSetCheck.java 11 Jul 2004 10:33:50 -0000 1.2 +++ InterfaceSetCheck.java 16 Jul 2004 10:16:50 -0000 1.3 @@ -36,7 +36,9 @@ * * @author lkuehne */ -public final class InterfaceSetCheck extends AbstractDiffReporter implements ClassChangeCheck +public final class InterfaceSetCheck + extends AbstractDiffReporter + implements ClassChangeCheck { private static final Message MSG_IFACE_ADDED = new Message(4000); private static final Message MSG_IFACE_REMOVED = new Message(4001); @@ -63,7 +65,8 @@ final String className = compatBaseline.getClassName(); - CoIterator iter = new CoIterator(JavaClassNameComparator.COMPARATOR, compat, current); + CoIterator iter = new CoIterator( + JavaClassNameComparator.COMPARATOR, compat, current); while (iter.hasNext()) { @@ -72,7 +75,8 @@ JavaClass compatInterface = (JavaClass) iter.getLeft(); JavaClass currentInterface = (JavaClass) iter.getRight(); - if (className.equals(compatInterface.getClassName()) || className.equals(currentInterface.getClassName())) + if (className.equals(compatInterface.getClassName()) + || className.equals(currentInterface.getClassName())) { // This occurs because an interface has itself in the set of all interfaces. // We can't just let the test below handle this case because that won't @@ -82,11 +86,24 @@ if (compatInterface == null) { - log(MSG_IFACE_ADDED, Severity.INFO, className, null, null, new String[]{currentInterface.getClassName()}); + // TODO: check whether the class already implements + // throwable. If so, this should probably be a warning, + // because the presence of this extra interface could + // change exception-catching behaviour. + // + // Actually, it could also change code which uses + // "instance-of" and similar methods too, even when not + // a throwable. However this is fairly low probability.. + log(MSG_IFACE_ADDED, + Severity.INFO, className, null, null, + new String[] {currentInterface.getClassName()}); } else if (currentInterface == null) { - log(MSG_IFACE_REMOVED, Severity.ERROR, className, null, null, new String[]{compatInterface.getClassName()}); + log(MSG_IFACE_REMOVED, + getSeverity(compatBaseline, Severity.ERROR), + className, null, null, + new String[] {compatInterface.getClassName()}); } } |
|
From: Simon K. <s_k...@us...> - 2004-07-16 10:14:17
|
Update of /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core/internal/checks In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11308 Modified Files: GenderChangeCheck.java Log Message: Use new getSeverity method to suppress ERRORs for package & private diffs. Wrapped some overly-long lines. Index: GenderChangeCheck.java =================================================================== RCS file: /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core/internal/checks/GenderChangeCheck.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- GenderChangeCheck.java 11 Jul 2004 10:33:50 -0000 1.2 +++ GenderChangeCheck.java 16 Jul 2004 10:14:08 -0000 1.3 @@ -31,7 +31,9 @@ * * @author lkuehne */ -public final class GenderChangeCheck extends AbstractDiffReporter implements ClassChangeCheck +public final class GenderChangeCheck + extends AbstractDiffReporter + implements ClassChangeCheck { private static final Message MSG_GENDER_CLASS_TO_INTERFACE = new Message(2000); private static final Message MSG_GENDER_INTERFACE_TO_CLASS = new Message(2001); @@ -51,11 +53,15 @@ { if (baseLine.isClass() && current.isInterface()) { - log(MSG_GENDER_CLASS_TO_INTERFACE, Severity.ERROR, baseLine.getClassName(), null, null, null); + log(MSG_GENDER_CLASS_TO_INTERFACE, + getSeverity(baseLine, Severity.ERROR), + baseLine.getClassName(), null, null, null); } else if (baseLine.isInterface() && current.isClass()) { - log(MSG_GENDER_INTERFACE_TO_CLASS, Severity.ERROR, baseLine.getClassName(), null, null, null); + log(MSG_GENDER_INTERFACE_TO_CLASS, + getSeverity(baseLine, Severity.ERROR), + baseLine.getClassName(), null, null, null); } return true; |
|
From: Simon K. <s_k...@us...> - 2004-07-16 10:11:36
|
Update of /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core/internal/checks In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10924 Modified Files: FieldSetCheck.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: FieldSetCheck.java =================================================================== RCS file: /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core/internal/checks/FieldSetCheck.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- FieldSetCheck.java 11 Jul 2004 10:33:50 -0000 1.2 +++ FieldSetCheck.java 16 Jul 2004 10:11:21 -0000 1.3 @@ -38,7 +38,9 @@ * * @author lkuehne */ -public class FieldSetCheck extends AbstractDiffReporter implements ClassChangeCheck +public class FieldSetCheck + extends AbstractDiffReporter + implements ClassChangeCheck { private static final Message MSG_FIELD_ADDED = new Message(6000); private static final Message MSG_FIELD_REMOVED = new Message(6001); @@ -49,8 +51,8 @@ private static final Message MSG_FIELD_NOW_FINAL = new Message(6006); private static final Message MSG_FIELD_NOW_NON_STATIC = new Message(6007); private static final Message MSG_FIELD_NOW_STATIC = new Message(6008); - private static final Message MSG_FIELD_MORE_ACCESSABLE = new Message(6009); - private static final Message MSG_FIELD_LESS_ACCESSABLE = new Message(6010); + private static final Message MSG_FIELD_MORE_ACCESSIBLE = new Message(6009); + private static final Message MSG_FIELD_LESS_ACCESSIBLE = new Message(6010); private static final class FieldNameComparator implements Comparator { @@ -80,7 +82,8 @@ final Field[] baselineFields = baselineClass.getFields(); final Field[] currentFields = currentClass.getFields(); - CoIterator iter = new CoIterator(COMPARATOR, baselineFields, currentFields); + CoIterator iter = new CoIterator( + COMPARATOR, baselineFields, currentFields); while (iter.hasNext()) { @@ -95,15 +98,25 @@ { final String name = cField.getName(); String scope = ScopeSelector.getScopeDesc(cField); - fireDiff(MSG_FIELD_ADDED, Severity.INFO, currentClass, cField, new String[]{scope}); + fireDiff(MSG_FIELD_ADDED, + Severity.INFO, currentClass, cField, + new String[]{scope}); } } else if (cField == null) { if (scopeSelector.isSelected(bField)) { + // TODO: This is not an error if the field is a + // compile-time constant, because the value will + // have been inlined into callers [Q: is this + // mandatory, or only allowed by the java spec?]. + // See bugtracker #961222 + final String name = bField.getName(); - fireDiff(MSG_FIELD_REMOVED, Severity.ERROR, baselineClass, bField, null); + fireDiff(MSG_FIELD_REMOVED, + getSeverity(baselineClass, bField, Severity.ERROR), + baselineClass, bField, null); } } else if (scopeSelector.isSelected(bField) || scopeSelector.isSelected(cField)) @@ -133,7 +146,15 @@ final ConstantValue cVal = cField.getConstantValue(); if (cVal == null) { - fireDiff(MSG_FIELD_NOT_CONSTANT, Severity.WARNING, currentClass, cField, null); + // TODO: also check whether old field is final. If it's not + // final, then external code cannot have inlined the + // constant, and therefore we can issue an INFO instead + // of a warning. Actually, may be better to introduce a + // different message code rather than issue this code with + // two different severity levels.. + fireDiff(MSG_FIELD_NOT_CONSTANT, + getSeverity(currentClass, bField, Severity.WARNING), + currentClass, cField, null); return; } @@ -142,7 +163,11 @@ { // TODO: print out old and new value // How can that be done with BCEL, esp. for boolean values? - fireDiff(MSG_FIELD_CONSTANT_CHANGED, Severity.WARNING, currentClass, cField, null); + // + // TODO: also check whether field is final (see above). + fireDiff(MSG_FIELD_CONSTANT_CHANGED, + getSeverity(currentClass, bField, Severity.WARNING), + currentClass, cField, null); } } } @@ -153,7 +178,10 @@ final String cSig = cField.getType().toString(); if (!bSig.equals(cSig)) { - fireDiff(MSG_FIELD_TYPE_CHANGED, Severity.ERROR, currentClass, bField, new String[]{bSig, cSig}); + fireDiff(MSG_FIELD_TYPE_CHANGED, + getSeverity(currentClass, bField, Severity.ERROR), + currentClass, bField, + new String[] {bSig, cSig}); } } @@ -161,7 +189,8 @@ { if (bField.isFinal() && !cField.isFinal()) { - fireDiff(MSG_FIELD_NOW_NON_FINAL, Severity.INFO, clazz, cField, null); + fireDiff(MSG_FIELD_NOW_NON_FINAL, + Severity.INFO, clazz, cField, null); } if (!bField.isFinal() && cField.isFinal()) @@ -171,12 +200,16 @@ if (bField.isStatic() && !cField.isStatic()) { - fireDiff(MSG_FIELD_NOW_NON_STATIC, Severity.ERROR, clazz, cField, null); + fireDiff(MSG_FIELD_NOW_NON_STATIC, + getSeverity(clazz, bField, Severity.ERROR), + clazz, cField, null); } if (!bField.isStatic() && cField.isStatic()) { - fireDiff(MSG_FIELD_NOW_STATIC, Severity.ERROR, clazz, cField, null); + fireDiff(MSG_FIELD_NOW_STATIC, + getSeverity(clazz, bField, Severity.ERROR), + clazz, cField, null); } // JLS, 13.4.10: Adding or deleting a transient modifier of a field @@ -192,19 +225,30 @@ if (cScope.isMoreVisibleThan(bScope)) { - fireDiff(MSG_FIELD_MORE_ACCESSABLE, Severity.INFO, clazz, cField, new String[]{bScope.getDesc(), cScope.getDesc()}); + fireDiff(MSG_FIELD_MORE_ACCESSIBLE, + Severity.INFO, clazz, cField, + new String[] {bScope.getDesc(), cScope.getDesc()}); } else if (cScope.isLessVisibleThan(bScope)) { - fireDiff(MSG_FIELD_LESS_ACCESSABLE, Severity.ERROR, clazz, cField, new String[]{bScope.getDesc(), cScope.getDesc()}); + fireDiff(MSG_FIELD_LESS_ACCESSIBLE, + getSeverity(clazz, bField, Severity.ERROR), + clazz, cField, + new String[] {bScope.getDesc(), cScope.getDesc()}); } } - private void fireDiff(Message msg, Severity severity, JavaClass clazz, Field field, String[] args) + private void fireDiff( + Message msg, + Severity severity, + JavaClass clazz, + Field field, + String[] args) { final String className = clazz.getClassName(); - final ApiDifference diff = new ApiDifference(msg, severity, className, null, field.getName(), args); + final ApiDifference diff = + new ApiDifference( + msg, severity, className, null, field.getName(), args); getApiDiffDispatcher().fireDiff(diff); - } } |
|
From: Simon K. <s_k...@us...> - 2004-07-16 09:58:34
|
Update of /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core/internal/checks In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9259 Modified Files: ClassModifierCheck.java Log Message: Use new getSeverity method to suppress ERRORs for package & private diffs. Also wrapped some overly-long lines. Index: ClassModifierCheck.java =================================================================== RCS file: /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core/internal/checks/ClassModifierCheck.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- ClassModifierCheck.java 11 Jul 2004 10:33:50 -0000 1.2 +++ ClassModifierCheck.java 16 Jul 2004 09:58:25 -0000 1.3 @@ -35,7 +35,9 @@ * * @author lkuehne */ -public final class ClassModifierCheck extends AbstractDiffReporter implements ClassChangeCheck +public final class ClassModifierCheck + extends AbstractDiffReporter + implements ClassChangeCheck { private static final Message MSG_MODIFIER_UNABLE_TO_DETERMINE_CLASS_SCOPE = new Message(3000); private static final Message MSG_MODIFIER_REMOVED_FINAL = new Message(3001); @@ -70,7 +72,8 @@ } catch (CheckerException ex) { - log(MSG_MODIFIER_UNABLE_TO_DETERMINE_CLASS_SCOPE, Severity.ERROR, className, null, null, null); + log(MSG_MODIFIER_UNABLE_TO_DETERMINE_CLASS_SCOPE, + Severity.ERROR, className, null, null, null); return true; } @@ -83,28 +86,35 @@ if (compatIsFinal && !currentIsFinal) { - log(MSG_MODIFIER_REMOVED_FINAL, Severity.INFO, className, null, null, null); + log(MSG_MODIFIER_REMOVED_FINAL, + Severity.INFO, className, null, null, null); } else if (!compatIsFinal && currentIsFinal) { if (isEffectivelyFinal(compatBaseLine)) { - log(MSG_MODIFIER_ADDED_FINAL_TO_EFFECTIVE_FINAL, Severity.INFO, className, null, null, null); + log(MSG_MODIFIER_ADDED_FINAL_TO_EFFECTIVE_FINAL, + Severity.INFO, className, null, null, null); } else { - log(MSG_MODIFIER_ADDED_FINAL, Severity.ERROR, className, null, null, null); + log(MSG_MODIFIER_ADDED_FINAL, + getSeverity(compatBaseLine, Severity.ERROR), + className, null, null, null); } } // interfaces are always abstract, don't report gender change here if (compatIsAbstract && !currentIsAbstract && !compatIsInterface) { - log(MSG_MODIFIER_REMOVED_ABSTRACT, Severity.INFO, className, null, null, null); + log(MSG_MODIFIER_REMOVED_ABSTRACT, + Severity.INFO, className, null, null, null); } else if (!compatIsAbstract && currentIsAbstract && !currentIsInterface) { - log(MSG_MODIFIER_ADDED_ABSTRACT, Severity.ERROR, className, null, null, null); + log(MSG_MODIFIER_ADDED_ABSTRACT, + getSeverity(compatBaseLine, Severity.ERROR), + className, null, null, null); } return true; |
|
From: Simon K. <s_k...@us...> - 2004-07-16 09:53:19
|
Update of /cvsroot/clirr/clirr/core/src/test/net/sf/clirr/core/internal/checks In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8545 Modified Files: ClassScopeCheckTest.java Log Message: A change of accessibility from package to private is now an INFO change, not an ERROR, because we now never consider a change involving only package and private items to be an error. Index: ClassScopeCheckTest.java =================================================================== RCS file: /cvsroot/clirr/clirr/core/src/test/net/sf/clirr/core/internal/checks/ClassScopeCheckTest.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- ClassScopeCheckTest.java 11 Jul 2004 10:29:24 -0000 1.1 +++ ClassScopeCheckTest.java 16 Jul 2004 09:53:03 -0000 1.2 @@ -27,7 +27,8 @@ new ExpectedDiff("Increased visibility of class from package to public", Severity.INFO, "testlib.scope.ClassScopeChange$C2", null, null), new ExpectedDiff("Increased visibility of class from package to protected", Severity.INFO, "testlib.scope.ClassScopeChange$C3", null, null), - new ExpectedDiff("Decreased visibility of class from package to private", Severity.ERROR, "testlib.scope.ClassScopeChange$C4", null, null), + // package->private is not an error, just an info, because we never report error for package or private diffs + new ExpectedDiff("Decreased visibility of class from package to private", Severity.INFO, "testlib.scope.ClassScopeChange$C4", null, null), new ExpectedDiff("Increased visibility of class from private to public", Severity.INFO, "testlib.scope.ClassScopeChange$D2", null, null), new ExpectedDiff("Increased visibility of class from private to protected", Severity.INFO, "testlib.scope.ClassScopeChange$D3", null, null), |
|
From: Simon K. <s_k...@us...> - 2004-07-16 09:47:35
|
Update of /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core/internal/checks In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7503 Modified Files: ClassScopeCheck.java Log Message: Use new getSeverity method to suppress ERRORs for package & private diffs. Also wrapped some overly-long lines Index: ClassScopeCheck.java =================================================================== RCS file: /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core/internal/checks/ClassScopeCheck.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- ClassScopeCheck.java 11 Jul 2004 10:33:50 -0000 1.2 +++ ClassScopeCheck.java 16 Jul 2004 09:47:24 -0000 1.3 @@ -46,7 +46,9 @@ * * @author Simon Kitching */ -public final class ClassScopeCheck extends AbstractDiffReporter implements ClassChangeCheck +public final class ClassScopeCheck + extends AbstractDiffReporter + implements ClassChangeCheck { private static final Message MSG_SCOPE_INCREASED = new Message(1000); private static final Message MSG_SCOPE_DECREASED = new Message(1001); @@ -75,7 +77,9 @@ } catch (CheckerException ex) { - log(MSG_ERROR_DETERMINING_SCOPE_OLD, Severity.ERROR, compatBaseline.getClassName(), null, null, new String[]{ex.getMessage()}); + log(MSG_ERROR_DETERMINING_SCOPE_OLD, + Severity.ERROR, compatBaseline.getClassName(), null, null, + new String[] {ex.getMessage()}); return false; } @@ -86,7 +90,9 @@ } catch (CheckerException ex) { - log(MSG_ERROR_DETERMINING_SCOPE_NEW, Severity.ERROR, compatBaseline.getClassName(), null, null, new String[]{ex.getMessage()}); + log(MSG_ERROR_DETERMINING_SCOPE_NEW, + Severity.ERROR, compatBaseline.getClassName(), null, null, + new String[] {ex.getMessage()}); return false; } @@ -102,13 +108,16 @@ { String[] args = {bScope.getDesc(), cScope.getDesc()}; - log(MSG_SCOPE_INCREASED, Severity.INFO, compatBaseline.getClassName(), null, null, args); + log(MSG_SCOPE_INCREASED, + Severity.INFO, compatBaseline.getClassName(), null, null, args); } else if (cScope.isLessVisibleThan(bScope)) { String[] args = {bScope.getDesc(), cScope.getDesc()}; - log(MSG_SCOPE_DECREASED, Severity.ERROR, compatBaseline.getClassName(), null, null, args); + log(MSG_SCOPE_DECREASED, + getSeverity(compatBaseline, Severity.ERROR), + compatBaseline.getClassName(), null, null, args); } // Apply further checks only if both versions of the class have scopes |
|
From: Simon K. <s_k...@us...> - 2004-07-16 09:46:13
|
Update of /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core/internal/checks In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7272 Modified Files: ClassHierarchyCheck.java Log Message: Use new getSeverity method to suppress ERRORs for package & private diffs. Index: ClassHierarchyCheck.java =================================================================== RCS file: /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core/internal/checks/ClassHierarchyCheck.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- ClassHierarchyCheck.java 11 Jul 2004 10:33:50 -0000 1.2 +++ ClassHierarchyCheck.java 16 Jul 2004 09:46:04 -0000 1.3 @@ -78,6 +78,9 @@ Severity severity; if (isThrowable) { + // report a warning, because a change to the set of types + // implemented by a thrown object can affect the + // exception-catching behaviour of a program. severity = Severity.WARNING; } else @@ -85,11 +88,15 @@ severity = Severity.INFO; } - log(MSG_ADDED_CLASS_TO_SUPERCLASSES, severity, className, null, null, new String[]{currentSuper.getClassName()}); + log(MSG_ADDED_CLASS_TO_SUPERCLASSES, + getSeverity(compatBaseline, severity), className, null, null, + new String[] {currentSuper.getClassName()}); } else if (currentSuper == null) { - log(MSG_REMOVED_CLASS_FROM_SUPERCLASSES, Severity.ERROR, className, null, null, new String[]{baselineSuper.getClassName()}); + log(MSG_REMOVED_CLASS_FROM_SUPERCLASSES, + getSeverity(compatBaseline, Severity.ERROR), className, null, null, + new String[] {baselineSuper.getClassName()}); } } |
|
From: Simon K. <s_k...@us...> - 2004-07-16 09:44:19
|
Update of /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core/internal In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6821 Modified Files: AbstractDiffReporter.java Log Message: Added getSeverity methods, used by checks to reduce severity from ERROR to INFO for diffs due to items of package or private accessibility. Index: AbstractDiffReporter.java =================================================================== RCS file: /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core/internal/AbstractDiffReporter.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- AbstractDiffReporter.java 10 Jul 2004 13:37:26 -0000 1.1 +++ AbstractDiffReporter.java 16 Jul 2004 09:44:09 -0000 1.2 @@ -22,11 +22,15 @@ import net.sf.clirr.core.ApiDifference; import net.sf.clirr.core.Severity; import net.sf.clirr.core.Message; +import net.sf.clirr.core.ScopeSelector; +import net.sf.clirr.core.CheckerException; import org.apache.bcel.classfile.Field; import org.apache.bcel.classfile.Method; +import org.apache.bcel.classfile.JavaClass; public abstract class AbstractDiffReporter { + private static final Message MSG_UNABLE_TO_DETERMINE_CLASS_SCOPE = new Message(9000); private ApiDiffDispatcher dispatcher; @@ -40,9 +44,135 @@ return dispatcher; } - protected final void log(Message msg, Severity severity, String clazz, Method method, Field field, String[] args) + protected final void log( + Message msg, + Severity severity, + String clazz, Method method, Field field, + String[] args) { - final ApiDifference diff = new ApiDifference(msg, severity, clazz, null, null, args); + final ApiDifference diff = new ApiDifference( + msg, severity, clazz, null, null, args); getApiDiffDispatcher().fireDiff(diff); } + + /** + * Determine whether the severity of the problem should be reduced + * to INFO because the specified class is package or private accessibility. + * Clirr reports changes at level INFO for all private and package + * scoped objects. + * <p + * Note that the class passed here should always be from the <iold</i + * class version, because we're checking whether <iexisting</i code + * would have been able to access it (potential compatibility problems) + * or not. + * + * @param clazz is the class the change is being reported about. + * @param sev is the severity that should be reported for public/protected + * scoped classes. + * + * @return param sev if the class is public/protected, and Severity.INFO + * if the class is package or private scope. + */ + protected final Severity getSeverity(JavaClass clazz, Severity sev) + { + // use ScopeSelector, not isPublic/isProtected, because the latter + // methods don't correctly handle scopes of nested classes. + ScopeSelector.Scope scope; + + try + { + scope = ScopeSelector.getClassScope(clazz); + } + catch (CheckerException ex) + { + // Note: this should never happen. If it does, it probably + // means clirr has been passed a severely-stuffed-up jar + // for analysis. + log(MSG_UNABLE_TO_DETERMINE_CLASS_SCOPE, + Severity.ERROR, clazz.getClassName(), null, null, null); + return sev; + } + + if ((scope == ScopeSelector.SCOPE_PUBLIC) + || (scope == ScopeSelector.SCOPE_PROTECTED)) + { + return sev; + } + else + { + return Severity.INFO; + } + } + + /** + * Determine whether the severity of the problem should be reduced + * to INFO because: + * <ul + * <lithe specified method is package or private accessibility, or</li + * <lithe specified method is in a package or private class. </li + * </ul + * <p + * Clirr reports changes at level INFO for all private and package + * scoped objects. + * <p + * Note that the method passed here should always be from the <iold</i + * class version, because we're checking whether <iexisting</i code + * would have been able to access it (potential compatibility problems) + * or not. + * + * @param clazz is the class containing the method of interest + * @param method is the method the change is being reported about. + * @param sev is the severity that should be reported for public/protected + * scoped methods. + * + * @return param sev if the method is public/protected, and Severity.INFO + * if the method is package or private scope. + */ + protected final Severity getSeverity(JavaClass clazz, Method method, Severity sev) + { + if (method.isPublic() || method.isProtected()) + { + return getSeverity(clazz, sev); + } + else + { + return Severity.INFO; + } + } + + /** + * Determine whether the severity of the problem should be reduced + * to INFO because: + * <ul + * <lithe specified field is package or private accessibility, or</li + * <lithe specified field is in a package or private class. </li + * </ul + * <p + * Clirr reports changes at level INFO for all private and package + * scoped objects. + * <p + * Note that the field passed here should always be from the <iold</i + * class version, because we're checking whether <iexisting</i code + * would have been able to access it (potential compatibility problems) + * or not. + * + * @param clazz is the class containing the method of interest + * @param field is the field the change is being reported about. + * @param sev is the severity that should be reported for public/protected + * scoped field. + * + * @return param sev if the field is public/protected, and Severity.INFO + * if the field is package or private scope. + */ + protected final Severity getSeverity(JavaClass clazz, Field field, Severity sev) + { + if (field.isPublic() || field.isProtected()) + { + return getSeverity(clazz, sev); + } + else + { + return Severity.INFO; + } + } } |
|
From: Simon K. <s_k...@us...> - 2004-07-16 09:39:12
|
Update of /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6089 Modified Files: ApiDifference.java Log Message: Updated existing toString method; attribute "report" no longer exists on the ApiDifference class. Added toString(MessageTranslator) method. Index: ApiDifference.java =================================================================== RCS file: /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core/ApiDifference.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- ApiDifference.java 10 Jul 2004 13:37:26 -0000 1.1 +++ ApiDifference.java 16 Jul 2004 09:39:04 -0000 1.2 @@ -90,7 +90,13 @@ /** * Invokes the two-severity-level version of this constructor. */ - public ApiDifference(Message message, Severity severity, String clazz, String method, String field, String[] args) + public ApiDifference( + Message message, + Severity severity, + String clazz, + String method, + String field, + String[] args) { this(message, severity, severity, clazz, method, field, args); } @@ -260,6 +266,17 @@ */ public String toString() { - return report + " (" + binaryCompatibilitySeverity + ") - " + affectedClass + '[' + affectedField + '/' + affectedMethod + ']'; + return "" + message.getId() + " (" + binaryCompatibilitySeverity + ") - " + + affectedClass + '[' + affectedField + '/' + affectedMethod + ']'; + } + + /** + * Get a human-readable description of this object. Intended for use by + * the unit tests. + */ + public String toString(MessageTranslator translator) + { + return getReport(translator) + " (" + binaryCompatibilitySeverity + ") - " + + affectedClass + '[' + affectedField + '/' + affectedMethod + ']'; } } |
|
From: Simon K. <s_k...@us...> - 2004-07-16 09:09:33
|
Update of /cvsroot/clirr/clirr/core/src/test/net/sf/clirr/core/internal/checks In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv852 Modified Files: TestDiffListener.java Log Message: The ApiDifference.toString() method no longer reports a human-readable message, because a resource bundle must be selected to generate one. So here we can't rely on toString() to generate a nice error message on test case failure. Instead we build one using the default translation. Index: TestDiffListener.java =================================================================== RCS file: /cvsroot/clirr/clirr/core/src/test/net/sf/clirr/core/internal/checks/TestDiffListener.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- TestDiffListener.java 11 Jul 2004 10:29:24 -0000 1.1 +++ TestDiffListener.java 16 Jul 2004 09:09:23 -0000 1.2 @@ -38,7 +38,24 @@ if (!found) { - TestCase.fail("expected diff " + expected + " was not generated: " + diffs); + // build a useful failure message + MessageTranslator translator = new MessageTranslator(); + + StringBuffer buf = new StringBuffer(); + buf.append("Expected diff " + expected + " was not generated."); + buf.append(" Actual diffs generated were: "); + for(Iterator diffIter = diffs.iterator(); diffIter.hasNext();) + { + ApiDifference diff = (ApiDifference) diffIter.next(); + + buf.append(diff.toString(translator)); + if (diffIter.hasNext()) + { + buf.append(", "); + } + } + + TestCase.fail(buf.toString()); } } |
|
From: Simon K. <s_k...@us...> - 2004-07-16 08:45:37
|
Update of /cvsroot/clirr/clirr/core/xdocs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29615 Modified Files: exegesis.xml Log Message: * lots more message explanations * reduce indentation level to 2 spaces to make things more readable * note that compat errors are never reported for package or private scope stuff, just difference info. Index: exegesis.xml =================================================================== RCS file: /cvsroot/clirr/clirr/core/xdocs/exegesis.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- exegesis.xml 10 Jul 2004 13:24:04 -0000 1.1 +++ exegesis.xml 16 Jul 2004 08:45:24 -0000 1.2 @@ -7,65 +7,419 @@ </properties> <body> <section name="Introduction"> - <p> - When clirr generates an ERROR, WARNING or INFO message about - a change in the jars being compared, there is an associated - message reference code. This document contains an explanation - of the meaning of that message which may contain information - which could not be fitted into the brief message summary. - </p> - <p> - Messages are separated into three severity levels: - <ul> - <li>ERROR</li> - <li>WARNING</li> - <li>INFO</li> - </ul> - </p> - <p> - Errors come in two flavours: - <ul> - <li> - Link-time failures, where an exception will be thrown as soon - as code compiled against an old version of a class and the - new version of the class are loaded into the same classloader - hierarchy. - </li> - <li> - Run-time failures, where an exception is thrown when code - compiled against the old version of a class attempts to call a - method on a new version of the class, or vice versa. - </li> - </ul> - <p> - Clirr reports "errors" for cases where it is <i>possible</i> - to get a run-time failure. Whether one actually occurs can - depend upon the way the library is called, ie changes reported - as an error may in fact work when used as long as the patterns - of use of the library do not trigger the failure situation. - </p> - </p> - <p> - Warnings are issued for situations where no link or runtime - exception will occur, but where the application may behave - unexpectedly due to the changes that have occurred. - </p> - <p> - Information messages provide users with information about - new features which have been added without breaking backward - compatibility in any way. - </p> - <p> - In the following sections, the term "old" is used to refer to - a class, interface, method or field from the set of jars which - represent the old/previous/original/baseline version of the - library being inspected. The term "new" is used to refer to - a class, interface, method or field from the set of jars - which represent the new/current/latest version of the library - being inspected. - </p> + <p> + When clirr generates an ERROR, WARNING or INFO message about + a change in the jars being compared, there is an associated + message reference code. This document contains an explanation + of the meaning of that message which may contain information + which could not be fitted into the brief message summary. + </p> + <p> + Messages are separated into three severity levels: + <ul> + <li>ERROR</li> + <li>WARNING</li> + <li>INFO</li> + </ul> + </p> + <p> + Errors come in two flavours: + <ul> + <li> + Link-time failures, where an exception will be thrown as soon + as code compiled against an old version of a class and the + new version of the class are loaded into the same classloader + hierarchy. + </li> + <li> + Run-time failures, where an exception is thrown when code + compiled against the old version of a class attempts to call a + method on a new version of the class, or vice versa. + </li> + </ul> + <p> + Clirr reports "errors" for cases where it is <i>possible</i> + to get a run-time failure. Whether one actually occurs can + depend upon the way the library is called, ie changes reported + as an error may in fact work when used as long as the patterns + of use of the library do not trigger the failure situation. + </p> + </p> + <p> + Warnings are issued for situations where no link or runtime + exception will occur, but where the application may behave + unexpectedly due to the changes that have occurred. + </p> + <p> + Information messages provide users with information about + new features which have been added without breaking backward + compatibility in any way. + </p> + <p> + When using clirr to report on changes to items which have + private or package scope, these changes are always reported + as INFO level changes, never WARNING or ERROR level. This allows + users of clirr to generate "change reports" at a level suitable for + developers without having some of those changes marked (irrelevantly) + as binary incompatibilities. + + There can never be binary incompatibilities for changes to private + classes, methods or fields as that access can only occur from + within the same class (ie the same compilation unit). + + Clirr does not report binary incompatibility WARNINGs or ERRORs for + package-scoped items either, because java packages are intended to be + "release units", ie all classes within a package are compiled together + (ensuring compatibility) then released as a unit. The only time that + package-scope incompatibilities could possibly be an issue is when + users of a library write their own classes using a package declaration + belonging to some external library, or when a subset of updated classes + (eg a single class) from a package is used to override certain classes + from a previous release of the library. Both of these situations are + considered very poor practice by java programming convention. + </p> + <p> + In the following sections, the term "old" is used to refer to + a class, interface, method or field from the set of jars which + represent the old/previous/original/baseline version of the + library being inspected. The term "new" is used to refer to + a class, interface, method or field from the set of jars + which represent the new/current/latest version of the library + being inspected. + </p> + <p> + In the following sections, the term "type" is used to refer to + something which may be either a class or interface. + </p> </section> <section name="Messages"> + <section name="1000 - Increased visibility of class"> + <p>Severity: <code>INFO</code></p> + <p> + The specified type exists in both versions, but its declared access + specifier has changed to relax restrictions on what other code can + access it. + </p> + <p> + Top-level types (ie those which are not nested within another class) + may only have "package" or "public" accessibility. Nested types can + take on any of the four available accessibility values. + </p> + <p> + Regardless of whether the object is top-level or nested, a change + in accessibility from left-to-right of the sequence + private->package->protected->public always ensures that all code which + could previously access that type can still access that type. + Therefore such a change is always binary and source-code compatible. + </p> + <p> + Note that the declaration "protected" provides access to <i>both</i> + code derived from the type <i>and</i> to code within the same package, + ie "protected" accessibility also implies package accessibility. + </p> + </section> + + <section name="1001 - Decreased visibility of class"> + <p>Severity: <code>ERROR</code></p> + <p> + The specified type exists in both versions, but its declared access + specifier has changed to tighten the restrictions on what other code + may access it. + </p> + <p> + Top-level types (ie those which are not nested within another class) + may only have "package" or "public" accessibility. Nested types can + take on any of the four available accessibility values. + </p> + <p> + Regardless of whether the type is top-level or nested, a change + in accessibility from left-to-right of the sequence + public->protected->package->private may cause existing code which + could previously access the type to no longer be able to do so. + </p> + <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 + 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 + this change as a binary-compatibility ERROR. + </p> + </section> + + <section name="2000 - Changed from class to interface"> + <p>Severity: <code>ERROR</code></p> + <p> + The specified class has become an interface in the new version. + This change is always a binary and source-code incompatibility, for + obvious reasons. + </p> + </section> + + <section name="2001 - Changed from interface to class"> + <p>Severity: <code>ERROR</code></p> + <p> + The specified interface has become an class in the new version. + This change is always a binary and source-code incompatibility, for + obvious reasons. + </p> + </section> + + <section name="3001 - Removed final modifier from class"> + <p>Severity: <code>INFO</code></p> + <p> + The specified class was declared final in the old version, but is + no longer final in the new version. + </p> + </section> + + <section name="3002 - Added final modifier to effectively final class"> + <p>Severity: <code>INFO</code></p> + <p> + The specified class was not declared final in the old version, but is + now declared final. Normally, this would be an incompatibility + because pre-existing derived classes would no longer be valid when + used with the new version of this class. However in this case + the old class version had no public or protected constructors, + so it was not possible for any derived classes to exist even for + the old version of the library. Changing such a class to final + therefore can not break any existing code. + </p> + </section> + + <section name="3003 - Added final modifier to class"> + <p>Severity: <code>ERROR</code></p> + <p> + The specified class was not declared final in the old version, but is + now declared final. Any pre-existing classes which were declared + as subclasses of this class will therefore not be valid with the + new version of the library. + </p> + <p> + A VerifyError is thrown by the classloader when an attempt is made to + load a subclass of a final class. + </p> + <p> + Note that a class Y is loaded by the standard classloader only when + the first attempt is made to create an instance of Y, or to directly + reference the Class object for class Y. If some other class X has + class Y as a declared member, or as a parameter to some method, then + loading class X does <em>not</em> cause class Y to be loaded. + </p> + </section> + + <section name="3004 - Removed abstract modifier from class"> + <p>Severity: <code>INFO</code></p> + <p> + The old version of this class was declared to be an abstract + class. The new version is not abstract, allowing users to + create instances of the class. + </p> + </section> + + <section name="3005 - Added abstract modifier to class"> + <p>Severity: <code>ERROR</code></p> + <p> + The old version of this class was not declared to be abstract. + The new version is abstract. Pre-existing code which creates + instances of this class is no longer valid with the new version. + </p> + </section> + + <section name="4000 - Added interface to the set of implemented interfaces"> + <p>Severity: <code>INFO</code></p> + <p> + The new version of the type now implements an additional interface. + This does not invalidate any existing code (source or binary), and is + a completely backward-compatible change. + </p> + <p> + Note that this message can be reported without any change occurring + in the specified type; a change to the set of interfaces supported by + a type will cause this message to be reported for every descendant + of that type. + </p> + </section> + + <section name="4001 - Removed interface from the set of implemented interfaces"> + <p>Severity: <code>ERROR</code></p> + <p> + The old version of this type declared that it implemented an interface + which the new class or interface does not. Existing code which + explicitly or implicitly casts objects of this type to the now missing + interface is no longer valid. + </p> + <p> + Note that this message can be reported without any change occurring + in the specified type; a change to the set of interfaces supported by + a type will cause this message to be reported for every descendant + of that type. + </p> + </section> + + <section name="5000 - Added class to the set of superclasses"> + <p>Severity: <code>INFO or WARNING</code></p> + <p> + The new version of the class has a class in its inheritance hierarchy + which the old version did not, either because its direct parent is + now a different class, or because one of its parent classes has + changed its inheritance hierarchy. + </p> + <p> + If the specified class has java.lang.Throwable as an ancestor, then + this change is reported as a WARNING, because this class change may + change the exception-catching behaviour of programs that use this class. + </p> + <p> + Note that this message can be reported without any change occurring + in the specified class; a change to the set of superclasses of an + ancestor class will cause this message to be reported for every + descendant class. + </p> + </section> + + <section name="5001 - Removed class from the set of superclasses"> + <p>Severity: <code>ERROR</code></p> + <p> + The old version of this class has a class in its inheritance hierarchy + which the new version does not, either because its direct parent + is now a different class, or because one of its parent classes has + changed its inheritance hierarchy. + </p> + <p> + Existing code which explicitly or implicitly casts objects of this + type to the now missing class type is no longer valid. + </p> + <p> + Note that this message can be reported without any change occurring + in the specified class; a change to the set of superclasses of an + ancestor class will cause this message to be reported for every + descendent class. + </p> + <p> + Note also that if this class has Throwable in its ancestry, then + the class hierarchy change can also cause changes in the + exception-catching behaviour of programs using this class. + </p> + </section> + + <section name="6000 - Added field"> + <p>Severity: <code>INFO</code></p> + <p> + The new class has an additional static or instance member. This + change is completely backwards-compatible. + </p> + </section> + + <section name="6001 - Removed field"> + <p>Severity: <code>ERROR</code></p> + <p> + The new class has removed a field present in the old version. + Pre-existing code which directly accesses that field will no longer + be valid. + </p> + </section> + + <section name="6002 - Value of field no longer a compile-time constant"> + <p>Severity: <code>WARNING</code></p> + <p> + Code compiled against the old version of the class was permitted to + "inline" the value of this field because it was a compile-time constant. + Therefore, existing binary code will continue to use the old value of + this field, instead of the new value (which cannot be inlined). + </p> + </section> + + <section name="6003 - Value of compile-time constant has changed"> + <p>Severity: <code>WARNING</code></p> + <p> + Code compiled against the old version of the class was permitted to + "inline" the value of this field because it was a compile-time constant. + Therefore, existing binary code will continue to use the old value of + this field, instead of the new value. + </p> + </section> + + <section name="6004 - Field type changed"> + <p>Severity: <code>ERROR</code></p> + <p> + The type associated with the specified static or instance member + of the specified class has changed. Pre-existing code which directly + accesses that field may no longer be valid, and therefore this is + an incompatible change. + </p> + </section> + + <section name="6005 - Field now non-final"> + <p>Severity: <code>INFO</code></p> + <p> + The field was previously final, and is no longer final. This means + that the field value can now be modified during the lifetime of + the class or instance. + </p> + <p> + Whether a value in a field could previously be "inlined" into + other classes is an issue addressed by messages 6002 and 6003, + not this message. + </p> + </section> + + <section name="6006 - Field now final"> + <p>Severity: <code>ERROR</code></p> + <p> + The field can no longer be modified during the lifetime of the + class or instance. Code which previously modified this field is + therefore no longer valid. + </p> + </section> + + <section name="6007 - Field now non-static"> + <p>Severity: <code>ERROR</code></p> + <p> + The field is now an instance variable rather than a class variable. + Code which previously accessed this field via the Class rather + than an instance of the class is no longer valid. + </p> + </section> + + <section name="6008 - Field now static"> + <p>Severity: <code>ERROR</code></p> + <p> + The field is now a class variable rather than an instance variable. + </p> + <p> + For some reason (presumably internal implementation issues), the + java standard declares that this change is not binary-compatible, + and that an IncompatibleClassChangeError will be thrown if code + compiled against the "old" version of a class is used together with + a "new" version for which a field is now static. + </p> + <p> + Because source code is permitted to access class variables via + instances of that class, this is expected to be a source-code + compatible change. However currently CLIRR reports this as an + ERROR for source-code compatibility too. + </p> + </section> + + <section name="6009 - Field More Accessible"> + <p>Severity: <code>INFO</code></p> + <p> + In the new version, the specified field is accessible to more + code than it was previously. + </p> + </section> + + <section name="6010 - Field Less Accessible"> + <p>Severity: <code>ERROR</code></p> + <p> + In the new version, the specified field is accessible to less + code than it was previously. Therefore existing code may no longer + be valid. + </p> + </section> + <section name="7000 - Method now in Superclass"> <p>Severity: <code>INFO</code></p> <p> @@ -79,6 +433,7 @@ is reported separately. </p> </section> + <section name="7001 - Method now in Interface"> <p>Severity: <code>INFO</code></p> <p> @@ -93,6 +448,7 @@ is reported separately. </p> </section> + <section name="7002 - Method Removed"> <p>Severity: <code>ERROR</code></p> <p> @@ -109,9 +465,7 @@ invocation occurs. </p> </section> - <section name="7003 - Unused"> - <p>This message code is not currently used.</p> - </section> + <section name="7004 - Method Argument Count Changed"> <p>Severity: <code>ERROR</code></p> <p> @@ -132,6 +486,7 @@ then the change is a binary incompatibility. </p> </section> + <section name="7005 - Method Argument Type changed"> <p>Binary Severity: <code>INFO or ERROR</code></p> <p>Source Severity: <code>ERROR</code></p> @@ -166,6 +521,7 @@ <em>At the current date, clirr does not check for this situation</em>. </p> </section> + <section name="7006 - Method Return Type changed"> <p>Binary Severity: <code>ERROR</code></p> <p>Source Severity: <code>INFO or ERROR</code></p> @@ -201,6 +557,7 @@ reported as an ERROR. </p> </section> + <section name="7007 - Method has been Deprecated"> <p>Severity: <code>INFO</code></p> <p> @@ -209,6 +566,7 @@ change. </p> </section> + <section name="7008 - Method has been Undeprecated"> <p>Severity: <code>INFO</code></p> <p> @@ -218,6 +576,7 @@ binary-compatible change as well as a source-code-compatible change. </p> </section> + <section name="7009 - Method is now Less Accessable"> <p>Severity: <code>ERROR</code></p> <p> @@ -225,21 +584,19 @@ been tightened to permit less user code to access the method. </p> <p> - Whether this change is truly a binary-compatibility error depends - upon patterns of usage. If the change is from public to protected, - and the protected method is only invoked from code which subclasses - the modified class then the new accessability for the method is still - adequate and no problem will occur. Old code will also continue to - work correctly as long as the modified method is not invoked. If it - is invoked, then an IllegalAccessException is thrown at the time of - method invocation. + Whether this change is a source-code compatibility issue or not + depends upon patterns of usage. </p> <p> - Whether this change is a source-code compatibility issue or not - also depends upon patterns of usage. This change is therefore - always reported as an ERROR. + This change <i>should</i> be a binary incompatibility. Note, + however, that current JVMs do not validate this. Code compiled + against a previous version of a class can successfully invoke + methods for which they no longer have access rights. Nevertheless, + the java language specification states that this is an error, so + clirr reports this change as a binary incompatibility. </p> </section> + <section name="7010 - Method is now More Accessable"> <p>Severity: <code>INFO</code></p> <p> @@ -248,6 +605,7 @@ is always a binary and source-code compatible change. </p> </section> + <section name="7011 - Method Added"> <p>Severity: <code>INFO</code></p> <p> @@ -262,6 +620,7 @@ does code compiled against the old library invoke? </p> </section> + <section name="7012 - Method Added to Interface"> <p>Binary Severity: <code>ERROR</code></p> <p>Source Severity: <code>ERROR</code></p> @@ -288,6 +647,7 @@ to implement the declared method. </p> </section> + <section name="7013 - Abstract Method Added to Class"> <p>Binary Severity: <code>ERROR</code></p> <p>Source Severity: <code>ERROR</code></p> |
|
From: Vincent M. <vm...@us...> - 2004-07-15 17:11:20
|
Update of /cvsroot/clirr/clirr In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11047 Modified Files: .cvsignore Log Message: eclipse 3.0 seems to be creating some .settings files... Index: .cvsignore =================================================================== RCS file: /cvsroot/clirr/clirr/.cvsignore,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- .cvsignore 5 Jun 2004 10:26:40 -0000 1.3 +++ .cvsignore 15 Jul 2004 17:11:11 -0000 1.4 @@ -6,3 +6,4 @@ target .classpath .project +.settings |
|
From: <lak...@t-...> - 2004-07-15 17:08:37
|
Vincent Massol wrote: >Hi, > >Here's what I get when I try to build the core project: > > >C:\dev\clirr\core>maven clean jar:install > __ __ >| \/ |__ _Apache__ ___ >| |\/| / _` \ V / -_) ' \ ~ intelligent projects ~ >|_| |_\__,_|\_/\___|_||_| v. 1.0 > >Plugin 'maven-deploy-plugin' in project 'Clirr Core' is not available >build:start: > >clean:clean: > [delete] Deleting directory C:\dev\clirr\core\target > >clean: >multiproject:clean: >multiproject:projects-init: > [echo] Gathering project list >Starting the reactor... >Our processing order: >Starting the reactor... >Our processing order: > >multiproject:goal: > > > >java:prepare-filesystem: > [mkdir] Created dir: C:\dev\clirr\core\target\classes > >java:compile: > [echo] Compiling to C:\dev\clirr\core/target/classes > [javac] Compiling 31 source files to C:\dev\clirr\core\target\classes > >java:jar-resources: >Copying 3 files to C:\dev\clirr\core\target\classes > >test:prepare-filesystem: > [mkdir] Created dir: C:\dev\clirr\core\target\test-classes > [mkdir] Created dir: C:\dev\clirr\core\target\test-reports > >test:test-resources: > >test:compile: > [javac] Compiling 13 source files to >C:\dev\clirr\core\target\test-classes > >test:test: >clirr:compiletestlibs: > >Compiling test input testlib-v1 > [mkdir] Created dir: >C:\dev\clirr\core\target\testinput\testlib-v1\classes > >BUILD FAILED >File...... C:\dev\clirr\core\maven.xml >Element... javac >Line...... 19 >Column.... 41 >srcdir "C:\dev\clirr\core\src\testinput\testlib-v1" does not exist! >Total time: 4 seconds >Finished at: Thu Jul 15 15:44:38 CEST 2004 > >C:\dev\clirr\core> > > >Any idea? > > > Yep, forgot to add the testinput dir to CVS. Fixed now, thanks. >Thanks >-Vincent > > > >------------------------------------------------------- >This SF.Net email is sponsored by BEA Weblogic Workshop >FREE Java Enterprise J2EE developer tools! >Get your free copy of BEA WebLogic Workshop 8.1 today. >http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click >_______________________________________________ >Clirr-devel mailing list >Cli...@li... >https://lists.sourceforge.net/lists/listinfo/clirr-devel > > > |
|
From: <lk...@us...> - 2004-07-15 17:06:40
|
Update of /cvsroot/clirr/clirr/core/src/testinput/testlib-v2/testlib/modifiers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10031/testinput/testlib-v2/testlib/modifiers Added Files: EffectivelyFinal.java NonFinalBecomesFinal.java Log Message: added test input files --- NEW FILE --- package testlib.modifiers; /** * Because this class has a package-scope constructor, no subclass of this * class can ever be created. And because of that, it is not a problem if * this class is declared "final" in a later version. * <p> * Classes with only private constructors are commonly used to implement * an "enumerated type" in java, as is done here. */ public final class EffectivelyFinal { int val; public static final EffectivelyFinal ZERO = new EffectivelyFinal(0); public static final EffectivelyFinal ONE = new EffectivelyFinal(1); private EffectivelyFinal(int i) { val = i; } public int getValue() { return val; } } --- NEW FILE --- package testlib.modifiers; /** * It is a binary compatibility error for a non-final class to become * final in a later version, because users may have created classes which * are derived from it. Such classes will fail to load with the new version * of the class present. */ public final class NonFinalBecomesFinal { } |
Update of /cvsroot/clirr/clirr/core/src/testinput/testlib-v2/testlib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10031/testinput/testlib-v2/testlib Added Files: AbstractImpl.java ApplicationException.java BaseInterface.java BaseMembers.java ChangingHierarchy.java ClassBecomesInterface.java ComplexMethodMoveBase.java ComplexMethodMoveSub.java InterfaceBecomesClass.java MembersChange.java MethodsChange.java Log Message: added test input files --- NEW FILE --- package testlib; public abstract class AbstractImpl implements BaseInterface { // public abstract void method(); not available here directly } --- NEW FILE --- package testlib; public class ApplicationException extends java.util.NoSuchElementException { } --- NEW FILE --- package testlib; public interface BaseInterface { void method(); } --- NEW FILE --- package testlib; public class BaseMembers { public static int base1 = 0; public int base2 = 0; } --- NEW FILE --- package testlib; public class ChangingHierarchy extends java.awt.event.WindowAdapter { } --- NEW FILE --- package testlib; public interface ClassBecomesInterface { } --- NEW FILE --- package testlib; public class ComplexMethodMoveBase { // moved from ComplexMethodMoveSub in v1 public void moveToSuper() {} } --- NEW FILE --- package testlib; public class ComplexMethodMoveSub extends ComplexMethodMoveBase { } --- NEW FILE --- package testlib; public class InterfaceBecomesClass { } --- NEW FILE --- package testlib; public class MembersChange extends BaseMembers { public static int stat1 = 0; // same public static final int stat2 = 0; // added final public int stat3 = 0; // removed static protected static int stat4 = 0; // public -> protected private static int stat5 = 0; // public -> private static int stat6 = 0; // public -> package // removed stat7 public static int stat8 = 0; // new member public static final int fin1 = 0; // same protected static final int fin2 = 0; // public -> protected public final int fin3 = 0; // removed static public static int fin4 = 0; // removed final public static final int fin5 = 1; // changed compile time constant public static final boolean fin6 = Boolean.FALSE.booleanValue(); // removed value of compile time constant public int pub1 = 0; public static int pub2 = 0; // added static public final int pub3 = 0; // added final public int pub4 = 0; protected int prot1 = 0; protected int prot2 = 0; protected int prot3 = 0; protected int prot4 = 0; public String obj1 = new String(); // member type changed Object -> String public String obj2 = new String(); // member type changed Boolean -> String private int priv1 = 0; // same public int priv2 = 0; // private -> public } --- NEW FILE --- package testlib; import java.io.IOException; public class MethodsChange { private int priv; public MethodsChange() { priv = 2; } protected MethodsChange(int initialpriv, boolean newArg) { priv = initialpriv; } protected MethodsChange(Integer initialpriv) { priv = initialpriv.intValue(); } public int getPriv() { return priv; } private int getPriv2() { return priv; } public Integer getPrivAsNumber() { return new Integer(priv); } public Number getPrivAsInteger() { return new Integer(priv); } public Long getPrivSquare() { return new Long(priv * priv); } public void printPriv(String prefix) { System.out.println(prefix + priv); } public void weakenParamType(Object s) { } public void strengthenParamType(String s) { } public void changeParamType(Integer x) { } public void throwIOException() throws Exception { throw new java.io.IOException(); } public void throwException() throws IOException { throw new java.io.IOException(); } public void throwException2() { } public void throwRuntimeException() { throw new RuntimeException(); } public void throwNoRuntimeException() throws RuntimeException { throw new RuntimeException(); } public void throwNoException() throws Exception { throw new Exception(); } /** * @deprecated this is a bad method. */ public void becomesDeprecated() { } /** * This method was previously deprecated. */ public void becomesUndeprecated() { } } |
|
From: <lk...@us...> - 2004-07-15 17:06:39
|
Update of /cvsroot/clirr/clirr/core/src/testinput/testlib-v2/testlib/scope In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10031/testinput/testlib-v2/testlib/scope Added Files: ClassScopeChange.java Log Message: added test input files --- NEW FILE --- package testlib.scope; public class ClassScopeChange { // public class is unchanged public static class A1 {} // public class becomes protected protected static class A2 {} // public class becomes package static class A3 {} // public class becomes private private static class A4 {} // protected class is unchanged protected static class B1 {} // protected class becomes public public static class B2 {} // protected class becomes package static class B3 {} // protected class becomes private private static class B4 {} // package class is unchanged static class C1 {} // package class becomes public public static class C2 {} // package class becomes protected protected static class C3 {} // package class becomes private private static class C4 {} // private class is unchanged private static class D1 {} // private class becomes public public static class D2 {} // private class becomes protected protected static class D3 {} // private class becomes package static class D4 {} } |
|
From: <lk...@us...> - 2004-07-15 17:06:39
|
Update of /cvsroot/clirr/clirr/core/src/testinput/testlib-v1/testlib/scope In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10031/testinput/testlib-v1/testlib/scope Added Files: ClassScopeChange.java Log Message: added test input files --- NEW FILE --- package testlib.scope; public class ClassScopeChange { // public class is unchanged public static class A1 {} // public class becomes protected public static class A2 {} // public class becomes package public static class A3 {} // public class becomes private public static class A4 {} // protected class is unchanged protected static class B1 {} // protected class becomes public protected static class B2 {} // protected class becomes package protected static class B3 {} // protected class becomes private protected static class B4 {} // package class is unchanged static class C1 {} // package class becomes public static class C2 {} // package class becomes protected static class C3 {} // package class becomes private static class C4 {} // private class is unchanged private static class D1 {} // private class becomes public private static class D2 {} // private class becomes protected private static class D3 {} // private class becomes package private static class D4 {} } |
Update of /cvsroot/clirr/clirr/core/src/testinput/testlib-v1/testlib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10031/testinput/testlib-v1/testlib Added Files: AbstractImpl.java ApplicationException.java BaseInterface.java BaseMembers.java ChangingHierarchy.java ClassBecomesInterface.java ComplexMethodMoveBase.java ComplexMethodMoveSub.java InterfaceBecomesClass.java MembersChange.java MethodsChange.java Log Message: added test input files --- NEW FILE --- package testlib; public abstract class AbstractImpl implements BaseInterface { public abstract void method(); } --- NEW FILE --- package testlib; public class ApplicationException extends RuntimeException { } --- NEW FILE --- package testlib; public interface BaseInterface { void method(); } --- NEW FILE --- package testlib; public class BaseMembers { public static int base1 = 0; public int base2 = 0; } --- NEW FILE --- package testlib; public class ChangingHierarchy extends java.awt.event.MouseAdapter { } --- NEW FILE --- package testlib; public class ClassBecomesInterface { } --- NEW FILE --- package testlib; public class ComplexMethodMoveBase { } --- NEW FILE --- package testlib; public class ComplexMethodMoveSub extends ComplexMethodMoveBase { // will move to ComplexMethodMoveBase in v2 public void moveToSuper() {} } --- NEW FILE --- package testlib; public interface InterfaceBecomesClass { } --- NEW FILE --- package testlib; public class MembersChange extends BaseMembers { public static int stat1 = 0; public static int stat2 = 0; public static int stat3 = 0; public static int stat4 = 0; public static int stat5 = 0; public static int stat6 = 0; public static int stat7 = 0; public static final int fin1 = 0; public static final int fin2 = 0; public static final int fin3 = 0; public static final int fin4 = 0; public static final int fin5 = 0; public static final boolean fin6 = false; public int pub1 = 0; public int pub2 = 0; public int pub3 = 0; public int pub4 = 0; protected int prot1 = 0; protected int prot2 = 0; protected int prot3 = 0; protected int prot4 = 0; public Object obj1 = new String(); public Boolean obj2 = Boolean.FALSE; private int priv1 = 0; private int priv2 = 0; } --- NEW FILE --- package testlib; import java.io.IOException; public class MethodsChange { private int priv; static { System.out.println("static initializer"); } { System.out.println("non-static initializer"); } public MethodsChange() { priv = 2; } protected MethodsChange(int initialpriv) { priv = initialpriv; } public int getPriv() { return priv; } public int getPriv2() { return priv; } public Integer getPrivAsInteger() { return new Integer(priv); } public Number getPrivAsNumber() { return new Integer(priv); } public void printPriv() { System.out.println(priv); } public void removedMethod(String x) { } public void weakenParamType(String s) { } public void strengthenParamType(Object s) { } public void changeParamType(String s) { } public void throwIOException() throws IOException { throw new java.io.IOException(); } public void throwException() throws Exception { throw new java.io.IOException(); } public void throwException2() throws Exception { throw new Exception(); } public void throwRuntimeException() throws RuntimeException { throw new RuntimeException(); } public void throwNoRuntimeException() { } public void throwNoException() { } /** This method will be deprecated in the later version. */ public void becomesDeprecated() { } /** * This method will be "undeprecated" in the later version. * * @deprecated this is a bad method. */ public void becomesUndeprecated() { } } |
|
From: <lk...@us...> - 2004-07-15 17:06:38
|
Update of /cvsroot/clirr/clirr/core/src/testinput/testlib-v1/testlib/modifiers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10031/testinput/testlib-v1/testlib/modifiers Added Files: EffectivelyFinal.java NonFinalBecomesFinal.java Log Message: added test input files --- NEW FILE --- package testlib.modifiers; /** * Because this class has a package-scope constructor, no subclass of this * class can ever be created. And because of that, it is not a problem if * this class is declared "final" in a later version. * <p> * Classes with only private constructors are commonly used to implement * an "enumerated type" in java, as is done here. */ public class EffectivelyFinal { int val; public static final EffectivelyFinal ZERO = new EffectivelyFinal(0); public static final EffectivelyFinal ONE = new EffectivelyFinal(1); private EffectivelyFinal(int i) { val = i; } public int getValue() { return val; } } --- NEW FILE --- package testlib.modifiers; /** * It is a binary compatibility error for a non-final class to become * final in a later version, because users may have created classes which * are derived from it. Such classes will fail to load with the new version * of the class present. */ public class NonFinalBecomesFinal { } |
|
From: <lk...@us...> - 2004-07-15 17:05:33
|
Update of /cvsroot/clirr/clirr/core/src/testinput/testlib-v2/testlib/scope In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9839/scope Log Message: Directory /cvsroot/clirr/clirr/core/src/testinput/testlib-v2/testlib/scope added to the repository |
|
From: <lk...@us...> - 2004-07-15 17:05:33
|
Update of /cvsroot/clirr/clirr/core/src/testinput/testlib-v2/testlib/modifiers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9839/modifiers Log Message: Directory /cvsroot/clirr/clirr/core/src/testinput/testlib-v2/testlib/modifiers added to the repository |
|
From: <lk...@us...> - 2004-07-15 17:04:56
|
Update of /cvsroot/clirr/clirr/core/src/testinput/testlib-v2/testlib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9737/testlib Log Message: Directory /cvsroot/clirr/clirr/core/src/testinput/testlib-v2/testlib added to the repository |
|
From: <lk...@us...> - 2004-07-15 17:04:02
|
Update of /cvsroot/clirr/clirr/core/src/testinput/testlib-v1/testlib/scope In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9474/scope Log Message: Directory /cvsroot/clirr/clirr/core/src/testinput/testlib-v1/testlib/scope added to the repository |
|
From: <lk...@us...> - 2004-07-15 17:04:02
|
Update of /cvsroot/clirr/clirr/core/src/testinput/testlib-v1/testlib/modifiers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9474/modifiers Log Message: Directory /cvsroot/clirr/clirr/core/src/testinput/testlib-v1/testlib/modifiers added to the repository |
|
From: <lk...@us...> - 2004-07-15 17:03:29
|
Update of /cvsroot/clirr/clirr/core/src/testinput/testlib-v1/testlib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9369/testlib Log Message: Directory /cvsroot/clirr/clirr/core/src/testinput/testlib-v1/testlib added to the repository |