clirr-devel Mailing List for Clirr (Page 23)
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: <lk...@us...> - 2004-07-11 12:19:20
|
Update of /cvsroot/clirr/clirr/core/xdocs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8611 Modified Files: anttask.xml Log Message: fixed jar name title Index: anttask.xml =================================================================== RCS file: /cvsroot/clirr/clirr/core/xdocs/anttask.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- anttask.xml 10 Jul 2004 13:24:04 -0000 1.1 +++ anttask.xml 11 Jul 2004 12:19:12 -0000 1.2 @@ -1,12 +1,14 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> + <document> <properties> <title>Clirr Ant Task</title> - <author>Lars Kühne</author> + <author>Lars Kühne</author> </properties> <body> <section name="Running Clirr as an Ant Task"> <p> - clirr is distributed as an + The clirr-core module contains an <a href="http://ant.apache.org">Ant</a> task. The following text assumes that you are familiar with Ant. To run clirr, you typically </p> @@ -26,7 +28,7 @@ <target name="checkbinarycompatibility" depends="build"> <!-- buildtools.classpath should contain - clirr.jar and the libraries it depends on --> + clirr-core.jar and the libraries it depends on --> <taskdef classpathref="buildtools.classpath" @@ -104,8 +106,9 @@ <p> Clirr works with FileSets instead of individual jar files to allow - splitting up or combining library distributions. An example is log4j, the 1.3.0 - release splits up the earlier log4j.jar into several jar files. + splitting up or combining library distributions. An example is log4j, + presumably the 1.3.0 release will split up the earlier log4j.jar + into several jar files. </p> </section> |
From: <lk...@us...> - 2004-07-11 12:18:58
|
Update of /cvsroot/clirr/clirr/core/xdocs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8541 Modified Files: navigation.xml Log Message: fixed document title Index: navigation.xml =================================================================== RCS file: /cvsroot/clirr/clirr/core/xdocs/navigation.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- navigation.xml 10 Jul 2004 13:24:04 -0000 1.1 +++ navigation.xml 11 Jul 2004 12:18:50 -0000 1.2 @@ -1,6 +1,6 @@ <?xml version="1.0"?> -<project name="Clirr"> - <title>Clirr</title> +<project name="Clirr Core"> + <title>Clirr Core</title> <body> <links> <item name="SourceForge Project Page" @@ -8,7 +8,7 @@ <item name="Hosted by SourceForge" href="http://sourceforge.net/"/> </links> - <menu name="Clirr"> + <menu name="Clirr Core"> <item name="Overview" href="/index.html"/> <item name="Download" |
From: <lk...@us...> - 2004-07-11 11:03:25
|
Update of /cvsroot/clirr/clirr In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20979 Modified Files: project.xml Log Message: removed java related reports, added multichanges report Index: project.xml =================================================================== RCS file: /cvsroot/clirr/clirr/project.xml,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- project.xml 10 Jul 2004 13:48:25 -0000 1.22 +++ project.xml 11 Jul 2004 11:03:16 -0000 1.23 @@ -146,12 +146,7 @@ </build> <reports> - <report>maven-changes-plugin</report> - <report>maven-checkstyle-plugin</report> - <report>maven-javadoc-plugin</report> - <report>maven-jdepend-plugin</report> - <report>maven-junit-report-plugin</report> - <report>maven-jxr-plugin</report> + <report>maven-multichanges-plugin</report> <report>maven-license-plugin</report> <!-- <report>maven-linkcheck-plugin</report> --> <report>maven-tasklist-plugin</report> |
From: <lk...@us...> - 2004-07-11 10:39:04
|
Update of /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core/internal In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16863 Modified Files: ApiDiffDispatcher.java Log Message: improved javadoc Index: ApiDiffDispatcher.java =================================================================== RCS file: /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core/internal/ApiDiffDispatcher.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- ApiDiffDispatcher.java 11 Jul 2004 10:33:50 -0000 1.2 +++ ApiDiffDispatcher.java 11 Jul 2004 10:38:52 -0000 1.3 @@ -21,7 +21,14 @@ import net.sf.clirr.core.ApiDifference; +/** + * Distributes API differences to listeners. + */ public interface ApiDiffDispatcher { + /** + * Called by checks to inform listeners that an API difference has been detected. + * @param diff the API difference + */ void fireDiff(ApiDifference diff); } |
From: <lk...@us...> - 2004-07-11 10:38:41
|
Update of /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core/internal/checks In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16817 Modified Files: MethodSetCheck.java Log Message: fixed javadoc warning Index: MethodSetCheck.java =================================================================== RCS file: /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core/internal/checks/MethodSetCheck.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- MethodSetCheck.java 11 Jul 2004 10:33:50 -0000 1.2 +++ MethodSetCheck.java 11 Jul 2004 10:38:32 -0000 1.3 @@ -62,7 +62,11 @@ private ScopeSelector scopeSelector; - /** {@inheritDoc} */ + /** + * Instatiates the check. + * @param dispatcher the dispatcher where detected differences shoudl be reported. + * @param scopeSelector defines the scopes to look at when searching for differences. + */ public MethodSetCheck(ApiDiffDispatcher dispatcher, ScopeSelector scopeSelector) { super(dispatcher); |
From: <lk...@us...> - 2004-07-11 10:34:16
|
Update of /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/ant In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16155/clirr/ant Modified Files: AntLogger.java ChangeCounter.java Log Message: use import statements instead of fq classnames in the code (generated by wrong settings during package refactorings) Index: AntLogger.java =================================================================== RCS file: /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/ant/AntLogger.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- AntLogger.java 10 Jul 2004 13:37:26 -0000 1.1 +++ AntLogger.java 11 Jul 2004 10:33:50 -0000 1.2 @@ -25,6 +25,7 @@ import net.sf.clirr.core.DiffListenerAdapter; import net.sf.clirr.core.Severity; import net.sf.clirr.core.MessageTranslator; +import net.sf.clirr.core.ApiDifference; import org.apache.tools.ant.Project; import org.apache.tools.ant.Task; @@ -44,7 +45,7 @@ severityPrioMap.put(Severity.ERROR, new Integer(Project.MSG_ERR)); } - public void reportDiff(net.sf.clirr.core.ApiDifference difference) + public void reportDiff(ApiDifference difference) { final Severity severity = difference.getMaximumSeverity(); final Integer prio = (Integer) severityPrioMap.get(severity); Index: ChangeCounter.java =================================================================== RCS file: /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/ant/ChangeCounter.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- ChangeCounter.java 10 Jul 2004 13:37:26 -0000 1.1 +++ ChangeCounter.java 11 Jul 2004 10:33:50 -0000 1.2 @@ -19,8 +19,12 @@ package net.sf.clirr.ant; +import net.sf.clirr.core.ApiDifference; +import net.sf.clirr.core.Severity; +import net.sf.clirr.core.DiffListenerAdapter; -final class ChangeCounter extends net.sf.clirr.core.DiffListenerAdapter + +final class ChangeCounter extends DiffListenerAdapter { private int binInfos = 0; private int binWarnings = 0; @@ -65,32 +69,32 @@ return srcErrors; } - public void reportDiff(net.sf.clirr.core.ApiDifference difference) + public void reportDiff(ApiDifference difference) { - final net.sf.clirr.core.Severity binSeverity = difference.getBinaryCompatibilitySeverity(); - if (net.sf.clirr.core.Severity.ERROR.equals(binSeverity)) + final Severity binSeverity = difference.getBinaryCompatibilitySeverity(); + if (Severity.ERROR.equals(binSeverity)) { binErrors += 1; } - else if (net.sf.clirr.core.Severity.WARNING.equals(binSeverity)) + else if (Severity.WARNING.equals(binSeverity)) { binWarnings += 1; } - else if (net.sf.clirr.core.Severity.INFO.equals(binSeverity)) + else if (Severity.INFO.equals(binSeverity)) { binInfos += 1; } - final net.sf.clirr.core.Severity srcSeverity = difference.getSourceCompatibilitySeverity(); - if (net.sf.clirr.core.Severity.ERROR.equals(srcSeverity)) + final Severity srcSeverity = difference.getSourceCompatibilitySeverity(); + if (Severity.ERROR.equals(srcSeverity)) { srcErrors += 1; } - else if (net.sf.clirr.core.Severity.WARNING.equals(srcSeverity)) + else if (Severity.WARNING.equals(srcSeverity)) { srcWarnings += 1; } - else if (net.sf.clirr.core.Severity.INFO.equals(srcSeverity)) + else if (Severity.INFO.equals(srcSeverity)) { srcInfos += 1; } |
From: <lk...@us...> - 2004-07-11 10:34:16
|
Update of /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16155/clirr/core Modified Files: Checker.java DiffListenerAdapter.java ScopeSelector.java XmlDiffListener.java Log Message: use import statements instead of fq classnames in the code (generated by wrong settings during package refactorings) Index: Checker.java =================================================================== RCS file: /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core/Checker.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- Checker.java 10 Jul 2004 13:37:26 -0000 1.1 +++ Checker.java 11 Jul 2004 10:33:50 -0000 1.2 @@ -69,7 +69,7 @@ private List classChecks = new ArrayList(); - private net.sf.clirr.core.ScopeSelector scopeSelector = new ScopeSelector(); + private ScopeSelector scopeSelector = new ScopeSelector(); /** * Package visible constructor for unit testing. @@ -93,12 +93,12 @@ classChecks.add(new MethodSetCheck(this, scopeSelector)); } - public net.sf.clirr.core.ScopeSelector getScopeSelector() + public ScopeSelector getScopeSelector() { return scopeSelector; } - public void addDiffListener(net.sf.clirr.core.DiffListener listener) + public void addDiffListener(DiffListener listener) { listeners.add(listener); } @@ -107,7 +107,7 @@ { for (Iterator it = listeners.iterator(); it.hasNext();) { - net.sf.clirr.core.DiffListener diffListener = (net.sf.clirr.core.DiffListener) it.next(); + DiffListener diffListener = (DiffListener) it.next(); diffListener.start(); } } @@ -116,16 +116,16 @@ { for (Iterator it = listeners.iterator(); it.hasNext();) { - net.sf.clirr.core.DiffListener diffListener = (net.sf.clirr.core.DiffListener) it.next(); + DiffListener diffListener = (DiffListener) it.next(); diffListener.stop(); } } - public void fireDiff(net.sf.clirr.core.ApiDifference diff) + public void fireDiff(ApiDifference diff) { for (Iterator it = listeners.iterator(); it.hasNext();) { - net.sf.clirr.core.DiffListener diffListener = (net.sf.clirr.core.DiffListener) it.next(); + DiffListener diffListener = (DiffListener) it.next(); diffListener.reportDiff(diff); } } Index: DiffListenerAdapter.java =================================================================== RCS file: /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core/DiffListenerAdapter.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- DiffListenerAdapter.java 10 Jul 2004 13:37:26 -0000 1.1 +++ DiffListenerAdapter.java 11 Jul 2004 10:33:50 -0000 1.2 @@ -33,7 +33,7 @@ { /** * Does nothing - * @see net.sf.clirr.core.DiffListener#reportDiff(net.sf.clirr.core.ApiDifference) + * @see DiffListener#reportDiff(net.sf.clirr.core.ApiDifference) */ public void reportDiff(ApiDifference difference) { @@ -41,7 +41,7 @@ /** * Does nothing - * @see net.sf.clirr.core.DiffListener#start() + * @see DiffListener#start() */ public void start() { @@ -49,7 +49,7 @@ /** * Does nothing - * @see net.sf.clirr.core.DiffListener#stop() + * @see DiffListener#stop() */ public void stop() { Index: ScopeSelector.java =================================================================== RCS file: /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core/ScopeSelector.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- ScopeSelector.java 10 Jul 2004 13:37:26 -0000 1.1 +++ ScopeSelector.java 11 Jul 2004 10:33:50 -0000 1.2 @@ -312,7 +312,7 @@ * specified class is retrieved and its InnerClasses attribute checked to * find the true scope for the specified class. * <p> - * @throws net.sf.clirr.core.CheckerException if the specified class is a nested class and + * @throws CheckerException if the specified class is a nested class and * the enclosing class could not be found, or if the supposedly enclosing * class has no reference to the nested class. This exception is not * expected to occur in practice, unless a truly screwed-up jar file is Index: XmlDiffListener.java =================================================================== RCS file: /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core/XmlDiffListener.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- XmlDiffListener.java 10 Jul 2004 13:37:26 -0000 1.1 +++ XmlDiffListener.java 11 Jul 2004 10:33:50 -0000 1.2 @@ -68,7 +68,7 @@ /** * Writes an XML header and toplevel tag to the xml stream. * - * @see net.sf.clirr.core.DiffListener#start() + * @see DiffListener#start() */ public void start() { @@ -81,7 +81,7 @@ /** * Closes the toplevel tag that was opened in start. * - * @see net.sf.clirr.core.DiffListener#stop() + * @see DiffListener#stop() */ protected void writeFooter() { |
From: <lk...@us...> - 2004-07-11 10:34:15
|
Update of /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/cli In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16155/clirr/cli Modified Files: Clirr.java Log Message: use import statements instead of fq classnames in the code (generated by wrong settings during package refactorings) Index: Clirr.java =================================================================== RCS file: /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/cli/Clirr.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- Clirr.java 10 Jul 2004 13:37:26 -0000 1.1 +++ Clirr.java 11 Jul 2004 10:33:50 -0000 1.2 @@ -24,6 +24,8 @@ import net.sf.clirr.core.ClassSelector; import net.sf.clirr.core.PlainDiffListener; import net.sf.clirr.core.XmlDiffListener; +import net.sf.clirr.core.DiffListener; +import net.sf.clirr.core.ScopeSelector; import org.apache.commons.cli.BasicParser; import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.HelpFormatter; @@ -97,11 +99,11 @@ Checker checker = new Checker(); if (showAll) { - checker.getScopeSelector().setScope(net.sf.clirr.core.ScopeSelector.SCOPE_PRIVATE); + checker.getScopeSelector().setScope(ScopeSelector.SCOPE_PRIVATE); } else if (showPkg) { - checker.getScopeSelector().setScope(net.sf.clirr.core.ScopeSelector.SCOPE_PACKAGE); + checker.getScopeSelector().setScope(ScopeSelector.SCOPE_PACKAGE); } ClassSelector classSelector; @@ -119,7 +121,7 @@ classSelector = new ClassSelector(ClassSelector.MODE_UNLESS); } - net.sf.clirr.core.DiffListener diffListener = null; + DiffListener diffListener = null; if (style.equals("text")) { try |
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); |
From: <lk...@us...> - 2004-07-11 10:34:02
|
Update of /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core/internal In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16155/clirr/core/internal Modified Files: ApiDiffDispatcher.java Log Message: use import statements instead of fq classnames in the code (generated by wrong settings during package refactorings) Index: ApiDiffDispatcher.java =================================================================== RCS file: /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core/internal/ApiDiffDispatcher.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- ApiDiffDispatcher.java 10 Jul 2004 13:37:26 -0000 1.1 +++ ApiDiffDispatcher.java 11 Jul 2004 10:33:50 -0000 1.2 @@ -23,5 +23,5 @@ public interface ApiDiffDispatcher { - void fireDiff(net.sf.clirr.core.ApiDifference diff); + void fireDiff(ApiDifference diff); } |
From: <lk...@us...> - 2004-07-11 10:29:33
|
Update of /cvsroot/clirr/clirr/core/src/test/net/sf/clirr/core/internal/checks In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15487/test/net/sf/clirr/core/internal/checks Added Files: AbstractCheckTestCase.java ClassHierarchyCheckTest.java ClassModifierCheckTest.java ClassScopeCheckTest.java ExpectedDiff.java FieldSetCheckTest.java GenderChangeCheckTest.java MethodSetCheckTest.java TestDiffListener.java Log Message: Whoops - forgot to add tests after moving sources to core subproject --- NEW FILE --- package net.sf.clirr.core.internal.checks; import junit.framework.TestCase; import net.sf.clirr.core.Checker; import net.sf.clirr.core.ClassSelector; import net.sf.clirr.core.ApiDifference; import net.sf.clirr.core.CheckerFactory; import net.sf.clirr.core.internal.ClassChangeCheck; import org.apache.bcel.util.ClassSet; import java.io.File; import java.net.URL; import java.net.URLClassLoader; /** * Abstract Baseclass to test individual Checks. * @author lkuehne */ public abstract class AbstractCheckTestCase extends TestCase { protected final File getTestInputDir() { // property is set in project.properties return new File(System.getProperty("testinput")); } protected void verify( Checker checker, ClassSet baseline, ClassSet current, ApiDifference[] expected) { } protected File[] getBaseLine() { return new File[]{ new File(getTestInputDir(), "testlib-v1.jar") }; } protected File[] getCurrent() { return new File[]{ new File(getTestInputDir(), "testlib-v2.jar") }; } protected void verify(ExpectedDiff[] expected) throws Exception { TestDiffListener tdl = new TestDiffListener(); Checker checker = CheckerFactory.createChecker(createCheck(tdl)); ClassSelector classSelector = createClassSelector(); checker.reportDiffs( getBaseLine(), getCurrent(), new URLClassLoader(new URL[]{}), new URLClassLoader(new URL[]{}), classSelector); tdl.checkExpected(expected); } /** * Creates an object which selects the appropriate classes from the * test jars for this test. * <p> * This base implementation returns a selector which selects all classes * in the base "testlib" package (but no sub-packages). Tests which wish * to select different classes from the test jars should override this * method. */ protected ClassSelector createClassSelector() { // only check classes in the base "testlib" package of the jars ClassSelector classSelector = new ClassSelector(ClassSelector.MODE_IF); classSelector.addPackage("testlib"); return classSelector; } /** * Creates a check and sets it up so ApiDifferences are reported to the test diff listener. * * @param tdl the test diff listener that records the recognized api changes. * @return the confiured check */ protected abstract ClassChangeCheck createCheck(TestDiffListener tdl); } --- NEW FILE --- package net.sf.clirr.core.internal.checks; import net.sf.clirr.core.internal.ClassChangeCheck; import net.sf.clirr.core.internal.checks.ClassHierarchyCheck; import net.sf.clirr.core.internal.checks.AbstractCheckTestCase; import net.sf.clirr.core.Severity; /** * @author lkuehne */ public class ClassHierarchyCheckTest extends AbstractCheckTestCase { public void testHierarchyChangesAreReported() throws Exception { ExpectedDiff[] expected = new ExpectedDiff[] { new ExpectedDiff("Added java.util.NoSuchElementException to the list of superclasses", Severity.WARNING, "testlib.ApplicationException", null, null), new ExpectedDiff("Removed java.awt.event.MouseAdapter from the list of superclasses", Severity.ERROR, "testlib.ChangingHierarchy", null, null), new ExpectedDiff("Added java.awt.event.WindowAdapter to the list of superclasses", Severity.INFO, "testlib.ChangingHierarchy", null, null), }; verify(expected); } protected ClassChangeCheck createCheck(TestDiffListener tdl) { return new ClassHierarchyCheck(tdl); } } --- NEW FILE --- package net.sf.clirr.core.internal.checks; import net.sf.clirr.core.internal.ClassChangeCheck; import net.sf.clirr.core.Severity; import net.sf.clirr.core.ClassSelector; import net.sf.clirr.core.internal.checks.ClassModifierCheck; import net.sf.clirr.core.internal.checks.AbstractCheckTestCase; /** * Tests for the ClassModifierCheck class. */ public class ClassModifierCheckTest extends AbstractCheckTestCase { public void testAll() throws Exception { ExpectedDiff[] expected = new ExpectedDiff[] { new ExpectedDiff("Added final modifier to class", Severity.ERROR, "testlib.modifiers.NonFinalBecomesFinal", null, null), new ExpectedDiff("Added final modifier to class, but class was effectively final anyway", Severity.INFO, "testlib.modifiers.EffectivelyFinal", null, null), }; verify(expected); } protected ClassChangeCheck createCheck(TestDiffListener tdl) { return new ClassModifierCheck(tdl); } protected ClassSelector createClassSelector() { // only apply the check to classes in the testlib.modifiers package. ClassSelector classSelector = new ClassSelector(ClassSelector.MODE_IF); classSelector.addPackage("testlib.modifiers"); return classSelector; } } --- NEW FILE --- package net.sf.clirr.core.internal.checks; import net.sf.clirr.core.internal.ClassChangeCheck; import net.sf.clirr.core.Severity; import net.sf.clirr.core.ClassSelector; import net.sf.clirr.core.ScopeSelector; import net.sf.clirr.core.internal.checks.ClassScopeCheck; import net.sf.clirr.core.internal.checks.AbstractCheckTestCase; /** * Tests for the ClassScopeCheck test. * * @author Simon Kitching */ public class ClassScopeCheckTest extends AbstractCheckTestCase { public void testAccessChangesAreReported() throws Exception { ExpectedDiff[] expected = new ExpectedDiff[] { new ExpectedDiff("Decreased visibility of class from public to protected", Severity.ERROR, "testlib.scope.ClassScopeChange$A2", null, null), new ExpectedDiff("Decreased visibility of class from public to package", Severity.ERROR, "testlib.scope.ClassScopeChange$A3", null, null), new ExpectedDiff("Decreased visibility of class from public to private", Severity.ERROR, "testlib.scope.ClassScopeChange$A4", null, null), new ExpectedDiff("Increased visibility of class from protected to public", Severity.INFO, "testlib.scope.ClassScopeChange$B2", null, null), new ExpectedDiff("Decreased visibility of class from protected to package", Severity.ERROR, "testlib.scope.ClassScopeChange$B3", null, null), new ExpectedDiff("Decreased visibility of class from protected to private", Severity.ERROR, "testlib.scope.ClassScopeChange$B4", null, null), 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), 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), new ExpectedDiff("Increased visibility of class from private to package", Severity.INFO, "testlib.scope.ClassScopeChange$D4", null, null), }; verify(expected); } protected ClassChangeCheck createCheck(TestDiffListener tdl) { ScopeSelector scopeSelector = new ScopeSelector(ScopeSelector.SCOPE_PRIVATE); return new ClassScopeCheck(tdl, scopeSelector); } protected ClassSelector createClassSelector() { // only check the testlib/scope/ClassScopeChange class. ClassSelector classSelector = new ClassSelector(ClassSelector.MODE_IF); classSelector.addClass("testlib.scope.ClassScopeChange"); return classSelector; } } --- NEW FILE --- package net.sf.clirr.core.internal.checks; import net.sf.clirr.core.ApiDifference; import net.sf.clirr.core.MessageTranslator; import net.sf.clirr.core.Severity; /** * Describes an expected API change. */ public final class ExpectedDiff { private static MessageTranslator translator = new MessageTranslator(); private String report; private Severity binaryCompatibilitySeverity; private Severity sourceCompatibilitySeverity; private String affectedClass; private String affectedMethod; private String affectedField; /** * Create a new API difference representation. * * @param report a human readable string describing the change that was made, must be non-null. * @param severity the severity in terms of binary and source code compatibility, must be non-null. * @param clazz the fully qualified class name where the change occured, must be non-null. * @param method the method signature of the method that changed, <code>null</code> * if no method was affected. * @param field the field name where the change occured, <code>null</code> * if no field was affected. */ public ExpectedDiff(String report, Severity severity, String clazz, String method, String field) { this(report, severity, severity, clazz, method, field); } /** * Create a new API difference representation. * * @param report a human readable string describing the change that was made, must be non-null. * @param binarySeverity the severity in terms of binary compatibility, must be non-null. * @param sourceSeverity the severity in terms of source code compatibility, must be non-null. * @param clazz the fully qualified class name where the change occured, must be non-null. * @param method the method signature of the method that changed, <code>null</code> * if no method was affected. * @param field the field name where the change occured, <code>null</code> * if no field was affected. */ public ExpectedDiff(String report, Severity binarySeverity, Severity sourceSeverity, String clazz, String method, String field) { checkNonNull(report); checkNonNull(binarySeverity); checkNonNull(sourceSeverity); checkNonNull(clazz); this.report = report; this.binaryCompatibilitySeverity = binarySeverity; this.sourceCompatibilitySeverity = sourceSeverity; this.affectedClass = clazz; this.affectedField = field; this.affectedMethod = method; } /** * Trivial utility method to verify that a specific object is non-null. */ private void checkNonNull(Object o) { if (o == null) { throw new IllegalArgumentException(); } } /** * {@inheritDoc} */ public String toString() { return report + " (" + binaryCompatibilitySeverity + ") - " + affectedClass + '[' + affectedField + '/' + affectedMethod + ']'; } /** * Returns true if the provided ApiDifference object matches the * expected value. */ public boolean matches(ApiDifference diff) { if (!report.equals(diff.getReport(translator))) { return false; } if (!binaryCompatibilitySeverity.equals(diff.getBinaryCompatibilitySeverity())) { return false; } if (!sourceCompatibilitySeverity.equals(diff.getSourceCompatibilitySeverity())) { return false; } final String otherClass = diff.getAffectedClass(); if (!affectedClass.equals(otherClass)) { return false; } final String otherMethod = diff.getAffectedMethod(); if (affectedMethod != null ? !affectedMethod.equals(otherMethod) : otherMethod != null) { return false; } final String otherField = diff.getAffectedField(); if (affectedField != null ? !affectedField.equals(otherField) : otherField != null) { return false; } return true; } } --- NEW FILE --- package net.sf.clirr.core.internal.checks; import net.sf.clirr.core.Severity; import net.sf.clirr.core.ScopeSelector; import net.sf.clirr.core.internal.ClassChangeCheck; import net.sf.clirr.core.internal.checks.FieldSetCheck; import net.sf.clirr.core.internal.checks.AbstractCheckTestCase; import net.sf.clirr.core.internal.checks.ExpectedDiff; /** * Tests FieldSetCheck. * * @author lkuehne */ public class FieldSetCheckTest extends AbstractCheckTestCase { public void testFieldCheck() throws Exception { ExpectedDiff[] expected = new ExpectedDiff[] { new ExpectedDiff("Removed field stat7", Severity.ERROR, "testlib.MembersChange", null, "stat7"), new ExpectedDiff("Accessability of field fin2 has been weakened from public to protected", Severity.ERROR, "testlib.MembersChange", null, "fin2"), new ExpectedDiff("Accessability of field stat4 has been weakened from public to protected", Severity.ERROR, "testlib.MembersChange", null, "stat4"), new ExpectedDiff("Accessability of field priv2 has been increased from private to public", Severity.INFO, "testlib.MembersChange", null, "priv2"), new ExpectedDiff("Accessability of field stat5 has been weakened from public to private", Severity.ERROR, "testlib.MembersChange", null, "stat5"), new ExpectedDiff("Field stat2 is now final", Severity.ERROR, "testlib.MembersChange", null, "stat2"), new ExpectedDiff("Field pub3 is now final", Severity.ERROR, "testlib.MembersChange", null, "pub3"), new ExpectedDiff("Accessability of field stat6 has been weakened from public to package", Severity.ERROR, "testlib.MembersChange", null, "stat6"), new ExpectedDiff("Field stat3 is now non-static", Severity.ERROR, "testlib.MembersChange", null, "stat3"), new ExpectedDiff("Field fin3 is now non-static", Severity.ERROR, "testlib.MembersChange", null, "fin3"), new ExpectedDiff("Added public field stat8", Severity.INFO, "testlib.MembersChange", null, "stat8"), new ExpectedDiff("Field fin4 is now non-final", Severity.INFO, "testlib.MembersChange", null, "fin4"), new ExpectedDiff("Field pub2 is now static", Severity.ERROR, "testlib.MembersChange", null, "pub2"), new ExpectedDiff("Changed type of field obj1 from java.lang.Object to java.lang.String", Severity.ERROR, "testlib.MembersChange", null, "obj1"), new ExpectedDiff("Changed type of field obj2 from java.lang.Boolean to java.lang.String", Severity.ERROR, "testlib.MembersChange", null, "obj2"), new ExpectedDiff("Value of field fin6 is no longer a compile-time constant", Severity.WARNING, "testlib.MembersChange", null, "fin6"), new ExpectedDiff("Value of compile-time constant fin5 has been changed", Severity.WARNING, "testlib.MembersChange", null, "fin5"), }; verify(expected); } protected final ClassChangeCheck createCheck(TestDiffListener tdl) { ScopeSelector scopeSelector = new ScopeSelector(); return new FieldSetCheck(tdl, scopeSelector); } } --- NEW FILE --- package net.sf.clirr.core.internal.checks; import net.sf.clirr.core.Severity; import net.sf.clirr.core.internal.ClassChangeCheck; import net.sf.clirr.core.internal.checks.GenderChangeCheck; import net.sf.clirr.core.internal.checks.AbstractCheckTestCase; import net.sf.clirr.core.internal.checks.ExpectedDiff; public class GenderChangeCheckTest extends AbstractCheckTestCase { public void testGenderChangeCheckTest() throws Exception { ExpectedDiff[] expected = new ExpectedDiff[] { new ExpectedDiff("Changed from class to interface", Severity.ERROR, "testlib.ClassBecomesInterface", null, null), new ExpectedDiff("Changed from interface to class", Severity.ERROR, "testlib.InterfaceBecomesClass", null, null), }; verify(expected); } protected final ClassChangeCheck createCheck(TestDiffListener tdl) { return new GenderChangeCheck(tdl); } } --- NEW FILE --- package net.sf.clirr.core.internal.checks; import net.sf.clirr.core.internal.ClassChangeCheck; import net.sf.clirr.core.Severity; import net.sf.clirr.core.ScopeSelector; import net.sf.clirr.core.internal.checks.MethodSetCheck; import net.sf.clirr.core.internal.checks.AbstractCheckTestCase; import net.sf.clirr.core.internal.checks.ExpectedDiff; /** * TODO: Docs. * * @author lkuehne */ public class MethodSetCheckTest extends AbstractCheckTestCase { public void testMethodCheck() throws Exception { ExpectedDiff[] expected = new ExpectedDiff[] { // method addition and removal new ExpectedDiff("Method 'public void removedMethod(java.lang.String)' has been removed", Severity.ERROR, "testlib.MethodsChange", "public void removedMethod(java.lang.String)", null), new ExpectedDiff("Accessability of method 'public int getPriv2()' has been decreased from public to private", Severity.ERROR, "testlib.MethodsChange", "public int getPriv2()", null), new ExpectedDiff("Method 'protected MethodsChange(int, boolean)' has been added", Severity.INFO, "testlib.MethodsChange", "protected MethodsChange(int, boolean)", null), new ExpectedDiff("Method 'public java.lang.Long getPrivSquare()' has been added", Severity.INFO, "testlib.MethodsChange", "public java.lang.Long getPrivSquare()", null), new ExpectedDiff("Method 'public void moveToSuper()' has been added", Severity.INFO, "testlib.ComplexMethodMoveBase", "public void moveToSuper()", null), new ExpectedDiff("Method 'public void moveToSuper()' is now implemented in superclass testlib.ComplexMethodMoveBase", Severity.INFO, "testlib.ComplexMethodMoveSub", "public void moveToSuper()", null), new ExpectedDiff("Abstract method 'public void method()' is now specified by implemented interface testlib.BaseInterface", Severity.INFO, "testlib.AbstractImpl", "public void method()", null), // Constructor changes new ExpectedDiff("Parameter 1 of 'protected MethodsChange(int)' has changed its type to java.lang.Integer", Severity.ERROR, "testlib.MethodsChange", "protected MethodsChange(int)", null), // return type changes new ExpectedDiff("Return type of method 'public java.lang.Number getPrivAsNumber()' has been changed to java.lang.Integer", Severity.ERROR, "testlib.MethodsChange", "public java.lang.Number getPrivAsNumber()", null), // TODO: INFO if method is final new ExpectedDiff("Return type of method 'public java.lang.Integer getPrivAsInteger()' has been changed to java.lang.Number", Severity.ERROR, "testlib.MethodsChange", "public java.lang.Integer getPrivAsInteger()", null), // parameter list changes // Note: This is the current behaviour, not necessarily the spec of the desired behaviour // TODO: need to check assignability of types (and check if method or class is final?) new ExpectedDiff("In method 'public void printPriv()' the number of arguments has changed", Severity.ERROR, "testlib.MethodsChange", "public void printPriv()", null), new ExpectedDiff("Parameter 1 of 'public void strengthenParamType(java.lang.Object)' has changed its type to java.lang.String", Severity.ERROR, "testlib.MethodsChange", "public void strengthenParamType(java.lang.Object)", null), new ExpectedDiff("Parameter 1 of 'public void weakenParamType(java.lang.String)' has changed its type to java.lang.Object", Severity.ERROR, "testlib.MethodsChange", "public void weakenParamType(java.lang.String)", null), new ExpectedDiff("Parameter 1 of 'public void changeParamType(java.lang.String)' has changed its type to java.lang.Integer", Severity.ERROR, "testlib.MethodsChange", "public void changeParamType(java.lang.String)", null), // deprecation changes new ExpectedDiff("Method 'public void becomesDeprecated()' has been deprecated", Severity.INFO, "testlib.MethodsChange", "public void becomesDeprecated()", null), new ExpectedDiff("Method 'public void becomesUndeprecated()' is no longer deprecated", Severity.INFO, "testlib.MethodsChange", "public void becomesUndeprecated()", null), // declared exceptions // TODO }; verify(expected); } protected final ClassChangeCheck createCheck(TestDiffListener tdl) { return new MethodSetCheck(tdl, new ScopeSelector()); } } --- NEW FILE --- package net.sf.clirr.core.internal.checks; import java.util.Set; import java.util.HashSet; import java.util.Iterator; import net.sf.clirr.core.internal.ApiDiffDispatcher; import net.sf.clirr.core.internal.checks.ExpectedDiff; import net.sf.clirr.core.ApiDifference; import net.sf.clirr.core.MessageTranslator; import junit.framework.TestCase; class TestDiffListener implements ApiDiffDispatcher { private MessageTranslator translator = new MessageTranslator(); private Set diffs = new HashSet(); public void fireDiff(ApiDifference difference) { diffs.add(difference); } public void checkExpected(ExpectedDiff[] expectedDiffs) { for (int i=0; i<expectedDiffs.length; ++i) { ExpectedDiff expected = expectedDiffs[i]; // now see if the expected diff is in fact in the set of // diffs that occurred during the test comparison boolean found = false; for(Iterator j = diffs.iterator(); j.hasNext() && !found;) { ApiDifference actual = (ApiDifference) j.next(); found = expected.matches(actual); } if (!found) { TestCase.fail("expected diff " + expected + " was not generated: " + diffs); } } for (Iterator it = diffs.iterator(); it.hasNext();) { ApiDifference actual = (ApiDifference) it.next(); // see if the generated diff is in fact in the expected set boolean found = false; for(int i=0; i<expectedDiffs.length && !found; ++i) { found = expectedDiffs[i].matches(actual); } if (!found) { TestCase.fail("unexpected diff " + actual); } } } } |
From: <lk...@us...> - 2004-07-11 10:29:33
|
Update of /cvsroot/clirr/clirr/core/src/test/net/sf/clirr/core/internal In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15487/test/net/sf/clirr/core/internal Added Files: CoIteratorTest.java Log Message: Whoops - forgot to add tests after moving sources to core subproject --- NEW FILE --- package net.sf.clirr.core.internal; import java.util.ArrayList; import junit.framework.TestCase; import net.sf.clirr.core.internal.CoIterator; /** * Tests for the CoIterator class. */ public class CoIteratorTest extends TestCase { public void testBasics() { ArrayList coll1 = new ArrayList(); ArrayList coll2 = new ArrayList(); coll1.add("delta"); coll1.add("beta"); coll1.add("echo"); coll1.add("foxtrot"); coll2.add("delta"); coll2.add("beta"); coll2.add("foxtrot"); coll2.add("alpha"); coll2.add("golf"); coll2.add("hotel"); CoIterator iter = new CoIterator(null, coll1, coll2); ArrayList lefts = new ArrayList(); ArrayList rights = new ArrayList(); while (iter.hasNext()) { iter.next(); lefts.add(iter.getLeft()); rights.add(iter.getRight()); } int coll1Size = coll1.size(); int coll2Size = coll2.size(); assertEquals(7, lefts.size()); assertEquals(7, rights.size()); assertEquals("lefts should not have alpha", null, lefts.get(0)); assertEquals("rights should have alpha", "alpha", rights.get(0)); assertEquals("lefts should have beta", "beta", lefts.get(1)); assertEquals("rights should have beta", "beta", rights.get(1)); assertEquals("delta", lefts.get(2)); assertEquals("delta", rights.get(2)); assertEquals("echo", lefts.get(3)); assertEquals(null, rights.get(3)); assertEquals("foxtrot", lefts.get(4)); assertEquals("foxtrot", rights.get(4)); assertEquals(null, lefts.get(5)); assertEquals("golf", rights.get(5)); assertEquals(null, lefts.get(6)); assertEquals("hotel", rights.get(6)); } } |
From: <lk...@us...> - 2004-07-11 10:29:33
|
Update of /cvsroot/clirr/clirr/core/src/test/net/sf/clirr/ant In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15487/test/net/sf/clirr/ant Added Files: ChangeCounterTest.java Log Message: Whoops - forgot to add tests after moving sources to core subproject --- NEW FILE --- package net.sf.clirr.ant; import junit.framework.TestCase; import net.sf.clirr.core.ApiDifference; import net.sf.clirr.core.Severity; import net.sf.clirr.core.Message; public class ChangeCounterTest extends TestCase { public void testCorrectCounting() { // a dummy message object Message msg = new Message(0, false); ChangeCounter counter = new ChangeCounter(); counter.reportDiff(new ApiDifference(msg, Severity.WARNING, "Test", null, null, null)); counter.reportDiff(new ApiDifference(msg, Severity.ERROR, "Test", null, null, null)); counter.reportDiff(new ApiDifference(msg, Severity.INFO, "Test", null, null, null)); counter.reportDiff(new ApiDifference(msg, Severity.ERROR, "Test", null, null, null)); counter.reportDiff(new ApiDifference(msg, Severity.ERROR, "Test", null, null, null)); counter.reportDiff(new ApiDifference(msg, Severity.WARNING, "Test", null, null, null)); assertEquals("number of expected errors", 3, counter.getBinErrors()); assertEquals("number of expected warnings", 2, counter.getBinWarnings()); assertEquals("number of expected infos", 1, counter.getBinInfos()); } } |
From: <lk...@us...> - 2004-07-11 10:29:33
|
Update of /cvsroot/clirr/clirr/core/src/test/net/sf/clirr/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15487/test/net/sf/clirr/core Added Files: CheckerFactory.java MessageTest.java Log Message: Whoops - forgot to add tests after moving sources to core subproject --- NEW FILE --- package net.sf.clirr.core; import net.sf.clirr.core.internal.ClassChangeCheck; import net.sf.clirr.core.Checker; /** * Provides a way for check tests to create a checker via the package private * Checker constructor, even if the tests are not in the same package. */ public class CheckerFactory { public static Checker createChecker(ClassChangeCheck check) { return new Checker(check); } } --- NEW FILE --- package net.sf.clirr.core; import java.util.Locale; import junit.framework.TestCase; import net.sf.clirr.core.MessageManager; import net.sf.clirr.core.MessageTranslator; /** * Tests for the Message and MessageManager classes. * <p> * It is assumed here that the other unit tests have forced every Check * class to be loaded into memory, hence all the static Message objects * have been created and registered with the MessageManager. */ public class MessageTest extends TestCase { /** * This test verifies that none of the check classes has used * a message-id which is already in use elsewhere. It is assumed * that the other unit tests will already have caused every available * check class to be loaded into memory, therefore causing all the * static Message objects to be created. */ public void testUnique() { MessageManager.getInstance().checkUnique(); } /** * This test verifies that the default resource bundle contains an * entry for every known message. * <p> * Unfortunately, it is not possible to check whether, for example, * the "de" locale has a complete set of translations. This is because * the ResourceBundle implementation simply returns a string from an * inherited "parent" resource bundle if the key is not found in a * locale-specific bundle, and there is no way of telling which * bundle the message was retrieved from. */ public void testComplete() { java.util.Collection messages = MessageManager.getInstance().getMessages(); // check the english locale MessageTranslator translator = new MessageTranslator(); translator.setLocale(Locale.ENGLISH); translator.checkComplete(messages); } } |
From: <lk...@us...> - 2004-07-11 10:27:53
|
Update of /cvsroot/clirr/clirr/core/src/test/net/sf/clirr/core/internal/checks In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15034/checks Log Message: Directory /cvsroot/clirr/clirr/core/src/test/net/sf/clirr/core/internal/checks added to the repository |
From: <lk...@us...> - 2004-07-11 10:27:23
|
Update of /cvsroot/clirr/clirr/core/src/test/net/sf/clirr/core/internal In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14983/internal Log Message: Directory /cvsroot/clirr/clirr/core/src/test/net/sf/clirr/core/internal added to the repository |
From: <lk...@us...> - 2004-07-11 10:27:08
|
Update of /cvsroot/clirr/clirr/core/src/test/net/sf/clirr/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14915/core Log Message: Directory /cvsroot/clirr/clirr/core/src/test/net/sf/clirr/core added to the repository |
From: <lk...@us...> - 2004-07-11 10:26:31
|
Update of /cvsroot/clirr/clirr/core/src/test/net/sf/clirr/ant In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14832/ant Log Message: Directory /cvsroot/clirr/clirr/core/src/test/net/sf/clirr/ant added to the repository |
From: <lk...@us...> - 2004-07-11 10:18:38
|
Update of /cvsroot/clirr/clirr/core/src/test/net/sf/clirr In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13593/clirr Log Message: Directory /cvsroot/clirr/clirr/core/src/test/net/sf/clirr added to the repository |
From: <lk...@us...> - 2004-07-11 10:18:24
|
Update of /cvsroot/clirr/clirr/core/src/test/net/sf In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13567/sf Log Message: Directory /cvsroot/clirr/clirr/core/src/test/net/sf added to the repository |
From: <lk...@us...> - 2004-07-11 10:18:12
|
Update of /cvsroot/clirr/clirr/core/src/test/net In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13495/net Log Message: Directory /cvsroot/clirr/clirr/core/src/test/net added to the repository |
From: <lk...@us...> - 2004-07-11 10:06:33
|
Update of /cvsroot/clirr/clirr/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11850 Added Files: .cvsignore Log Message: added cvs ignore file for core project --- NEW FILE --- velocity.log maven.log clirr.iws clirr.ipr clirr.iml target .classpath .project |
From: <lak...@t-...> - 2004-07-10 14:10:06
|
Hi, there might be some rough edges left on the web site, but it should be good enough so Vincent can start adding the Maven plugin as a new project, alongside core. Note that I changed not only the toplevel structure of the project, but also the java package structure to what I think we agreed on. Hope I didn't mess anything up - if you find things that don't work, don't hesitate to tell me or correct them yourself. Lars |
From: <lk...@us...> - 2004-07-10 13:57:30
|
Update of /cvsroot/clirr/clirr/src/java/net/sf/clirr In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26679/java/net/sf/clirr Removed Files: Checker.java overview.html package.html Log Message: moved src content to core project |
From: <lk...@us...> - 2004-07-10 13:57:30
|
Update of /cvsroot/clirr/clirr/src/java/net/sf/clirr/ant In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26679/java/net/sf/clirr/ant Removed Files: AntLogger.java AntTask.java ChangeCounter.java package.html Log Message: moved src content to core project |