[Clirr-devel] CVS: clirr/core/src/java/net/sf/clirr/core/internal/checks ClassHierarchyCheck.java,1.
Status: Alpha
Brought to you by:
lkuehne
From: <lk...@us...> - 2004-07-11 10:34:03
|
Update of /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core/internal/checks In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16155/clirr/core/internal/checks Modified Files: ClassHierarchyCheck.java ClassModifierCheck.java ClassScopeCheck.java FieldSetCheck.java GenderChangeCheck.java InterfaceSetCheck.java MethodSetCheck.java Log Message: use import statements instead of fq classnames in the code (generated by wrong settings during package refactorings) Index: ClassHierarchyCheck.java =================================================================== RCS file: /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core/internal/checks/ClassHierarchyCheck.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- ClassHierarchyCheck.java 10 Jul 2004 13:37:26 -0000 1.1 +++ ClassHierarchyCheck.java 11 Jul 2004 10:33:50 -0000 1.2 @@ -20,6 +20,7 @@ package net.sf.clirr.core.internal.checks; import net.sf.clirr.core.Message; +import net.sf.clirr.core.Severity; import net.sf.clirr.core.internal.AbstractDiffReporter; import net.sf.clirr.core.internal.ApiDiffDispatcher; import net.sf.clirr.core.internal.ClassChangeCheck; @@ -74,21 +75,21 @@ if (baselineSuper == null) { - net.sf.clirr.core.Severity severity; + Severity severity; if (isThrowable) { - severity = net.sf.clirr.core.Severity.WARNING; + severity = Severity.WARNING; } else { - severity = net.sf.clirr.core.Severity.INFO; + severity = Severity.INFO; } log(MSG_ADDED_CLASS_TO_SUPERCLASSES, severity, className, null, null, new String[]{currentSuper.getClassName()}); } else if (currentSuper == null) { - log(MSG_REMOVED_CLASS_FROM_SUPERCLASSES, net.sf.clirr.core.Severity.ERROR, className, null, null, new String[]{baselineSuper.getClassName()}); + log(MSG_REMOVED_CLASS_FROM_SUPERCLASSES, Severity.ERROR, className, null, null, new String[]{baselineSuper.getClassName()}); } } Index: ClassModifierCheck.java =================================================================== RCS file: /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core/internal/checks/ClassModifierCheck.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- ClassModifierCheck.java 10 Jul 2004 13:37:26 -0000 1.1 +++ ClassModifierCheck.java 11 Jul 2004 10:33:50 -0000 1.2 @@ -37,12 +37,12 @@ */ public final class ClassModifierCheck extends AbstractDiffReporter implements ClassChangeCheck { - private static final net.sf.clirr.core.Message MSG_MODIFIER_UNABLE_TO_DETERMINE_CLASS_SCOPE = new Message(3000); - private static final net.sf.clirr.core.Message MSG_MODIFIER_REMOVED_FINAL = new Message(3001); - private static final net.sf.clirr.core.Message MSG_MODIFIER_ADDED_FINAL_TO_EFFECTIVE_FINAL = new Message(3002); - private static final net.sf.clirr.core.Message MSG_MODIFIER_ADDED_FINAL = new Message(3003); - private static final net.sf.clirr.core.Message MSG_MODIFIER_REMOVED_ABSTRACT = new Message(3004); - private static final net.sf.clirr.core.Message MSG_MODIFIER_ADDED_ABSTRACT = new Message(3005); + 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); + private static final Message MSG_MODIFIER_ADDED_FINAL_TO_EFFECTIVE_FINAL = new Message(3002); + private static final Message MSG_MODIFIER_ADDED_FINAL = new Message(3003); + private static final Message MSG_MODIFIER_REMOVED_ABSTRACT = new Message(3004); + private static final Message MSG_MODIFIER_ADDED_ABSTRACT = new Message(3005); /** * Create a new instance of this check. @@ -60,8 +60,8 @@ try { - net.sf.clirr.core.ScopeSelector.Scope currentScope = net.sf.clirr.core.ScopeSelector.getClassScope(currentVersion); - if (currentScope == net.sf.clirr.core.ScopeSelector.SCOPE_PRIVATE) + ScopeSelector.Scope currentScope = ScopeSelector.getClassScope(currentVersion); + if (currentScope == ScopeSelector.SCOPE_PRIVATE) { // for private classes, we don't care if they are now final, // or now abstract, or now an interface. @@ -70,7 +70,7 @@ } catch (CheckerException ex) { - log(MSG_MODIFIER_UNABLE_TO_DETERMINE_CLASS_SCOPE, net.sf.clirr.core.Severity.ERROR, className, null, null, null); + log(MSG_MODIFIER_UNABLE_TO_DETERMINE_CLASS_SCOPE, Severity.ERROR, className, null, null, null); return true; } @@ -83,28 +83,28 @@ if (compatIsFinal && !currentIsFinal) { - log(MSG_MODIFIER_REMOVED_FINAL, net.sf.clirr.core.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, net.sf.clirr.core.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, net.sf.clirr.core.Severity.ERROR, className, null, null, null); + log(MSG_MODIFIER_ADDED_FINAL, 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, net.sf.clirr.core.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, net.sf.clirr.core.Severity.ERROR, className, null, null, null); + log(MSG_MODIFIER_ADDED_ABSTRACT, Severity.ERROR, className, null, null, null); } return true; Index: ClassScopeCheck.java =================================================================== RCS file: /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core/internal/checks/ClassScopeCheck.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- ClassScopeCheck.java 10 Jul 2004 13:37:26 -0000 1.1 +++ ClassScopeCheck.java 11 Jul 2004 10:33:50 -0000 1.2 @@ -48,18 +48,18 @@ */ public final class ClassScopeCheck extends AbstractDiffReporter implements ClassChangeCheck { - private static final net.sf.clirr.core.Message MSG_SCOPE_INCREASED = new Message(1000); - private static final net.sf.clirr.core.Message MSG_SCOPE_DECREASED = new Message(1001); - private static final net.sf.clirr.core.Message MSG_ERROR_DETERMINING_SCOPE_OLD = new Message(1002); - private static final net.sf.clirr.core.Message MSG_ERROR_DETERMINING_SCOPE_NEW = new Message(1003); + private static final Message MSG_SCOPE_INCREASED = new Message(1000); + private static final Message MSG_SCOPE_DECREASED = new Message(1001); + private static final Message MSG_ERROR_DETERMINING_SCOPE_OLD = new Message(1002); + private static final Message MSG_ERROR_DETERMINING_SCOPE_NEW = new Message(1003); - private net.sf.clirr.core.ScopeSelector scopeSelector; + private ScopeSelector scopeSelector; /** * Create a new instance of this check. * @param dispatcher the diff dispatcher that distributes the detected changes to the listeners. */ - public ClassScopeCheck(ApiDiffDispatcher dispatcher, net.sf.clirr.core.ScopeSelector scopeSelector) + public ClassScopeCheck(ApiDiffDispatcher dispatcher, ScopeSelector scopeSelector) { super(dispatcher); this.scopeSelector = scopeSelector; @@ -68,25 +68,25 @@ /** {@inheritDoc} */ public boolean check(JavaClass compatBaseline, JavaClass currentVersion) { - net.sf.clirr.core.ScopeSelector.Scope bScope; + ScopeSelector.Scope bScope; try { - bScope = net.sf.clirr.core.ScopeSelector.getClassScope(compatBaseline); + bScope = ScopeSelector.getClassScope(compatBaseline); } catch (CheckerException ex) { - log(MSG_ERROR_DETERMINING_SCOPE_OLD, net.sf.clirr.core.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; } - net.sf.clirr.core.ScopeSelector.Scope cScope; + ScopeSelector.Scope cScope; try { - cScope = net.sf.clirr.core.ScopeSelector.getClassScope(currentVersion); + cScope = ScopeSelector.getClassScope(currentVersion); } catch (CheckerException ex) { - log(MSG_ERROR_DETERMINING_SCOPE_NEW, net.sf.clirr.core.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 +102,13 @@ { String[] args = {bScope.getDesc(), cScope.getDesc()}; - log(MSG_SCOPE_INCREASED, net.sf.clirr.core.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, net.sf.clirr.core.Severity.ERROR, compatBaseline.getClassName(), null, null, args); + log(MSG_SCOPE_DECREASED, Severity.ERROR, compatBaseline.getClassName(), null, null, args); } // Apply further checks only if both versions of the class have scopes Index: FieldSetCheck.java =================================================================== RCS file: /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core/internal/checks/FieldSetCheck.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- FieldSetCheck.java 10 Jul 2004 13:37:26 -0000 1.1 +++ FieldSetCheck.java 11 Jul 2004 10:33:50 -0000 1.2 @@ -40,17 +40,17 @@ */ public class FieldSetCheck extends AbstractDiffReporter implements ClassChangeCheck { - private static final net.sf.clirr.core.Message MSG_FIELD_ADDED = new Message(6000); - private static final net.sf.clirr.core.Message MSG_FIELD_REMOVED = new Message(6001); - private static final net.sf.clirr.core.Message MSG_FIELD_NOT_CONSTANT = new Message(6002); - private static final net.sf.clirr.core.Message MSG_FIELD_CONSTANT_CHANGED = new Message(6003); - private static final net.sf.clirr.core.Message MSG_FIELD_TYPE_CHANGED = new Message(6004); - private static final net.sf.clirr.core.Message MSG_FIELD_NOW_NON_FINAL = new Message(6005); - private static final net.sf.clirr.core.Message MSG_FIELD_NOW_FINAL = new Message(6006); - private static final net.sf.clirr.core.Message MSG_FIELD_NOW_NON_STATIC = new Message(6007); - private static final net.sf.clirr.core.Message MSG_FIELD_NOW_STATIC = new Message(6008); - private static final net.sf.clirr.core.Message MSG_FIELD_MORE_ACCESSABLE = new Message(6009); - private static final net.sf.clirr.core.Message MSG_FIELD_LESS_ACCESSABLE = new Message(6010); + private static final Message MSG_FIELD_ADDED = new Message(6000); + private static final Message MSG_FIELD_REMOVED = new Message(6001); + private static final Message MSG_FIELD_NOT_CONSTANT = new Message(6002); + private static final Message MSG_FIELD_CONSTANT_CHANGED = new Message(6003); + private static final Message MSG_FIELD_TYPE_CHANGED = new Message(6004); + private static final Message MSG_FIELD_NOW_NON_FINAL = new Message(6005); + 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 class FieldNameComparator implements Comparator { @@ -67,9 +67,9 @@ } private static final Comparator COMPARATOR = new FieldNameComparator(); - private net.sf.clirr.core.ScopeSelector scopeSelector; + private ScopeSelector scopeSelector; - public FieldSetCheck(ApiDiffDispatcher dispatcher, net.sf.clirr.core.ScopeSelector scopeSelector) + public FieldSetCheck(ApiDiffDispatcher dispatcher, ScopeSelector scopeSelector) { super(dispatcher); this.scopeSelector = scopeSelector; @@ -94,8 +94,8 @@ if (scopeSelector.isSelected(cField)) { final String name = cField.getName(); - String scope = net.sf.clirr.core.ScopeSelector.getScopeDesc(cField); - fireDiff(MSG_FIELD_ADDED, net.sf.clirr.core.Severity.INFO, currentClass, cField, new String[]{scope}); + String scope = ScopeSelector.getScopeDesc(cField); + fireDiff(MSG_FIELD_ADDED, Severity.INFO, currentClass, cField, new String[]{scope}); } } else if (cField == null) @@ -103,7 +103,7 @@ if (scopeSelector.isSelected(bField)) { final String name = bField.getName(); - fireDiff(MSG_FIELD_REMOVED, net.sf.clirr.core.Severity.ERROR, baselineClass, bField, null); + fireDiff(MSG_FIELD_REMOVED, Severity.ERROR, baselineClass, bField, null); } } else if (scopeSelector.isSelected(bField) || scopeSelector.isSelected(cField)) @@ -133,7 +133,7 @@ final ConstantValue cVal = cField.getConstantValue(); if (cVal == null) { - fireDiff(MSG_FIELD_NOT_CONSTANT, net.sf.clirr.core.Severity.WARNING, currentClass, cField, null); + fireDiff(MSG_FIELD_NOT_CONSTANT, Severity.WARNING, currentClass, cField, null); return; } @@ -142,7 +142,7 @@ { // TODO: print out old and new value // How can that be done with BCEL, esp. for boolean values? - fireDiff(MSG_FIELD_CONSTANT_CHANGED, net.sf.clirr.core.Severity.WARNING, currentClass, cField, null); + fireDiff(MSG_FIELD_CONSTANT_CHANGED, Severity.WARNING, currentClass, cField, null); } } } @@ -153,7 +153,7 @@ final String cSig = cField.getType().toString(); if (!bSig.equals(cSig)) { - fireDiff(MSG_FIELD_TYPE_CHANGED, net.sf.clirr.core.Severity.ERROR, currentClass, bField, new String[]{bSig, cSig}); + fireDiff(MSG_FIELD_TYPE_CHANGED, Severity.ERROR, currentClass, bField, new String[]{bSig, cSig}); } } @@ -161,22 +161,22 @@ { if (bField.isFinal() && !cField.isFinal()) { - fireDiff(MSG_FIELD_NOW_NON_FINAL, net.sf.clirr.core.Severity.INFO, clazz, cField, null); + fireDiff(MSG_FIELD_NOW_NON_FINAL, Severity.INFO, clazz, cField, null); } if (!bField.isFinal() && cField.isFinal()) { - fireDiff(MSG_FIELD_NOW_FINAL, net.sf.clirr.core.Severity.ERROR, clazz, cField, null); + fireDiff(MSG_FIELD_NOW_FINAL, Severity.ERROR, clazz, cField, null); } if (bField.isStatic() && !cField.isStatic()) { - fireDiff(MSG_FIELD_NOW_NON_STATIC, net.sf.clirr.core.Severity.ERROR, clazz, cField, null); + fireDiff(MSG_FIELD_NOW_NON_STATIC, Severity.ERROR, clazz, cField, null); } if (!bField.isStatic() && cField.isStatic()) { - fireDiff(MSG_FIELD_NOW_STATIC, net.sf.clirr.core.Severity.ERROR, clazz, cField, null); + fireDiff(MSG_FIELD_NOW_STATIC, Severity.ERROR, clazz, cField, null); } // JLS, 13.4.10: Adding or deleting a transient modifier of a field @@ -187,23 +187,23 @@ private void checkForVisibilityChange(Field bField, Field cField, JavaClass clazz) { - net.sf.clirr.core.ScopeSelector.Scope bScope = net.sf.clirr.core.ScopeSelector.getScope(bField); - net.sf.clirr.core.ScopeSelector.Scope cScope = net.sf.clirr.core.ScopeSelector.getScope(cField); + ScopeSelector.Scope bScope = ScopeSelector.getScope(bField); + ScopeSelector.Scope cScope = ScopeSelector.getScope(cField); if (cScope.isMoreVisibleThan(bScope)) { - fireDiff(MSG_FIELD_MORE_ACCESSABLE, net.sf.clirr.core.Severity.INFO, clazz, cField, new String[]{bScope.getDesc(), cScope.getDesc()}); + fireDiff(MSG_FIELD_MORE_ACCESSABLE, Severity.INFO, clazz, cField, new String[]{bScope.getDesc(), cScope.getDesc()}); } else if (cScope.isLessVisibleThan(bScope)) { - fireDiff(MSG_FIELD_LESS_ACCESSABLE, net.sf.clirr.core.Severity.ERROR, clazz, cField, new String[]{bScope.getDesc(), cScope.getDesc()}); + fireDiff(MSG_FIELD_LESS_ACCESSABLE, Severity.ERROR, clazz, cField, new String[]{bScope.getDesc(), cScope.getDesc()}); } } - private void fireDiff(net.sf.clirr.core.Message msg, net.sf.clirr.core.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 net.sf.clirr.core.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); } Index: GenderChangeCheck.java =================================================================== RCS file: /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core/internal/checks/GenderChangeCheck.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- GenderChangeCheck.java 10 Jul 2004 13:37:26 -0000 1.1 +++ GenderChangeCheck.java 11 Jul 2004 10:33:50 -0000 1.2 @@ -33,8 +33,8 @@ */ public final class GenderChangeCheck extends AbstractDiffReporter implements ClassChangeCheck { - private static final net.sf.clirr.core.Message MSG_GENDER_CLASS_TO_INTERFACE = new Message(2000); - private static final net.sf.clirr.core.Message MSG_GENDER_INTERFACE_TO_CLASS = new Message(2001); + private static final Message MSG_GENDER_CLASS_TO_INTERFACE = new Message(2000); + private static final Message MSG_GENDER_INTERFACE_TO_CLASS = new Message(2001); /** * Create a new instance of this check. @@ -51,11 +51,11 @@ { if (baseLine.isClass() && current.isInterface()) { - log(MSG_GENDER_CLASS_TO_INTERFACE, net.sf.clirr.core.Severity.ERROR, baseLine.getClassName(), null, null, null); + log(MSG_GENDER_CLASS_TO_INTERFACE, Severity.ERROR, baseLine.getClassName(), null, null, null); } else if (baseLine.isInterface() && current.isClass()) { - log(MSG_GENDER_INTERFACE_TO_CLASS, net.sf.clirr.core.Severity.ERROR, baseLine.getClassName(), null, null, null); + log(MSG_GENDER_INTERFACE_TO_CLASS, Severity.ERROR, baseLine.getClassName(), null, null, null); } return true; Index: InterfaceSetCheck.java =================================================================== RCS file: /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core/internal/checks/InterfaceSetCheck.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- InterfaceSetCheck.java 10 Jul 2004 13:37:26 -0000 1.1 +++ InterfaceSetCheck.java 11 Jul 2004 10:33:50 -0000 1.2 @@ -38,8 +38,8 @@ */ public final class InterfaceSetCheck extends AbstractDiffReporter implements ClassChangeCheck { - private static final net.sf.clirr.core.Message MSG_IFACE_ADDED = new Message(4000); - private static final net.sf.clirr.core.Message MSG_IFACE_REMOVED = new Message(4001); + private static final Message MSG_IFACE_ADDED = new Message(4000); + private static final Message MSG_IFACE_REMOVED = new Message(4001); /** * Create a new instance of this check. @@ -82,11 +82,11 @@ if (compatInterface == null) { - log(MSG_IFACE_ADDED, net.sf.clirr.core.Severity.INFO, className, null, null, new String[]{currentInterface.getClassName()}); + log(MSG_IFACE_ADDED, Severity.INFO, className, null, null, new String[]{currentInterface.getClassName()}); } else if (currentInterface == null) { - log(MSG_IFACE_REMOVED, net.sf.clirr.core.Severity.ERROR, className, null, null, new String[]{compatInterface.getClassName()}); + log(MSG_IFACE_REMOVED, Severity.ERROR, className, null, null, new String[]{compatInterface.getClassName()}); } } Index: MethodSetCheck.java =================================================================== RCS file: /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core/internal/checks/MethodSetCheck.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- MethodSetCheck.java 10 Jul 2004 13:37:26 -0000 1.1 +++ MethodSetCheck.java 11 Jul 2004 10:33:50 -0000 1.2 @@ -21,6 +21,8 @@ import net.sf.clirr.core.ApiDifference; import net.sf.clirr.core.Message; +import net.sf.clirr.core.Severity; +import net.sf.clirr.core.ScopeSelector; import net.sf.clirr.core.internal.AbstractDiffReporter; import net.sf.clirr.core.internal.ApiDiffDispatcher; import net.sf.clirr.core.internal.ClassChangeCheck; @@ -58,10 +60,10 @@ private static final Message MSG_METHOD_ADDED_TO_INTERFACE = new Message(7012); private static final Message MSG_ABSTRACT_METHOD_ADDED = new Message(7013); - private net.sf.clirr.core.ScopeSelector scopeSelector; + private ScopeSelector scopeSelector; /** {@inheritDoc} */ - public MethodSetCheck(ApiDiffDispatcher dispatcher, net.sf.clirr.core.ScopeSelector scopeSelector) + public MethodSetCheck(ApiDiffDispatcher dispatcher, ScopeSelector scopeSelector) { super(dispatcher); this.scopeSelector = scopeSelector; @@ -375,15 +377,15 @@ if (superClassName != null) { - fireDiff(MSG_METHOD_NOW_IN_SUPERCLASS, net.sf.clirr.core.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, net.sf.clirr.core.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, net.sf.clirr.core.Severity.ERROR, oldClass, oldMethod, null); + fireDiff(MSG_METHOD_REMOVED, Severity.ERROR, oldClass, oldMethod, null); } } @@ -411,15 +413,15 @@ if (newClass.isInterface()) { - fireDiff(MSG_METHOD_ADDED_TO_INTERFACE, net.sf.clirr.core.Severity.ERROR, newClass, newMethod, null); + fireDiff(MSG_METHOD_ADDED_TO_INTERFACE, Severity.ERROR, newClass, newMethod, null); } else if (newMethod.isAbstract()) { - fireDiff(MSG_ABSTRACT_METHOD_ADDED, net.sf.clirr.core.Severity.ERROR, newClass, newMethod, null); + fireDiff(MSG_ABSTRACT_METHOD_ADDED, Severity.ERROR, newClass, newMethod, null); } else { - fireDiff(MSG_METHOD_ADDED, net.sf.clirr.core.Severity.INFO, newClass, newMethod, null); + fireDiff(MSG_METHOD_ADDED, Severity.INFO, newClass, newMethod, null); } } @@ -467,7 +469,7 @@ if (bArgs.length != cArgs.length) { - fireDiff(MSG_METHOD_ARGCOUNT_CHANGED, net.sf.clirr.core.Severity.ERROR, compatBaseline, baselineMethod, null); + fireDiff(MSG_METHOD_ARGCOUNT_CHANGED, Severity.ERROR, compatBaseline, baselineMethod, null); return; } @@ -484,7 +486,7 @@ // TODO: Check assignability... String[] args = {"" + (i + 1), cArg.toString()}; - fireDiff(MSG_METHOD_PARAMTYPE_CHANGED, net.sf.clirr.core.Severity.ERROR, compatBaseline, baselineMethod, args); + fireDiff(MSG_METHOD_PARAMTYPE_CHANGED, Severity.ERROR, compatBaseline, baselineMethod, args); } } @@ -498,7 +500,7 @@ // compatible even when binary-incompatible. if (!bReturnType.toString().equals(cReturnType.toString())) { - fireDiff(MSG_METHOD_RETURNTYPE_CHANGED, net.sf.clirr.core.Severity.ERROR, compatBaseline, baselineMethod, new String[]{cReturnType.toString()}); + fireDiff(MSG_METHOD_RETURNTYPE_CHANGED, Severity.ERROR, compatBaseline, baselineMethod, new String[]{cReturnType.toString()}); } } @@ -514,11 +516,11 @@ if (bIsDeprecated && !cIsDeprecated) { - fireDiff(MSG_METHOD_UNDEPRECATED, net.sf.clirr.core.Severity.INFO, compatBaseline, baselineMethod, null); + fireDiff(MSG_METHOD_UNDEPRECATED, Severity.INFO, compatBaseline, baselineMethod, null); } else if (!bIsDeprecated && cIsDeprecated) { - fireDiff(MSG_METHOD_DEPRECATED, net.sf.clirr.core.Severity.INFO, compatBaseline, baselineMethod, null); + fireDiff(MSG_METHOD_DEPRECATED, Severity.INFO, compatBaseline, baselineMethod, null); } } @@ -528,18 +530,18 @@ */ private void checkVisibility(JavaClass compatBaseline, Method baselineMethod, Method currentMethod) { - net.sf.clirr.core.ScopeSelector.Scope bScope = net.sf.clirr.core.ScopeSelector.getScope(baselineMethod); - net.sf.clirr.core.ScopeSelector.Scope cScope = net.sf.clirr.core.ScopeSelector.getScope(currentMethod); + ScopeSelector.Scope bScope = ScopeSelector.getScope(baselineMethod); + ScopeSelector.Scope cScope = ScopeSelector.getScope(currentMethod); if (cScope.isLessVisibleThan(bScope)) { String[] args = {bScope.getDesc(), cScope.getDesc()}; - fireDiff(MSG_METHOD_LESS_ACCESSABLE, net.sf.clirr.core.Severity.ERROR, compatBaseline, baselineMethod, args); + fireDiff(MSG_METHOD_LESS_ACCESSABLE, Severity.ERROR, compatBaseline, baselineMethod, args); } else if (cScope.isMoreVisibleThan(bScope)) { String[] args = {bScope.getDesc(), cScope.getDesc()}; - fireDiff(MSG_METHOD_MORE_ACCESSABLE, net.sf.clirr.core.Severity.INFO, compatBaseline, baselineMethod, args); + fireDiff(MSG_METHOD_MORE_ACCESSABLE, Severity.INFO, compatBaseline, baselineMethod, args); } } @@ -554,7 +556,7 @@ { StringBuffer buf = new StringBuffer(); - final String scopeDecl = net.sf.clirr.core.ScopeSelector.getScopeDecl(method); + final String scopeDecl = ScopeSelector.getScopeDecl(method); if (scopeDecl.length() > 0) { buf.append(scopeDecl); @@ -592,7 +594,7 @@ } } - private void fireDiff(net.sf.clirr.core.Message msg, net.sf.clirr.core.Severity severity, JavaClass clazz, Method method, String[] args) + 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); |