mocklib-checkins Mailing List for mocklib (Page 22)
Brought to you by:
bittwidler,
fastdragon
You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(6) |
Jul
(1) |
Aug
(5) |
Sep
(3) |
Oct
|
Nov
|
Dec
(46) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(54) |
Feb
(120) |
Mar
(31) |
Apr
(11) |
May
(8) |
Jun
(5) |
Jul
|
Aug
(22) |
Sep
(295) |
Oct
(6) |
Nov
(10) |
Dec
|
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(9) |
Jun
|
Jul
(2) |
Aug
(2) |
Sep
|
Oct
|
Nov
(2) |
Dec
(8) |
2008 |
Jan
|
Feb
(1) |
Mar
|
Apr
(8) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
2009 |
Jan
|
Feb
(17) |
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Nobody <fas...@us...> - 2006-02-19 19:21:11
|
Update of /cvsroot/mocklib/mocklib2/tools/ant-osgi In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31048/tools/ant-osgi Added Files: bcel-head.jar osgi-ant.jar Log Message: add findbugs, checkstyle to mocklib. --- NEW FILE: bcel-head.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: osgi-ant.jar --- (This appears to be a binary file; contents omitted.) |
From: Nobody <fas...@us...> - 2006-02-19 19:21:08
|
Update of /cvsroot/mocklib/mocklib2/tools/findbugs/bin/deprecated In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31048/tools/findbugs/bin/deprecated Added Files: unionBugs bugHistory updateBugs unionResults Log Message: add findbugs, checkstyle to mocklib. --- NEW FILE: updateBugs --- #! /bin/sh # Merge a historical bug collection and a bug collection, producing an updated # historical bug collection program="$0" # Follow symlinks until we get to the actual file. while [ -h "$program" ]; do link=`ls -ld "$program"` link=`expr "$link" : '.*-> \(.*\)'` if [ "`expr "$link" : '/.*'`" = 0 ]; then # Relative dir=`dirname "$program"` program="$dir/$link" else # Absolute program="$link" fi done # Assume findbugs home directory is the parent # of the directory containing the script (which should # normally be "$findbugs_home/bin"). dir=`dirname $program` findbugs_home="$dir/.." # Handle FHS-compliant installations (e.g., Fink) if [ -d "$findbugs_home/share/findbugs" ]; then findbugs_home="$findbugs_home/share/findbugs" fi # Make absolute findbugs_home=`cd $findbugs_home && /bin/pwd` fb_pathsep=':' # Handle cygwin, courtesy of Peter D. Stout fb_osname=`uname` if [ `expr "$fb_osname" : CYGWIN` -ne 0 ]; then findbugs_home=`cygpath --mixed "$findbugs_home"` fb_pathsep=';' fi if [ ! -d "$findbugs_home" ]; then echo "The path $findbugs_home," echo "which is where I think FindBugs is located," echo "does not seem to be a directory." exit 1 fi # Choose default java binary fb_javacmd=java if [ ! -z "$JAVA_HOME" ] && [ -x "$JAVA_HOME/bin/java" ]; then fb_javacmd=$JAVA_HOME/bin/java fi fb_mainclass=edu.umd.cs.findbugs.workflow.Update fb_javacmd=${fb_javacmd:-"java"} fb_maxheap=${fb_maxheap:-"-Xmx256m"} fb_appjar=${fb_appjar:-"$findbugs_home/lib/findbugs.jar"} set -f #echo command: \ exec $fb_javacmd \ -classpath $fb_appjar$fb_pathsep$CLASSPATH \ -Dfindbugs.home="$findbugs_home"\ $fb_maxheap $fb_jvmargs $fb_mainclass ${@:+"$@"} $fb_appargs # vim:ts=3 --- NEW FILE: unionResults --- #! /bin/sh # Deprecated # Create the union of two results files, preserving # annotations in both files in the result. program="$0" # Follow symlinks until we get to the actual file. while [ -h "$program" ]; do link=`ls -ld "$program"` link=`expr "$link" : '.*-> \(.*\)'` if [ "`expr "$link" : '/.*'`" = 0 ]; then # Relative dir=`dirname "$program"` program="$dir/$link" else # Absolute program="$link" fi done # Assume findbugs home directory is the parent # of the directory containing the script (which should # normally be "$findbugs_home/bin"). dir=`dirname $program` findbugs_home="$dir/.." # Handle FHS-compliant installations (e.g., Fink) if [ -d "$findbugs_home/share/findbugs" ]; then findbugs_home="$findbugs_home/share/findbugs" fi # Make absolute findbugs_home=`cd $findbugs_home && /bin/pwd` fb_pathsep=':' # Handle cygwin, courtesy of Peter D. Stout fb_osname=`uname` if [ `expr "$fb_osname" : CYGWIN` -ne 0 ]; then findbugs_home=`cygpath --mixed "$findbugs_home"` fb_pathsep=';' fi if [ ! -d "$findbugs_home" ]; then echo "The path $findbugs_home," echo "which is where I think FindBugs is located," echo "does not seem to be a directory." exit 1 fi # Choose default java binary fb_javacmd=java if [ ! -z "$JAVA_HOME" ] && [ -x "$JAVA_HOME/bin/java" ]; then fb_javacmd=$JAVA_HOME/bin/java fi fb_mainclass=edu.umd.cs.findbugs.workflow.UnionResults fb_javacmd=${fb_javacmd:-"java"} fb_maxheap=${fb_maxheap:-"-Xmx256m"} fb_appjar=${fb_appjar:-"$findbugs_home/lib/findbugs.jar"} set -f #echo command: \ exec $fb_javacmd \ -classpath $fb_appjar$fb_pathsep$CLASSPATH \ -Dfindbugs.home="$findbugs_home"\ $fb_maxheap $fb_jvmargs $fb_mainclass ${@:+"$@"} $fb_appargs # vim:ts=3 --- NEW FILE: bugHistory --- #! /bin/sh program="$0" # Follow symlinks until we get to the actual file. while [ -h "$program" ]; do link=`ls -ld "$program"` link=`expr "$link" : '.*-> \(.*\)'` if [ "`expr "$link" : '/.*'`" = 0 ]; then # Relative dir=`dirname "$program"` program="$dir/$link" else # Absolute program="$link" fi done # Assume findbugs home directory is the parent # of the directory containing the script (which should # normally be "$findbugs_home/bin"). dir=`dirname $program` findbugs_home="$dir/.." # Handle FHS-compliant installations (e.g., Fink) if [ -d "$findbugs_home/share/findbugs" ]; then findbugs_home="$findbugs_home/share/findbugs" fi # Make absolute findbugs_home=`cd $findbugs_home && /bin/pwd` fb_pathsep=':' # Handle cygwin, courtesy of Peter D. Stout fb_osname=`uname` if [ `expr "$fb_osname" : CYGWIN` -ne 0 ]; then findbugs_home=`cygpath --mixed "$findbugs_home"` fb_pathsep=';' fi if [ ! -d "$findbugs_home" ]; then echo "The path $findbugs_home," echo "which is where I think FindBugs is located," echo "does not seem to be a directory." exit 1 fi # Choose default java binary fb_javacmd=java if [ ! -z "$JAVA_HOME" ] && [ -x "$JAVA_HOME/bin/java" ]; then fb_javacmd=$JAVA_HOME/bin/java fi fb_mainclass=edu.umd.cs.findbugs.workflow.BugHistory fb_javacmd=${fb_javacmd:-"java"} fb_maxheap=${fb_maxheap:-"-Xmx256m"} fb_appjar=${fb_appjar:-"$findbugs_home/lib/findbugs.jar"} set -f #echo command: \ exec $fb_javacmd \ -classpath $fb_appjar$fb_pathsep$CLASSPATH \ -Dfindbugs.home="$findbugs_home"\ $fb_maxheap $fb_jvmargs $fb_mainclass ${@:+"$@"} $fb_appargs # vim:ts=3 --- NEW FILE: unionBugs --- #! /bin/sh # Create the union of two results files, preserving # annotations in both files in the result. program="$0" # Follow symlinks until we get to the actual file. while [ -h "$program" ]; do link=`ls -ld "$program"` link=`expr "$link" : '.*-> \(.*\)'` if [ "`expr "$link" : '/.*'`" = 0 ]; then # Relative dir=`dirname "$program"` program="$dir/$link" else # Absolute program="$link" fi done # Assume findbugs home directory is the parent # of the directory containing the script (which should # normally be "$findbugs_home/bin"). dir=`dirname $program` findbugs_home="$dir/.." # Handle FHS-compliant installations (e.g., Fink) if [ -d "$findbugs_home/share/findbugs" ]; then findbugs_home="$findbugs_home/share/findbugs" fi # Make absolute findbugs_home=`cd $findbugs_home && /bin/pwd` fb_pathsep=':' # Handle cygwin, courtesy of Peter D. Stout fb_osname=`uname` if [ `expr "$fb_osname" : CYGWIN` -ne 0 ]; then findbugs_home=`cygpath --mixed "$findbugs_home"` fb_pathsep=';' fi if [ ! -d "$findbugs_home" ]; then echo "The path $findbugs_home," echo "which is where I think FindBugs is located," echo "does not seem to be a directory." exit 1 fi # Choose default java binary fb_javacmd=java if [ ! -z "$JAVA_HOME" ] && [ -x "$JAVA_HOME/bin/java" ]; then fb_javacmd=$JAVA_HOME/bin/java fi fb_mainclass=edu.umd.cs.findbugs.UnionResults fb_javacmd=${fb_javacmd:-"java"} fb_maxheap=${fb_maxheap:-"-Xmx256m"} fb_appjar=${fb_appjar:-"$findbugs_home/lib/findbugs.jar"} set -f #echo command: \ exec $fb_javacmd \ -classpath $fb_appjar$fb_pathsep$CLASSPATH \ -Dfindbugs.home="$findbugs_home"\ $fb_maxheap $fb_jvmargs $fb_mainclass ${@:+"$@"} $fb_appargs # vim:ts=3 |
Update of /cvsroot/mocklib/mocklib2/tools/findbugs/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31048/tools/findbugs/lib Added Files: bcel.jar dom4j-full.jar annotations.jar buggy.icns findbugs-ant.jar findbugs.jar findbugsGUI.jar Log Message: add findbugs, checkstyle to mocklib. --- NEW FILE: findbugs.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: findbugs-ant.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: buggy.icns --- (This appears to be a binary file; contents omitted.) --- NEW FILE: bcel.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: findbugsGUI.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: dom4j-full.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: annotations.jar --- (This appears to be a binary file; contents omitted.) |
From: Nobody <fas...@us...> - 2006-02-19 19:21:07
|
Update of /cvsroot/mocklib/mocklib2/tools/findbugs/plugin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31048/tools/findbugs/plugin Added Files: coreplugin.jar Log Message: add findbugs, checkstyle to mocklib. --- NEW FILE: coreplugin.jar --- (This appears to be a binary file; contents omitted.) |
From: Nobody <fas...@us...> - 2006-02-19 19:21:07
|
Update of /cvsroot/mocklib/mocklib2/tools/findbugs/bin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31048/tools/findbugs/bin Added Files: filterBugs xpathFind printAppVersion computeBugHistory findbugs.bat unionBugs setBugDatabaseInfo convertXmlToText fbwrap addMessages mineBugHistory defectDensity listBugDatabaseInfo findbugs Log Message: add findbugs, checkstyle to mocklib. --- NEW FILE: computeBugHistory --- #! /bin/sh # Merge a historical bug collection and a bug collection, producing an updated # historical bug collection program="$0" # Follow symlinks until we get to the actual file. while [ -h "$program" ]; do link=`ls -ld "$program"` link=`expr "$link" : '.*-> \(.*\)'` if [ "`expr "$link" : '/.*'`" = 0 ]; then # Relative dir=`dirname "$program"` program="$dir/$link" else # Absolute program="$link" fi done # Assume findbugs home directory is the parent # of the directory containing the script (which should # normally be "$findbugs_home/bin"). dir=`dirname $program` findbugs_home="$dir/.." # Handle FHS-compliant installations (e.g., Fink) if [ -d "$findbugs_home/share/findbugs" ]; then findbugs_home="$findbugs_home/share/findbugs" fi # Make absolute findbugs_home=`cd $findbugs_home && /bin/pwd` fb_pathsep=':' # Handle cygwin, courtesy of Peter D. Stout fb_osname=`uname` if [ `expr "$fb_osname" : CYGWIN` -ne 0 ]; then findbugs_home=`cygpath --mixed "$findbugs_home"` fb_pathsep=';' fi if [ ! -d "$findbugs_home" ]; then echo "The path $findbugs_home," echo "which is where I think FindBugs is located," echo "does not seem to be a directory." exit 1 fi # Choose default java binary fb_javacmd=java if [ ! -z "$JAVA_HOME" ] && [ -x "$JAVA_HOME/bin/java" ]; then fb_javacmd=$JAVA_HOME/bin/java fi fb_mainclass=edu.umd.cs.findbugs.workflow.Update fb_javacmd=${fb_javacmd:-"java"} fb_maxheap=${fb_maxheap:-"-Xmx256m"} fb_appjar=${fb_appjar:-"$findbugs_home/lib/findbugs.jar"} set -f #echo command: \ exec $fb_javacmd \ -classpath $fb_appjar$fb_pathsep$CLASSPATH \ -Dfindbugs.home="$findbugs_home"\ $fb_maxheap $fb_jvmargs $fb_mainclass ${@:+"$@"} $fb_appargs # vim:ts=3 --- NEW FILE: unionBugs --- #! /bin/sh # Deprecated # Create the union of two results files, preserving # annotations in both files in the result. program="$0" # Follow symlinks until we get to the actual file. while [ -h "$program" ]; do link=`ls -ld "$program"` link=`expr "$link" : '.*-> \(.*\)'` if [ "`expr "$link" : '/.*'`" = 0 ]; then # Relative dir=`dirname "$program"` program="$dir/$link" else # Absolute program="$link" fi done # Assume findbugs home directory is the parent # of the directory containing the script (which should # normally be "$findbugs_home/bin"). dir=`dirname $program` findbugs_home="$dir/.." # Handle FHS-compliant installations (e.g., Fink) if [ -d "$findbugs_home/share/findbugs" ]; then findbugs_home="$findbugs_home/share/findbugs" fi # Make absolute findbugs_home=`cd $findbugs_home && /bin/pwd` fb_pathsep=':' # Handle cygwin, courtesy of Peter D. Stout fb_osname=`uname` if [ `expr "$fb_osname" : CYGWIN` -ne 0 ]; then findbugs_home=`cygpath --mixed "$findbugs_home"` fb_pathsep=';' fi if [ ! -d "$findbugs_home" ]; then echo "The path $findbugs_home," echo "which is where I think FindBugs is located," echo "does not seem to be a directory." exit 1 fi # Choose default java binary fb_javacmd=java if [ ! -z "$JAVA_HOME" ] && [ -x "$JAVA_HOME/bin/java" ]; then fb_javacmd=$JAVA_HOME/bin/java fi fb_mainclass=edu.umd.cs.findbugs.workflow.UnionResults fb_javacmd=${fb_javacmd:-"java"} fb_maxheap=${fb_maxheap:-"-Xmx256m"} fb_appjar=${fb_appjar:-"$findbugs_home/lib/findbugs.jar"} set -f #echo command: \ exec $fb_javacmd \ -classpath $fb_appjar$fb_pathsep$CLASSPATH \ -Dfindbugs.home="$findbugs_home"\ $fb_maxheap $fb_jvmargs $fb_mainclass ${@:+"$@"} $fb_appargs # vim:ts=3 --- NEW FILE: setBugDatabaseInfo --- #! /bin/sh program="$0" # Follow symlinks until we get to the actual file. while [ -h "$program" ]; do link=`ls -ld "$program"` link=`expr "$link" : '.*-> \(.*\)'` if [ "`expr "$link" : '/.*'`" = 0 ]; then # Relative dir=`dirname "$program"` program="$dir/$link" else # Absolute program="$link" fi done # Assume findbugs home directory is the parent # of the directory containing the script (which should # normally be "$findbugs_home/bin"). dir=`dirname $program` findbugs_home="$dir/.." # Handle FHS-compliant installations (e.g., Fink) if [ -d "$findbugs_home/share/findbugs" ]; then findbugs_home="$findbugs_home/share/findbugs" fi # Make absolute findbugs_home=`cd $findbugs_home && /bin/pwd` fb_pathsep=':' # Handle cygwin, courtesy of Peter D. Stout fb_osname=`uname` if [ `expr "$fb_osname" : CYGWIN` -ne 0 ]; then findbugs_home=`cygpath --mixed "$findbugs_home"` fb_pathsep=';' fi if [ ! -d "$findbugs_home" ]; then echo "The path $findbugs_home," echo "which is where I think FindBugs is located," echo "does not seem to be a directory." exit 1 fi # Choose default java binary fb_javacmd=java if [ ! -z "$JAVA_HOME" ] && [ -x "$JAVA_HOME/bin/java" ]; then fb_javacmd=$JAVA_HOME/bin/java fi fb_mainclass=edu.umd.cs.findbugs.workflow.SetBugDatabaseInfo fb_javacmd=${fb_javacmd:-"java"} fb_maxheap=${fb_maxheap:-"-Xmx256m"} fb_appjar=${fb_appjar:-"$findbugs_home/lib/findbugs.jar"} set -f #echo command: \ exec $fb_javacmd \ -classpath $fb_appjar$fb_pathsep$CLASSPATH \ -Dfindbugs.home="$findbugs_home"\ $fb_maxheap $fb_jvmargs $fb_mainclass ${@:+"$@"} $fb_appargs # vim:ts=3 --- NEW FILE: xpathFind --- #! /bin/sh program="$0" # Follow symlinks until we get to the actual file. while [ -h "$program" ]; do link=`ls -ld "$program"` link=`expr "$link" : '.*-> \(.*\)'` if [ "`expr "$link" : '/.*'`" = 0 ]; then # Relative dir=`dirname "$program"` program="$dir/$link" else # Absolute program="$link" fi done # Assume findbugs home directory is the parent # of the directory containing the script (which should # normally be "$findbugs_home/bin"). dir=`dirname $program` findbugs_home="$dir/.." # Handle FHS-compliant installations (e.g., Fink) if [ -d "$findbugs_home/share/findbugs" ]; then findbugs_home="$findbugs_home/share/findbugs" fi # Make absolute findbugs_home=`cd $findbugs_home && /bin/pwd` fb_pathsep=':' # Handle cygwin, courtesy of Peter D. Stout fb_osname=`uname` if [ `expr "$fb_osname" : CYGWIN` -ne 0 ]; then findbugs_home=`cygpath --mixed "$findbugs_home"` fb_pathsep=';' fi if [ ! -d "$findbugs_home" ]; then echo "The path $findbugs_home," echo "which is where I think FindBugs is located," echo "does not seem to be a directory." exit 1 fi # Choose default java binary fb_javacmd=java if [ ! -z "$JAVA_HOME" ] && [ -x "$JAVA_HOME/bin/java" ]; then fb_javacmd=$JAVA_HOME/bin/java fi fb_mainclass=edu.umd.cs.findbugs.xml.XPathFind fb_javacmd=${fb_javacmd:-"java"} fb_maxheap=${fb_maxheap:-"-Xmx256m"} fb_appjar=${fb_appjar:-"$findbugs_home/lib/findbugs.jar"} set -f #echo command: \ exec $fb_javacmd \ -classpath $fb_appjar$fb_pathsep$CLASSPATH \ -Dfindbugs.home="$findbugs_home"\ $fb_maxheap $fb_jvmargs $fb_mainclass ${@:+"$@"} $fb_appargs # vim:ts=3 --- NEW FILE: defectDensity --- #! /bin/sh # Generate a defect density table from a bug collection program="$0" # Follow symlinks until we get to the actual file. while [ -h "$program" ]; do link=`ls -ld "$program"` link=`expr "$link" : '.*-> \(.*\)'` if [ "`expr "$link" : '/.*'`" = 0 ]; then # Relative dir=`dirname "$program"` program="$dir/$link" else # Absolute program="$link" fi done # Assume findbugs home directory is the parent # of the directory containing the script (which should # normally be "$findbugs_home/bin"). dir=`dirname $program` findbugs_home="$dir/.." # Handle FHS-compliant installations (e.g., Fink) if [ -d "$findbugs_home/share/findbugs" ]; then findbugs_home="$findbugs_home/share/findbugs" fi # Make absolute findbugs_home=`cd $findbugs_home && /bin/pwd` fb_pathsep=':' # Handle cygwin, courtesy of Peter D. Stout fb_osname=`uname` if [ `expr "$fb_osname" : CYGWIN` -ne 0 ]; then findbugs_home=`cygpath --mixed "$findbugs_home"` fb_pathsep=';' fi if [ ! -d "$findbugs_home" ]; then echo "The path $findbugs_home," echo "which is where I think FindBugs is located," echo "does not seem to be a directory." exit 1 fi # Choose default java binary fb_javacmd=java if [ ! -z "$JAVA_HOME" ] && [ -x "$JAVA_HOME/bin/java" ]; then fb_javacmd=$JAVA_HOME/bin/java fi fb_mainclass=edu.umd.cs.findbugs.workflow.DefectDensity fb_javacmd=${fb_javacmd:-"java"} fb_maxheap=${fb_maxheap:-"-Xmx256m"} fb_appjar=${fb_appjar:-"$findbugs_home/lib/findbugs.jar"} set -f #echo command: \ exec $fb_javacmd \ -classpath $fb_appjar$fb_pathsep$CLASSPATH \ -Dfindbugs.home="$findbugs_home"\ $fb_maxheap $fb_jvmargs $fb_mainclass ${@:+"$@"} $fb_appargs # vim:ts=3 --- NEW FILE: listBugDatabaseInfo --- #! /bin/sh program="$0" # Follow symlinks until we get to the actual file. while [ -h "$program" ]; do link=`ls -ld "$program"` link=`expr "$link" : '.*-> \(.*\)'` if [ "`expr "$link" : '/.*'`" = 0 ]; then # Relative dir=`dirname "$program"` program="$dir/$link" else # Absolute program="$link" fi done # Assume findbugs home directory is the parent # of the directory containing the script (which should # normally be "$findbugs_home/bin"). dir=`dirname $program` findbugs_home="$dir/.." # Handle FHS-compliant installations (e.g., Fink) if [ -d "$findbugs_home/share/findbugs" ]; then findbugs_home="$findbugs_home/share/findbugs" fi # Make absolute findbugs_home=`cd $findbugs_home && /bin/pwd` fb_pathsep=':' # Handle cygwin, courtesy of Peter D. Stout fb_osname=`uname` if [ `expr "$fb_osname" : CYGWIN` -ne 0 ]; then findbugs_home=`cygpath --mixed "$findbugs_home"` fb_pathsep=';' fi if [ ! -d "$findbugs_home" ]; then echo "The path $findbugs_home," echo "which is where I think FindBugs is located," echo "does not seem to be a directory." exit 1 fi # Choose default java binary fb_javacmd=java if [ ! -z "$JAVA_HOME" ] && [ -x "$JAVA_HOME/bin/java" ]; then fb_javacmd=$JAVA_HOME/bin/java fi fb_mainclass=edu.umd.cs.findbugs.workflow.ListBugDatabaseInfo fb_javacmd=${fb_javacmd:-"java"} fb_maxheap=${fb_maxheap:-"-Xmx256m"} fb_appjar=${fb_appjar:-"$findbugs_home/lib/findbugs.jar"} set -f #echo command: \ exec $fb_javacmd \ -classpath $fb_appjar$fb_pathsep$CLASSPATH \ -Dfindbugs.home="$findbugs_home"\ $fb_maxheap $fb_jvmargs $fb_mainclass ${@:+"$@"} $fb_appargs # vim:ts=3 --- NEW FILE: mineBugHistory --- #! /bin/sh program="$0" # Follow symlinks until we get to the actual file. while [ -h "$program" ]; do link=`ls -ld "$program"` link=`expr "$link" : '.*-> \(.*\)'` if [ "`expr "$link" : '/.*'`" = 0 ]; then # Relative dir=`dirname "$program"` program="$dir/$link" else # Absolute program="$link" fi done # Assume findbugs home directory is the parent # of the directory containing the script (which should # normally be "$findbugs_home/bin"). dir=`dirname $program` findbugs_home="$dir/.." # Handle FHS-compliant installations (e.g., Fink) if [ -d "$findbugs_home/share/findbugs" ]; then findbugs_home="$findbugs_home/share/findbugs" fi # Make absolute findbugs_home=`cd $findbugs_home && /bin/pwd` fb_pathsep=':' # Handle cygwin, courtesy of Peter D. Stout fb_osname=`uname` if [ `expr "$fb_osname" : CYGWIN` -ne 0 ]; then findbugs_home=`cygpath --mixed "$findbugs_home"` fb_pathsep=';' fi if [ ! -d "$findbugs_home" ]; then echo "The path $findbugs_home," echo "which is where I think FindBugs is located," echo "does not seem to be a directory." exit 1 fi # Choose default java binary fb_javacmd=java if [ ! -z "$JAVA_HOME" ] && [ -x "$JAVA_HOME/bin/java" ]; then fb_javacmd=$JAVA_HOME/bin/java fi fb_mainclass=edu.umd.cs.findbugs.workflow.MineBugHistory fb_javacmd=${fb_javacmd:-"java"} fb_maxheap=${fb_maxheap:-"-Xmx256m"} fb_appjar=${fb_appjar:-"$findbugs_home/lib/findbugs.jar"} set -f #echo command: \ exec $fb_javacmd \ -classpath $fb_appjar$fb_pathsep$CLASSPATH \ -Dfindbugs.home="$findbugs_home"\ $fb_maxheap $fb_jvmargs $fb_mainclass ${@:+"$@"} $fb_appargs --- NEW FILE: findbugs.bat --- @echo off :: Launch FindBugs on a Windows system. :: Adapted from scripts found at http://www.ericphelps.com/batch/ :: This will only work on Windows NT or later! :: Don't affect environment outside of this invocation setlocal :: ---------------------------------------------------------------------- :: Set up default values :: ---------------------------------------------------------------------- set appjar=findbugsGUI.jar set javahome= set launcher=javaw.exe set start=start "FindBugs" set jvmargs= set debugArg= set conserveSpaceArg= set workHardArg= set args= set javaProps= set maxheap=256 :: Try finding the default FINDBUGS_HOME directory :: from the directory path of this script set default_findbugs_home=%~dp0.. :: Honor JAVA_HOME environment variable if it is set if "%JAVA_HOME%"=="" goto nojavahome if not exist "%JAVA_HOME%\bin\javaw.exe" goto nojavahome set javahome=%JAVA_HOME%\bin\ :nojavahome goto loop :: ---------------------------------------------------------------------- :: Process command-line arguments :: ---------------------------------------------------------------------- :shift2 shift :shift1 shift :loop :: Remove surrounding quotes from %1 and %2 set firstArg=%~1 set secondArg=%~2 if not "%firstArg%"=="-gui" goto notGui set appjar=findbugsGUI.jar set launcher=javaw.exe goto shift1 :notGui if not "%firstArg%"=="-textui" goto notTextui set appjar=findbugs.jar set launcher=java.exe set start= goto shift1 :notTextui if not "%firstArg%"=="-debug" goto notDebug set launcher=java.exe set start= set debugArg=-Dfindbugs.debug=true goto shift1 :notDebug if "%firstArg%"=="-home" set FINDBUGS_HOME=%secondArg% if "%firstArg%"=="-home" goto shift2 if "%firstArg%"=="-jvmArgs" set jvmargs=%secondArg% if "%firstArg%"=="-jvmArgs" goto shift2 if "%firstArg%"=="-maxHeap" set maxheap=%secondArg% if "%firstArg%"=="-maxHeap" goto shift2 if "%firstArg%"=="-conserveSpace" set conserveSpaceArg=-Dfindbugs.conserveSpace=true if "%firstArg%"=="-conserveSpace" goto shift1 if "%firstArg%"=="-workHard" set workHardArg=-Dfindbugs.workHard=true if "%firstArg%"=="-workHard" goto shift1 if "%firstArg%"=="-javahome" set javahome=%secondArg%\bin\ if "%firstArg%"=="-javahome" goto shift2 if "%firstArg%"=="-property" set javaProps=-D%secondArg% %javaProps% if "%firstArg%"=="-property" goto shift2 if "%firstArg%"=="-help" goto help if "%firstArg%"=="" goto launch set args=%args% "%firstArg%" goto shift1 :: ---------------------------------------------------------------------- :: Launch FindBugs :: ---------------------------------------------------------------------- :launch :: Make sure FINDBUGS_HOME is set. :: If it isn't, try using the default value based on the :: directory path of the invoked script. :: Note that this will fail miserably if the value of FINDBUGS_HOME :: has quote characters in it. if not "%FINDBUGS_HOME%"=="" goto checkHomeValid set FINDBUGS_HOME=%default_findbugs_home% :checkHomeValid if not exist "%FINDBUGS_HOME%\lib\%appjar%" goto homeNotSet :found_home :: Launch FindBugs! %start% "%javahome%%launcher%" %debugArg% %conserveSpaceArg% %workHardArg% %javaProps% "-Dfindbugs.home=%FINDBUGS_HOME%" -Xmx%maxheap%m %jvmargs% -jar "%FINDBUGS_HOME%\lib\%appjar%" %args% goto end :: ---------------------------------------------------------------------- :: Display usage information :: ---------------------------------------------------------------------- :help echo Usage: findbugs [options] echo -home dir Use dir as FINDBUGS_HOME echo -gui Use the Graphical UI (default behavior) echo -textui Use the Text UI echo -jvmArgs args Pass args to JVM echo -maxHeap size Set maximum Java heap size in megabytes (default %maxheap%) echo -javahome dir Specify location of JRE echo -help Display this message echo -debug Enable debug tracing in FindBugs echo -conserveSpace Conserve memory at the expense of precision echo All other options are passed to the FindBugs application goto end :: ---------------------------------------------------------------------- :: Report that FINDBUGS_HOME is not set (and was not specified) :: ---------------------------------------------------------------------- :homeNotSet echo Could not find FindBugs home directory. There may be a problem echo with the FindBugs installation. Try setting FINDBUGS_HOME, or echo re-installing. goto end :end --- NEW FILE: filterBugs --- #! /bin/sh # General purpose utility for filtering/transforming # bug collection and/or historical bug collections program="$0" # Follow symlinks until we get to the actual file. while [ -h "$program" ]; do link=`ls -ld "$program"` link=`expr "$link" : '.*-> \(.*\)'` if [ "`expr "$link" : '/.*'`" = 0 ]; then # Relative dir=`dirname "$program"` program="$dir/$link" else # Absolute program="$link" fi done # Assume findbugs home directory is the parent # of the directory containing the script (which should # normally be "$findbugs_home/bin"). dir=`dirname $program` findbugs_home="$dir/.." # Handle FHS-compliant installations (e.g., Fink) if [ -d "$findbugs_home/share/findbugs" ]; then findbugs_home="$findbugs_home/share/findbugs" fi # Make absolute findbugs_home=`cd $findbugs_home && /bin/pwd` fb_pathsep=':' # Handle cygwin, courtesy of Peter D. Stout fb_osname=`uname` if [ `expr "$fb_osname" : CYGWIN` -ne 0 ]; then findbugs_home=`cygpath --mixed "$findbugs_home"` fb_pathsep=';' fi if [ ! -d "$findbugs_home" ]; then echo "The path $findbugs_home," echo "which is where I think FindBugs is located," echo "does not seem to be a directory." exit 1 fi # Choose default java binary fb_javacmd=java if [ ! -z "$JAVA_HOME" ] && [ -x "$JAVA_HOME/bin/java" ]; then fb_javacmd=$JAVA_HOME/bin/java fi fb_mainclass=edu.umd.cs.findbugs.workflow.Filter fb_javacmd=${fb_javacmd:-"java"} fb_maxheap=${fb_maxheap:-"-Xmx256m"} fb_appjar=${fb_appjar:-"$findbugs_home/lib/findbugs.jar"} set -f #echo command: \ exec $fb_javacmd \ -classpath $fb_appjar$fb_pathsep$CLASSPATH \ -Dfindbugs.home="$findbugs_home"\ $fb_maxheap $fb_jvmargs $fb_mainclass ${@:+"$@"} $fb_appargs # vim:ts=3 --- NEW FILE: addMessages --- #! /bin/sh program="$0" # Follow symlinks until we get to the actual file. while [ -h "$program" ]; do link=`ls -ld "$program"` link=`expr "$link" : '.*-> \(.*\)'` if [ "`expr "$link" : '/.*'`" = 0 ]; then # Relative dir=`dirname "$program"` program="$dir/$link" else # Absolute program="$link" fi done # Assume findbugs home directory is the parent # of the directory containing the script (which should # normally be "$findbugs_home/bin"). dir=`dirname $program` findbugs_home="$dir/.." # Handle FHS-compliant installations (e.g., Fink) if [ -d "$findbugs_home/share/findbugs" ]; then findbugs_home="$findbugs_home/share/findbugs" fi # Make absolute findbugs_home=`cd $findbugs_home && /bin/pwd` fb_pathsep=':' # Handle cygwin, courtesy of Peter D. Stout fb_osname=`uname` if [ `expr "$fb_osname" : CYGWIN` -ne 0 ]; then findbugs_home=`cygpath --mixed "$findbugs_home"` fb_pathsep=';' fi if [ ! -d "$findbugs_home" ]; then echo "The path $findbugs_home," echo "which is where I think FindBugs is located," echo "does not seem to be a directory." exit 1 fi # Choose default java binary fb_javacmd=java if [ ! -z "$JAVA_HOME" ] && [ -x "$JAVA_HOME/bin/java" ]; then fb_javacmd=$JAVA_HOME/bin/java fi fb_mainclass=edu.umd.cs.findbugs.AddMessages fb_javacmd=${fb_javacmd:-"java"} fb_maxheap=${fb_maxheap:-"-Xmx256m"} fb_appjar=${fb_appjar:-"$findbugs_home/lib/findbugs.jar"} set -f #echo command: \ exec $fb_javacmd \ -classpath $fb_appjar$fb_pathsep$CLASSPATH \ -Dfindbugs.home="$findbugs_home"\ $fb_maxheap $fb_jvmargs $fb_mainclass ${@:+"$@"} $fb_appargs --- NEW FILE: convertXmlToText --- #! /bin/sh program="$0" # Follow symlinks until we get to the actual file. while [ -h "$program" ]; do link=`ls -ld "$program"` link=`expr "$link" : '.*-> \(.*\)'` if [ "`expr "$link" : '/.*'`" = 0 ]; then # Relative dir=`dirname "$program"` program="$dir/$link" else # Absolute program="$link" fi done # Assume findbugs home directory is the parent # of the directory containing the script (which should # normally be "$findbugs_home/bin"). dir=`dirname $program` findbugs_home="$dir/.." # Handle FHS-compliant installations (e.g., Fink) if [ -d "$findbugs_home/share/findbugs" ]; then findbugs_home="$findbugs_home/share/findbugs" fi # Make absolute findbugs_home=`cd $findbugs_home && /bin/pwd` fb_pathsep=':' # Handle cygwin, courtesy of Peter D. Stout fb_osname=`uname` if [ `expr "$fb_osname" : CYGWIN` -ne 0 ]; then findbugs_home=`cygpath --mixed "$findbugs_home"` fb_pathsep=';' fi if [ ! -d "$findbugs_home" ]; then echo "The path $findbugs_home," echo "which is where I think FindBugs is located," echo "does not seem to be a directory." exit 1 fi # Choose default java binary fb_javacmd=java if [ ! -z "$JAVA_HOME" ] && [ -x "$JAVA_HOME/bin/java" ]; then fb_javacmd=$JAVA_HOME/bin/java fi fb_mainclass=edu.umd.cs.findbugs.PrintingBugReporter fb_javacmd=${fb_javacmd:-"java"} fb_maxheap=${fb_maxheap:-"-Xmx256m"} fb_appjar=${fb_appjar:-"$findbugs_home/lib/findbugs.jar"} set -f #echo command: \ exec $fb_javacmd \ -classpath $fb_appjar$fb_pathsep$CLASSPATH \ -Dfindbugs.home="$findbugs_home"\ $fb_maxheap $fb_jvmargs $fb_mainclass ${@:+"$@"} $fb_appargs --- NEW FILE: printAppVersion --- #! /bin/sh program="$0" # Follow symlinks until we get to the actual file. while [ -h "$program" ]; do link=`ls -ld "$program"` link=`expr "$link" : '.*-> \(.*\)'` if [ "`expr "$link" : '/.*'`" = 0 ]; then # Relative dir=`dirname "$program"` program="$dir/$link" else # Absolute program="$link" fi done # Assume findbugs home directory is the parent # of the directory containing the script (which should # normally be "$findbugs_home/bin"). dir=`dirname $program` findbugs_home="$dir/.." # Handle FHS-compliant installations (e.g., Fink) if [ -d "$findbugs_home/share/findbugs" ]; then findbugs_home="$findbugs_home/share/findbugs" fi # Make absolute findbugs_home=`cd $findbugs_home && /bin/pwd` fb_pathsep=':' # Handle cygwin, courtesy of Peter D. Stout fb_osname=`uname` if [ `expr "$fb_osname" : CYGWIN` -ne 0 ]; then findbugs_home=`cygpath --mixed "$findbugs_home"` fb_pathsep=';' fi if [ ! -d "$findbugs_home" ]; then echo "The path $findbugs_home," echo "which is where I think FindBugs is located," echo "does not seem to be a directory." exit 1 fi # Choose default java binary fb_javacmd=java if [ ! -z "$JAVA_HOME" ] && [ -x "$JAVA_HOME/bin/java" ]; then fb_javacmd=$JAVA_HOME/bin/java fi fb_mainclass=edu.umd.cs.findbugs.workflow.PrintAppVersion fb_javacmd=${fb_javacmd:-"java"} fb_maxheap=${fb_maxheap:-"-Xmx256m"} fb_appjar=${fb_appjar:-"$findbugs_home/lib/findbugs.jar"} set -f #echo command: \ exec $fb_javacmd \ -classpath $fb_appjar$fb_pathsep$CLASSPATH \ -Dfindbugs.home="$findbugs_home"\ $fb_maxheap $fb_jvmargs $fb_mainclass ${@:+"$@"} $fb_appargs # vim:ts=3 --- NEW FILE: findbugs --- #! /bin/sh # Launch FindBugs from the command line. escape_arg() { echo "$1" | sed -e "s,\\([\\\"' ]\\),\\\\\\1,g" } program="$0" # Follow symlinks until we get to the actual file. while [ -h "$program" ]; do link=`ls -ld "$program"` link=`expr "$link" : '.*-> \(.*\)'` if [ "`expr "$link" : '/.*'`" = 0 ]; then # Relative dir=`dirname "$program"` program="$dir/$link" else # Absolute program="$link" fi done # Assume findbugs home directory is the parent # of the directory containing the script (which should # normally be "$findbugs_home/bin"). dir=`dirname $program` findbugs_home="$dir/.." # Handle FHS-compliant installations (e.g., Fink) if [ -d "$findbugs_home/share/findbugs" ]; then findbugs_home="$findbugs_home/share/findbugs" fi # Make absolute findbugs_home=`cd $findbugs_home && /bin/pwd` fb_pathsep=':' # Handle cygwin, courtesy of Peter D. Stout fb_osname=`uname` if [ `expr "$fb_osname" : CYGWIN` -ne 0 ]; then findbugs_home=`cygpath --mixed "$findbugs_home"` fb_pathsep=';' fi if [ ! -d "$findbugs_home" ]; then echo "The path $findbugs_home," echo "which is where I think FindBugs is located," echo "does not seem to be a directory." exit 1 fi # Choose default java binary fb_javacmd=java if [ ! -z "$JAVA_HOME" ] && [ -x "$JAVA_HOME/bin/java" ]; then fb_javacmd=$JAVA_HOME/bin/java fi maxheap=768 ShowHelpAndExit() { fb_appjar="$findbugs_home/lib/findbugsGUI.jar" fb_mainclass="edu.umd.cs.findbugs.ShowHelp" fb_javacmd=${fb_javacmd:-"java"} fb_maxheap=${fb_maxheap:-"-Xmx256m"} fb_appjar=${fb_appjar:-"$findbugs_home/lib/findbugs.jar"} set -f #echo command: \ exec $fb_javacmd \ -classpath $fb_appjar$fb_pathsep$CLASSPATH \ -Dfindbugs.home="$findbugs_home"\ $fb_maxheap $fb_jvmargs $fb_mainclass ${@:+"$@"} $fb_appargs exit 0 } # Set defaults fb_appjar="$findbugs_home/lib/findbugsGUI.jar" fb_mainclass="edu.umd.cs.findbugs.gui.FindBugsFrame" user_jvmargs='' debug_arg='' conservespace_arg='' workhard_arg='' user_props='' # Handle command line arguments. while [ $# -gt 0 ]; do case $1 in -gui) fb_appjar="$findbugs_home/lib/findbugsGUI.jar" fb_mainclass="edu.umd.cs.findbugs.gui.FindBugsFrame" ;; -textui) fb_appjar="$findbugs_home/lib/findbugs.jar" fb_mainclass="edu.umd.cs.findbugs.FindBugs" ;; -jvmArgs) shift user_jvmargs="$1" ;; -maxHeap) shift maxheap="$1" ;; -javahome) shift fb_javacmd="$1/bin/java" ;; -debug) debug_arg="-Dfindbugs.debug=true" ;; -conserveSpace) conservespace_arg="-Dfindbugs.conserveSpace=true" ;; -property) shift user_props="-D$1 $user_props" ;; -D*=*) user_props="$1 $user_props" ;; -version) fb_mainclass=edu.umd.cs.findbugs.Version fb_appargs="-release" while [ $# -gt 0 ]; do shift done fb_javacmd=${fb_javacmd:-"java"} fb_maxheap=${fb_maxheap:-"-Xmx256m"} fb_appjar=${fb_appjar:-"$findbugs_home/lib/findbugs.jar"} set -f #echo command: \ exec $fb_javacmd \ -classpath $fb_appjar$fb_pathsep$CLASSPATH \ -Dfindbugs.home="$findbugs_home"\ $fb_maxheap $fb_jvmargs $fb_mainclass ${@:+"$@"} $fb_appargs exit 0 ;; -help) ShowHelpAndExit ;; # All unrecognized arguments will be accumulated and # passed to the application. *) fb_appargs="$fb_appargs `escape_arg "$1"`" ;; esac shift done fb_jvmargs="$user_jvmargs $debug_arg $conservespace_arg $workhard_arg $user_props" fb_maxheap="-Xmx${maxheap}m" # Extra JVM args for MacOSX. if [ $fb_osname = "Darwin" ]; then fb_jvmargs="$fb_jvmargs \ -Xdock:name=FindBugs -Xdock:icon=${findbugs_home}/lib/buggy.icns \ -Dapple.laf.useScreenMenuBar=true" fi fb_javacmd=${fb_javacmd:-"java"} fb_maxheap=${fb_maxheap:-"-Xmx256m"} fb_appjar=${fb_appjar:-"$findbugs_home/lib/findbugs.jar"} set -f #echo command: \ exec $fb_javacmd \ -classpath $fb_appjar$fb_pathsep$CLASSPATH \ -Dfindbugs.home="$findbugs_home"\ $fb_maxheap $fb_jvmargs $fb_mainclass ${@:+"$@"} $fb_appargs # vim:ts=3 --- NEW FILE: fbwrap --- #! /bin/sh # A convenient way to call the main() method of a class # in findbugs.jar. program="$0" # Follow symlinks until we get to the actual file. while [ -h "$program" ]; do link=`ls -ld "$program"` link=`expr "$link" : '.*-> \(.*\)'` if [ "`expr "$link" : '/.*'`" = 0 ]; then # Relative dir=`dirname "$program"` program="$dir/$link" else # Absolute program="$link" fi done # Assume findbugs home directory is the parent # of the directory containing the script (which should # normally be "$findbugs_home/bin"). dir=`dirname $program` findbugs_home="$dir/.." # Handle FHS-compliant installations (e.g., Fink) if [ -d "$findbugs_home/share/findbugs" ]; then findbugs_home="$findbugs_home/share/findbugs" fi # Make absolute findbugs_home=`cd $findbugs_home && /bin/pwd` fb_pathsep=':' # Handle cygwin, courtesy of Peter D. Stout fb_osname=`uname` if [ `expr "$fb_osname" : CYGWIN` -ne 0 ]; then findbugs_home=`cygpath --mixed "$findbugs_home"` fb_pathsep=';' fi if [ ! -d "$findbugs_home" ]; then echo "The path $findbugs_home," echo "which is where I think FindBugs is located," echo "does not seem to be a directory." exit 1 fi # Choose default java binary fb_javacmd=java if [ ! -z "$JAVA_HOME" ] && [ -x "$JAVA_HOME/bin/java" ]; then fb_javacmd=$JAVA_HOME/bin/java fi if [ $# -eq 0 ]; then echo "Usage: fbwrap <main class name> <args...>" exit 1 fi fb_mainclass="$1" shift fb_javacmd=${fb_javacmd:-"java"} fb_maxheap=${fb_maxheap:-"-Xmx256m"} fb_appjar=${fb_appjar:-"$findbugs_home/lib/findbugs.jar"} set -f #echo command: \ exec $fb_javacmd \ -classpath $fb_appjar$fb_pathsep$CLASSPATH \ -Dfindbugs.home="$findbugs_home"\ $fb_maxheap $fb_jvmargs $fb_mainclass ${@:+"$@"} $fb_appargs # vim:ts=3 |
From: Nobody <fas...@us...> - 2006-02-19 19:21:07
|
Update of /cvsroot/mocklib/mocklib2/tools/checkstyle In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31048/tools/checkstyle Added Files: config.xml checkstyle-all-4.1.jar Log Message: add findbugs, checkstyle to mocklib. --- NEW FILE: config.xml --- <?xml version="1.0"?> <!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.2//EN" "http://www.puppycrawl.com/dtds/configuration_1_2.dtd"> <!-- Checkstyle configuration that checks the sun coding conventions from: - the Java Language Specification at http://java.sun.com/docs/books/jls/second_edition/html/index.html - the Sun Code Conventions at http://java.sun.com/docs/codeconv/ - the Javadoc guidelines at http://java.sun.com/j2se/javadoc/writingdoccomments/index.html - the JDK Api documentation http://java.sun.com/j2se/docs/api/index.html - some best practices Checkstyle is very configurable. Be sure to read the documentation at http://checkstyle.sf.net (or in your downloaded distribution). Most Checks are configurable, be sure to consult the documentation. To completely disable a check, just comment it out or delete it from the file. Finally, it is worth reading the documentation. --> <module name="Checker"> <!-- Checks that a package.html file exists for each package. --> <!-- See http://checkstyle.sf.net/config_javadoc.html#PackageHtml --> <!--module name="PackageHtml"/--> <!-- Checks whether files end with a new line. --> <!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile --> <!--module name="NewlineAtEndOfFile"/--> <!-- Checks that property files contain the same keys. --> <!-- See http://checkstyle.sf.net/config_misc.html#Translation --> <module name="Translation"/> <module name="TreeWalker"> <!-- Checks for Javadoc comments. --> <!-- See http://checkstyle.sf.net/config_javadoc.html --> <!--module name="JavadocMethod"/> <module name="JavadocType"/> <module name="JavadocVariable"/> <module name="JavadocStyle"/--> <!-- Checks for Naming Conventions. --> <!-- See http://checkstyle.sf.net/config_naming.html --> <module name="ConstantName"> <property name="format" value="^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$|^log$|^apiLog$"/> </module> <module name="LocalFinalVariableName"/> <module name="LocalVariableName"/> <module name="MemberName"/> <module name="MethodName"/> <module name="PackageName"/> <module name="ParameterName"/> <module name="StaticVariableName"/> <module name="TypeName"/> <!-- Checks for Headers --> <!-- See http://checkstyle.sf.net/config_header.html --> <!-- <module name="Header"> --> <!-- The follow property value demonstrates the ability --> <!-- to have access to ANT properties. In this case it uses --> <!-- the ${basedir} property to allow Checkstyle to be run --> <!-- from any directory within a project. See property --> <!-- expansion, --> <!-- http://checkstyle.sf.net/config.html#properties --> <!-- <property --> <!-- name="headerFile" --> <!-- value="${basedir}/java.header"/> --> <!-- </module> --> <!-- Following interprets the header file as regular expressions. --> <!-- <module name="RegexpHeader"/> --> <!-- Checks for imports --> <!-- See http://checkstyle.sf.net/config_import.html --> <module name="AvoidStarImport"/> <module name="IllegalImport"/> <!-- defaults to sun.* packages --> <module name="RedundantImport"/> <module name="UnusedImports"/> <!-- Checks for Size Violations. --> <!-- See http://checkstyle.sf.net/config_sizes.html --> <module name="FileLength"> <property name="max" value="700"/> </module> <module name="LineLength"> <property name="max" value="150"/> </module> <module name="MethodLength"> <property name="max" value="75"/> </module> <module name="ParameterNumber"/> <!-- Checks for whitespace --> <!-- See http://checkstyle.sf.net/config_whitespace.html --> <!--module name="EmptyForIteratorPad"/> <module name="MethodParamPad"/> <module name="NoWhitespaceAfter"/> <module name="NoWhitespaceBefore"/> <module name="OperatorWrap"/> <module name="ParenPad"/> <module name="TypecastParenPad"/> <module name="TabCharacter"/> <module name="WhitespaceAfter"/> <module name="WhitespaceAround"/--> <!-- Modifier Checks --> <!-- See http://checkstyle.sf.net/config_modifiers.html --> <module name="ModifierOrder"/> <!--module name="RedundantModifier"/--> <!-- Checks for blocks. You know, those {}'s --> <!-- See http://checkstyle.sf.net/config_blocks.html --> <!--module name="AvoidNestedBlocks"/> <module name="EmptyBlock"/> <module name="LeftCurly"/> <module name="NeedBraces"/> <module name="RightCurly"/--> <!-- Checks for common coding problems --> <!-- See http://checkstyle.sf.net/config_coding.html --> <module name="AvoidInlineConditionals"/> <module name="DoubleCheckedLocking"/> <!-- MY FAVOURITE --> <module name="EmptyStatement"/> <module name="EqualsHashCode"/> <!--module name="HiddenField"/--> <module name="IllegalInstantiation"/> <module name="InnerAssignment"/> <!--module name="MagicNumber"/--> <module name="MissingSwitchDefault"/> <module name="RedundantThrows"/> <module name="SimplifyBooleanExpression"/> <module name="SimplifyBooleanReturn"/> <!-- Checks for class design --> <!-- See http://checkstyle.sf.net/config_design.html --> <!--module name="DesignForExtension"/--> <module name="FinalClass"/> <module name="HideUtilityClassConstructor"/> <module name="InterfaceIsType"/> <module name="VisibilityModifier"/> <!-- Miscellaneous other checks. --> <!-- See http://checkstyle.sf.net/config_misc.html --> <module name="ArrayTypeStyle"/> <!--module name="FinalParameters"/--> <!--module name="GenericIllegalRegexp"> <property name="format" value="System\.out\.println"/> <property name="message" value="User Logger class instead."/> </module--> <!--module name="GenericIllegalRegexp"> <property name="format" value="\s+$"/> <property name="message" value="Line has trailing spaces."/> </module--> <!--module name="TodoComment"/--> <module name="UpperEll"/> </module> </module> --- NEW FILE: checkstyle-all-4.1.jar --- (This appears to be a binary file; contents omitted.) |
From: Nobody <fas...@us...> - 2006-02-19 19:21:07
|
Update of /cvsroot/mocklib/mocklib2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31048 Added Files: .cvsignore Log Message: add findbugs, checkstyle to mocklib. --- NEW FILE: .cvsignore --- output |
From: Nobody <fas...@us...> - 2006-02-19 19:18:50
|
Update of /cvsroot/mocklib/mocklib2/tools/findbugs/plugin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30937/tools/findbugs/plugin Log Message: Directory /cvsroot/mocklib/mocklib2/tools/findbugs/plugin added to the repository |
From: Nobody <fas...@us...> - 2006-02-19 19:18:49
|
Update of /cvsroot/mocklib/mocklib2/tools/findbugs/bin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30937/tools/findbugs/bin Log Message: Directory /cvsroot/mocklib/mocklib2/tools/findbugs/bin added to the repository |
From: Nobody <fas...@us...> - 2006-02-19 19:18:49
|
Update of /cvsroot/mocklib/mocklib2/tools/findbugs/bin/deprecated In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30937/tools/findbugs/bin/deprecated Log Message: Directory /cvsroot/mocklib/mocklib2/tools/findbugs/bin/deprecated added to the repository |
From: Nobody <fas...@us...> - 2006-02-19 19:18:49
|
Update of /cvsroot/mocklib/mocklib2/tools/findbugs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30937/tools/findbugs Log Message: Directory /cvsroot/mocklib/mocklib2/tools/findbugs added to the repository |
From: Nobody <fas...@us...> - 2006-02-19 19:18:49
|
Update of /cvsroot/mocklib/mocklib2/tools/findbugs/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30937/tools/findbugs/lib Log Message: Directory /cvsroot/mocklib/mocklib2/tools/findbugs/lib added to the repository |
From: Nobody <fas...@us...> - 2006-02-19 19:18:48
|
Update of /cvsroot/mocklib/mocklib2/tools/findbugs/src/xsl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30937/tools/findbugs/src/xsl Log Message: Directory /cvsroot/mocklib/mocklib2/tools/findbugs/src/xsl added to the repository |
From: Nobody <fas...@us...> - 2006-02-19 19:18:45
|
Update of /cvsroot/mocklib/mocklib2/tools/ant-osgi In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30937/tools/ant-osgi Log Message: Directory /cvsroot/mocklib/mocklib2/tools/ant-osgi added to the repository |
From: Nobody <fas...@us...> - 2006-02-19 19:18:45
|
Update of /cvsroot/mocklib/mocklib2/tools/findbugs/doc/manual In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30937/tools/findbugs/doc/manual Log Message: Directory /cvsroot/mocklib/mocklib2/tools/findbugs/doc/manual added to the repository |
From: Nobody <fas...@us...> - 2006-02-19 19:18:45
|
Update of /cvsroot/mocklib/mocklib2/tools/findbugs/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30937/tools/findbugs/doc Log Message: Directory /cvsroot/mocklib/mocklib2/tools/findbugs/doc added to the repository |
From: Nobody <fas...@us...> - 2006-02-19 19:18:45
|
Update of /cvsroot/mocklib/mocklib2/tools/checkstyle In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30937/tools/checkstyle Log Message: Directory /cvsroot/mocklib/mocklib2/tools/checkstyle added to the repository |
From: Nobody <fas...@us...> - 2006-02-19 19:18:42
|
Update of /cvsroot/mocklib/mocklib2/tools/findbugs/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30937/tools/findbugs/src Log Message: Directory /cvsroot/mocklib/mocklib2/tools/findbugs/src added to the repository |
From: Jay <ja...@us...> - 2006-02-18 08:09:21
|
Update of /cvsroot/mocklib/mocklib2/input/javasrc/biz/xsoftware/mock2/impl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31136/input/javasrc/biz/xsoftware/mock2/impl Modified Files: Tag: branchForOffice MockObjectSuperImpl.java Log Message: cmmit to merge the change by dean from HEAD Index: MockObjectSuperImpl.java =================================================================== RCS file: /cvsroot/mocklib/mocklib2/input/javasrc/biz/xsoftware/mock2/impl/MockObjectSuperImpl.java,v retrieving revision 1.3.2.7 retrieving revision 1.3.2.8 diff -C2 -d -r1.3.2.7 -r1.3.2.8 *** MockObjectSuperImpl.java 15 Feb 2006 14:44:57 -0000 1.3.2.7 --- MockObjectSuperImpl.java 18 Feb 2006 08:09:16 -0000 1.3.2.8 *************** *** 5,10 **** import java.util.List; import java.util.Map; - import java.util.logging.Level; - import java.util.logging.Logger; import biz.xsoftware.mock2.Behavior; --- 5,8 ---- *************** *** 14,19 **** public abstract class MockObjectSuperImpl implements MockObject { ! private static final Logger logger = Logger ! .getLogger(MockObjectSuperImpl.class.getName()); private static final long DEFAULT_TIME_OUT = 10000; --- 12,17 ---- public abstract class MockObjectSuperImpl implements MockObject { ! // private static final Logger logger = Logger ! // .getLogger(MockObjectSuperImpl.class.getName()); private static final long DEFAULT_TIME_OUT = 10000; *************** *** 38,42 **** * A map of queues, containing objects to return when methods are called */ ! private Map<String, List<Object>> methodToReturnVal = new HashMap<String, List<Object>>(); /** --- 36,40 ---- * A map of queues, containing objects to return when methods are called */ ! // private Map<String, List<Object>> methodToReturnVal = new HashMap<String, List<Object>>(); /** *************** *** 44,48 **** * the method is empty. */ ! private Map<String, Object> methodToDefaultRetVal = new HashMap<String, Object>(); public CalledMethod expect(String methodName, Class... vargs) { --- 42,46 ---- * the method is empty. */ ! // private Map<String, Object> methodToDefaultRetVal = new HashMap<String, Object>(); public CalledMethod expect(String methodName, Class... vargs) { |
From: Jay <ja...@us...> - 2006-02-18 08:09:20
|
Update of /cvsroot/mocklib/mocklib2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31136 Modified Files: Tag: branchForOffice .classpath Log Message: cmmit to merge the change by dean from HEAD Index: .classpath =================================================================== RCS file: /cvsroot/mocklib/mocklib2/.classpath,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** .classpath 18 Sep 2005 17:10:23 -0000 1.3 --- .classpath 18 Feb 2006 08:09:16 -0000 1.3.2.1 *************** *** 2,7 **** <classpath> <classpathentry kind="src" path="input/javasrc"/> ! <classpathentry kind="lib" path="tools/ant-junit/junit.jar"/> ! <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="output" path="output/eclipsegen"/> </classpath> --- 2,7 ---- <classpath> <classpathentry kind="src" path="input/javasrc"/> ! <classpathentry exported="true" sourcepath="E:/Program Files/junit3.8.1/src.jar" kind="lib" path="tools/ant-junit/junit.jar"/> ! <classpathentry exported="true" kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="output" path="output/eclipsegen"/> </classpath> |
From: Jay <ja...@us...> - 2006-02-18 08:09:20
|
Update of /cvsroot/mocklib/mocklib2/input/javasrc/biz/xsoftware/test/mock2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31136/input/javasrc/biz/xsoftware/test/mock2 Modified Files: Tag: branchForOffice ListenerOne.java TestMockCreator.java TestProxyClass.java Log Message: cmmit to merge the change by dean from HEAD Index: TestProxyClass.java =================================================================== RCS file: /cvsroot/mocklib/mocklib2/input/javasrc/biz/xsoftware/test/mock2/TestProxyClass.java,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** TestProxyClass.java 7 Feb 2006 00:59:06 -0000 1.1.2.1 --- TestProxyClass.java 18 Feb 2006 08:09:16 -0000 1.1.2.2 *************** *** 2,6 **** import java.lang.reflect.Proxy; - import java.util.logging.Logger; import junit.framework.TestCase; --- 2,5 ---- *************** *** 8,12 **** public class TestProxyClass extends TestCase { ! private static final Logger log = Logger.getLogger(TestProxyClass.class.getName()); public TestProxyClass(String arg0) { --- 7,11 ---- public class TestProxyClass extends TestCase { ! // private static final Logger log = Logger.getLogger(TestProxyClass.class.getName()); public TestProxyClass(String arg0) { Index: ListenerOne.java =================================================================== RCS file: /cvsroot/mocklib/mocklib2/input/javasrc/biz/xsoftware/test/mock2/ListenerOne.java,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -C2 -d -r1.1.2.2 -r1.1.2.3 *** ListenerOne.java 15 Feb 2006 14:44:10 -0000 1.1.2.2 --- ListenerOne.java 18 Feb 2006 08:09:16 -0000 1.1.2.3 *************** *** 8,12 **** import java.io.IOException; - import java.util.Map; /** --- 8,11 ---- Index: TestMockCreator.java =================================================================== RCS file: /cvsroot/mocklib/mocklib2/input/javasrc/biz/xsoftware/test/mock2/TestMockCreator.java,v retrieving revision 1.1.2.11 retrieving revision 1.1.2.12 diff -C2 -d -r1.1.2.11 -r1.1.2.12 *** TestMockCreator.java 15 Feb 2006 14:44:57 -0000 1.1.2.11 --- TestMockCreator.java 18 Feb 2006 08:09:16 -0000 1.1.2.12 *************** *** 1,7 **** package biz.xsoftware.test.mock2; - import java.io.IOException; - import java.util.HashMap; - import java.util.Map; import java.util.logging.Level; import java.util.logging.Logger; --- 1,4 ---- *************** *** 23,27 **** public void testMockCreator()throws Exception{ MockObject m = MockObjectFactory.createMock(ListenerOne.class); ! ListenerOne l=(ListenerOne)m; --- 20,24 ---- public void testMockCreator()throws Exception{ MockObject m = MockObjectFactory.createMock(ListenerOne.class); ! // ListenerOne l=(ListenerOne)m; *************** *** 46,50 **** public void testNoVerifyCalled() throws Exception { MockObject m = MockObjectFactory.createMock(ListenerOne.class); ! ListenerOne l=(ListenerOne)m; String methodName1 = "callMeFirst"; String methodName2="callMeSecond"; --- 43,47 ---- public void testNoVerifyCalled() throws Exception { MockObject m = MockObjectFactory.createMock(ListenerOne.class); ! // ListenerOne l=(ListenerOne)m; String methodName1 = "callMeFirst"; String methodName2="callMeSecond"; |
From: Nobody <fas...@us...> - 2006-02-17 15:07:47
|
Update of /cvsroot/mocklib/mocklib2/input/javasrc/biz/xsoftware/test/mock2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31643/input/javasrc/biz/xsoftware/test/mock2 Modified Files: ListenerOne.java TestMockCreator.java TestProxyClass.java Log Message: get rid of eclipse warnings. Index: TestProxyClass.java =================================================================== RCS file: /cvsroot/mocklib/mocklib2/input/javasrc/biz/xsoftware/test/mock2/TestProxyClass.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TestProxyClass.java 16 Feb 2006 15:37:35 -0000 1.2 --- TestProxyClass.java 17 Feb 2006 15:07:40 -0000 1.3 *************** *** 2,6 **** import java.lang.reflect.Proxy; - import java.util.logging.Logger; import junit.framework.TestCase; --- 2,5 ---- *************** *** 8,12 **** public class TestProxyClass extends TestCase { ! private static final Logger log = Logger.getLogger(TestProxyClass.class.getName()); public TestProxyClass(String arg0) { --- 7,11 ---- public class TestProxyClass extends TestCase { ! // private static final Logger log = Logger.getLogger(TestProxyClass.class.getName()); public TestProxyClass(String arg0) { Index: ListenerOne.java =================================================================== RCS file: /cvsroot/mocklib/mocklib2/input/javasrc/biz/xsoftware/test/mock2/ListenerOne.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ListenerOne.java 16 Feb 2006 15:37:35 -0000 1.2 --- ListenerOne.java 17 Feb 2006 15:07:40 -0000 1.3 *************** *** 8,12 **** import java.io.IOException; - import java.util.Map; /** --- 8,11 ---- Index: TestMockCreator.java =================================================================== RCS file: /cvsroot/mocklib/mocklib2/input/javasrc/biz/xsoftware/test/mock2/TestMockCreator.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TestMockCreator.java 16 Feb 2006 15:37:35 -0000 1.2 --- TestMockCreator.java 17 Feb 2006 15:07:40 -0000 1.3 *************** *** 1,7 **** package biz.xsoftware.test.mock2; - import java.io.IOException; - import java.util.HashMap; - import java.util.Map; import java.util.logging.Level; import java.util.logging.Logger; --- 1,4 ---- *************** *** 23,27 **** public void testMockCreator()throws Exception{ MockObject m = MockObjectFactory.createMock(ListenerOne.class); ! ListenerOne l=(ListenerOne)m; --- 20,24 ---- public void testMockCreator()throws Exception{ MockObject m = MockObjectFactory.createMock(ListenerOne.class); ! // ListenerOne l=(ListenerOne)m; *************** *** 46,50 **** public void testNoVerifyCalled() throws Exception { MockObject m = MockObjectFactory.createMock(ListenerOne.class); ! ListenerOne l=(ListenerOne)m; String methodName1 = "callMeFirst"; String methodName2="callMeSecond"; --- 43,47 ---- public void testNoVerifyCalled() throws Exception { MockObject m = MockObjectFactory.createMock(ListenerOne.class); ! // ListenerOne l=(ListenerOne)m; String methodName1 = "callMeFirst"; String methodName2="callMeSecond"; |
From: Nobody <fas...@us...> - 2006-02-17 15:07:47
|
Update of /cvsroot/mocklib/mocklib2/input/javasrc/biz/xsoftware/mock2/impl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31643/input/javasrc/biz/xsoftware/mock2/impl Modified Files: MockObjectSuperImpl.java Log Message: get rid of eclipse warnings. Index: MockObjectSuperImpl.java =================================================================== RCS file: /cvsroot/mocklib/mocklib2/input/javasrc/biz/xsoftware/mock2/impl/MockObjectSuperImpl.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** MockObjectSuperImpl.java 16 Feb 2006 15:37:34 -0000 1.4 --- MockObjectSuperImpl.java 17 Feb 2006 15:07:40 -0000 1.5 *************** *** 5,10 **** import java.util.List; import java.util.Map; - import java.util.logging.Level; - import java.util.logging.Logger; import biz.xsoftware.mock2.Behavior; --- 5,8 ---- *************** *** 14,19 **** public abstract class MockObjectSuperImpl implements MockObject { ! private static final Logger logger = Logger ! .getLogger(MockObjectSuperImpl.class.getName()); private static final long DEFAULT_TIME_OUT = 10000; --- 12,17 ---- public abstract class MockObjectSuperImpl implements MockObject { ! // private static final Logger logger = Logger ! // .getLogger(MockObjectSuperImpl.class.getName()); private static final long DEFAULT_TIME_OUT = 10000; *************** *** 38,42 **** * A map of queues, containing objects to return when methods are called */ ! private Map<String, List<Object>> methodToReturnVal = new HashMap<String, List<Object>>(); /** --- 36,40 ---- * A map of queues, containing objects to return when methods are called */ ! // private Map<String, List<Object>> methodToReturnVal = new HashMap<String, List<Object>>(); /** *************** *** 44,48 **** * the method is empty. */ ! private Map<String, Object> methodToDefaultRetVal = new HashMap<String, Object>(); public CalledMethod expect(String methodName, Class... vargs) { --- 42,46 ---- * the method is empty. */ ! // private Map<String, Object> methodToDefaultRetVal = new HashMap<String, Object>(); public CalledMethod expect(String methodName, Class... vargs) { |
From: Jay <ja...@us...> - 2006-02-16 15:37:52
|
Update of /cvsroot/mocklib/mocklib2/bldfiles In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14392/bldfiles Modified Files: design.xml Log Message: merge brachForOffice to HEAD Index: design.xml =================================================================== RCS file: /cvsroot/mocklib/mocklib2/bldfiles/design.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** design.xml 13 Jan 2006 14:48:31 -0000 1.3 --- design.xml 16 Feb 2006 15:37:35 -0000 1.4 *************** *** 15,45 **** <!-- should use something like this instead on a per project basis --> ! <package name="impl" package="biz.xsoftware.mock"> <depends>junit</depends> </package> <package name="testapi" package="biz.xsoftware.test.mock" subpackages="include"> ! <depends>impl</depends> <depends>junit</depends> </package> <package name="examples" package="biz.xsoftware.examples" subpackages="include"> ! <depends>impl</depends> <depends>junit</depends> </package> ! <package name="api" package="biz.xsoftware.mock2"> ! <!-- is depending on junit a good idea???? it makes it easier to prevent ! people from forgetting to call verify but also locks us to use junit more ! but junit is pretty standard now --> ! <depends>junit</depends> ! </package> ! <package name="impl2" package="biz.xsoftware.mock2.impl"> ! <depends>api</depends> </package> <package name="testapi2" package="biz.xsoftware.test.mock2" subpackages="include"> ! <depends>impl2</depends> <depends>junit</depends> </package> <package name="examples2" package="biz.xsoftware.examples2" subpackages="include"> ! <depends>impl2</depends> <depends>junit</depends> </package> --- 15,40 ---- <!-- should use something like this instead on a per project basis --> ! <package name="apiAndImpl" package="biz.xsoftware.mock"> <depends>junit</depends> </package> <package name="testapi" package="biz.xsoftware.test.mock" subpackages="include"> ! <depends>apiAndImpl</depends> <depends>junit</depends> </package> <package name="examples" package="biz.xsoftware.examples" subpackages="include"> ! <depends>apiAndImpl</depends> <depends>junit</depends> </package> ! <package name="api2" package="biz.xsoftware.mock2"/> ! <package name="impl2" package="biz.xsoftware.mock2.impl"> ! <depends>api2</depends> </package> <package name="testapi2" package="biz.xsoftware.test.mock2" subpackages="include"> ! <depends>api2</depends> <depends>junit</depends> </package> <package name="examples2" package="biz.xsoftware.examples2" subpackages="include"> ! <depends>api2</depends> <depends>junit</depends> </package> *************** *** 47,49 **** ! </design> --- 42,44 ---- ! </design> \ No newline at end of file |
Update of /cvsroot/mocklib/mocklib2/input/javasrc/biz/xsoftware/mock2/impl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14392/input/javasrc/biz/xsoftware/mock2/impl Modified Files: MockObjectSuperImpl.java MockObjectFactoryImpl.java CalledMethodImpl.java MockObjectImpl.java Log Message: merge brachForOffice to HEAD Index: CalledMethodImpl.java =================================================================== RCS file: /cvsroot/mocklib/mocklib2/input/javasrc/biz/xsoftware/mock2/impl/CalledMethodImpl.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CalledMethodImpl.java 3 Jan 2006 13:29:54 -0000 1.1 --- CalledMethodImpl.java 16 Feb 2006 15:37:34 -0000 1.2 *************** *** 8,21 **** private String stackTrace; ! public void setMethodName(String methodName) { ! this.methodName = methodName; ! } ! ! public void setParameters(Object[] parameters) { ! this.parameters = parameters; } ! ! public void setStackTrace(String stackTrace) { ! this.stackTrace = stackTrace; } --- 8,25 ---- private String stackTrace; ! public CalledMethodImpl(String methodName, Object[]params,String stackTrace){ ! this.methodName=methodName; ! if(params==null){ ! this.parameters=new Object[0]; ! }else ! { ! this.parameters=params; ! } ! this.stackTrace=stackTrace; } ! ! public CalledMethodImpl(String methodName){ ! this.methodName=methodName; ! } *************** *** 27,30 **** --- 31,38 ---- public Object[] getParameters() { // TODO Auto-generated method stub + if(parameters==null) + { + throw new IllegalStateException("MockObject.verify() must be called before accessing and of the methods on CalledMethod object"); + } return parameters; } *************** *** 34,37 **** --- 42,59 ---- return stackTrace; } + + public void setMethodName(String methodName) { + this.methodName = methodName; + } + + public void setParameters(Object[] parameters) { + this.parameters = parameters; + } + + public void setStackTrace(String stackTrace) { + this.stackTrace = stackTrace; + } + + Index: MockObjectImpl.java =================================================================== RCS file: /cvsroot/mocklib/mocklib2/input/javasrc/biz/xsoftware/mock2/impl/MockObjectImpl.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** MockObjectImpl.java 13 Jan 2006 14:48:31 -0000 1.1 --- MockObjectImpl.java 16 Feb 2006 15:37:34 -0000 1.2 *************** *** 2,13 **** import java.lang.reflect.InvocationHandler; import java.lang.reflect.Method; public class MockObjectImpl extends MockObjectSuperImpl implements InvocationHandler { ! public MockObjectImpl(Class[] interfacesToMock) { ! // TODO Auto-generated constructor stub } --- 2,38 ---- import java.lang.reflect.InvocationHandler; + import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; + import java.util.HashSet; + import java.util.Set; + import biz.xsoftware.mock2.MockObject; + /** + * this class implements the interface InvocationHandler,defind a + * certain MockObject and return a calledMethod instance to the + * test cases + * @author Jay + * + */ public class MockObjectImpl extends MockObjectSuperImpl implements InvocationHandler { ! private static Set<Method> isMethodInSuper=new HashSet<Method>(); ! Class[]classes; ! ! static { ! Class c=MockObject.class; ! Method[] m=c.getMethods(); ! for(int i=0;i<m.length;i++){ ! isMethodInSuper.add(m[i]); ! } ! c=Object.class; ! m=c.getMethods(); ! for(int i=0;i<m.length;i++){ ! isMethodInSuper.add(m[i]); ! } ! } public MockObjectImpl(Class[] interfacesToMock) { ! this.classes=interfacesToMock; } *************** *** 19,24 **** throws Throwable { // TODO Auto-generated method stub ! return null; } } --- 44,85 ---- throws Throwable { // TODO Auto-generated method stub ! if(isMethodInSuper.contains(method)){ ! return callSuperMethod(proxy,method,args); ! } ! ! Object o=methodCalledImpl(method.getName(),args); ! ! if(o == null) { ! Class c = method.getReturnType(); ! if(!Object.class.isAssignableFrom(c) && !"void".equals(c.getName())) { ! throw new RuntimeException("Must call addReturnValue and specify a non-null value as method="+method.getName()+" returns a primitive value"); ! } ! } ! return o; ! } + private Object callSuperMethod(Object proxy, Method method, Object[] args) throws Throwable{ + try { + if("equals".equals(method.getName())) + return new Boolean(proxy == args[0]); + else if("toString".equals(method.getName())) + return ""+this; + + return method.invoke(this, args); + } catch(InvocationTargetException e) { + if(e.getCause() != null) + throw e.getCause(); + else + throw e; + } + } + + public Class[] getClasses(){ + return this.classes; + } + + + } + Index: MockObjectFactoryImpl.java =================================================================== RCS file: /cvsroot/mocklib/mocklib2/input/javasrc/biz/xsoftware/mock2/impl/MockObjectFactoryImpl.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MockObjectFactoryImpl.java 13 Jan 2006 15:45:00 -0000 1.2 --- MockObjectFactoryImpl.java 16 Feb 2006 15:37:34 -0000 1.3 *************** *** 15,19 **** } ! ClassLoader cl = MockObjectFactory.class.getClassLoader(); MockObjectImpl impl = new MockObjectImpl(interfacesToMock); Object o = Proxy.newProxyInstance(cl, interfacesPlusMock, impl); --- 15,19 ---- } ! ClassLoader cl = MockObjectFactoryImpl.class.getClassLoader(); MockObjectImpl impl = new MockObjectImpl(interfacesToMock); Object o = Proxy.newProxyInstance(cl, interfacesPlusMock, impl); *************** *** 27,31 **** interfacePlusMock[0] = MockObject.class; ! ClassLoader cl = MockObjectFactory.class.getClassLoader(); MockObjectImpl impl = new MockObjectImpl(interfaceToMock, realObject); Object o = Proxy.newProxyInstance(cl, interfacePlusMock, impl); --- 27,31 ---- interfacePlusMock[0] = MockObject.class; ! ClassLoader cl = MockObjectFactoryImpl.class.getClassLoader(); MockObjectImpl impl = new MockObjectImpl(interfaceToMock, realObject); Object o = Proxy.newProxyInstance(cl, interfacePlusMock, impl); Index: MockObjectSuperImpl.java =================================================================== RCS file: /cvsroot/mocklib/mocklib2/input/javasrc/biz/xsoftware/mock2/impl/MockObjectSuperImpl.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MockObjectSuperImpl.java 13 Jan 2006 14:48:31 -0000 1.3 --- MockObjectSuperImpl.java 16 Feb 2006 15:37:34 -0000 1.4 *************** *** 1,75 **** package biz.xsoftware.mock2.impl; import biz.xsoftware.mock2.Behavior; import biz.xsoftware.mock2.CalledMethod; import biz.xsoftware.mock2.MockObject; ! public abstract class MockObjectSuperImpl implements MockObject{ ! ! //private static final Logger logger=Logger.getLogger(MockObjectSuperImpl.class.getName()); ! private static final long NO_TIME_OUT=0; ! public CalledMethod expect(String methodName, Class... vargs) { ! return expect(methodName,NO_TIME_OUT,vargs); ! } ! public CalledMethod expect(Object returnValue, String methodName, Class... vargs) { ! return expect(returnValue,methodName,NO_TIME_OUT,vargs); ! } ! public CalledMethod expect(String methodName, Throwable throwable, Class... vargs) { ! ! return expect(methodName,throwable,NO_TIME_OUT,vargs); ! } ! public CalledMethod expect(String methodName, Behavior behavior, Class... params) { ! ! return expect(methodName,behavior,NO_TIME_OUT,params); ! } ! public CalledMethod expect(String methodName, long timeout, Class... vargs) { ! ! return null; ! } ! public CalledMethod expect(Object returnValue, String methodName, long timeout, Class... vargs) { ! // TODO Auto-generated method stub ! return null; ! } ! public CalledMethod expect(String methodName, Throwable throwable, long timeout, Class... vargs) { ! // TODO Auto-generated method stub ! return null; ! } ! public CalledMethod expect(String methodName, Behavior behavior, long timeout, Class... params) { ! // TODO Auto-generated method stub ! return null; ! } ! public void verify() { ! // TODO Auto-generated method stub ! ! } ! public void addIgnoreMethod(String methodName, Class... vargs) { ! // TODO Auto-generated method stub ! ! } ! public void removeIgnoreMethod(String methodName, Class... vargs) { ! // TODO Auto-generated method stub ! ! } ! public void setDefaultReturnValue(Object returnValue, String methodName, Class... vargs) { ! // TODO Auto-generated method stub ! ! } ! public Object instance() { ! // TODO Auto-generated method stub ! return null; ! } } --- 1,186 ---- package biz.xsoftware.mock2.impl; + import java.util.HashMap; + import java.util.LinkedList; + import java.util.List; + import java.util.Map; + import java.util.logging.Level; + import java.util.logging.Logger; + import biz.xsoftware.mock2.Behavior; import biz.xsoftware.mock2.CalledMethod; import biz.xsoftware.mock2.MockObject; ! public abstract class MockObjectSuperImpl implements MockObject { ! private static final Logger logger = Logger ! .getLogger(MockObjectSuperImpl.class.getName()); ! private static final long DEFAULT_TIME_OUT = 10000; ! // private static int Index=0; ! /** ! * List of the current methods that have been called. ! */ ! private List<CalledMethod> methodsCalled = new LinkedList<CalledMethod>(); ! /** ! * List of the methods been called ,and store them ! */ ! Map retVal=new HashMap(); ! /** ! * List of the methods that have been expected ! */ ! private List<CalledMethod> methodsExpected = new LinkedList<CalledMethod>(); ! /** ! * A map of queues, containing objects to return when methods are called ! */ ! private Map<String, List<Object>> methodToReturnVal = new HashMap<String, List<Object>>(); ! /** ! * A map of default return values, which are used to return if the queue for ! * the method is empty. ! */ ! private Map<String, Object> methodToDefaultRetVal = new HashMap<String, Object>(); ! public CalledMethod expect(String methodName, Class... vargs) { ! return expect(methodName, DEFAULT_TIME_OUT, vargs); ! } ! public CalledMethod expect(Object returnValue, String methodName, ! Class... vargs) { ! return expect(returnValue, methodName, DEFAULT_TIME_OUT, vargs); ! } ! public CalledMethod expect(String methodName, Throwable throwable, ! Class... vargs) { ! return expect(methodName, throwable, DEFAULT_TIME_OUT, vargs); ! } ! public CalledMethod expect(String methodName, Behavior behavior, ! Class... params) { ! return expect(methodName, behavior, DEFAULT_TIME_OUT, params); ! } ! ! public CalledMethod expect(String methodName, long timeout, Class... vargs) { ! if (methodName == null) ! throw new IllegalArgumentException("methd name can not be null"); ! CalledMethod calledMethod = new CalledMethodImpl(methodName); ! methodsExpected.add(calledMethod); ! return calledMethod; ! } ! ! public CalledMethod expect(Object returnValue, String methodName, ! long timeout, Class... vargs) { ! if(methodName==null) ! throw new IllegalArgumentException("method name can not be null"); ! CalledMethod calledMethod=new CalledMethodImpl(methodName); ! methodsExpected.add(calledMethod); ! retVal.put(methodName,returnValue); ! return calledMethod; ! } ! ! public CalledMethod expect(String methodName, Throwable throwable, ! long timeout, Class... vargs) { ! // TODO Auto-generated method stub ! return null; ! } ! ! public CalledMethod expect(String methodName, Behavior behavior, ! long timeout, Class... params) { ! // TODO Auto-generated method stub ! return null; ! } ! ! ! public void verify() { ! ! if (methodsCalled.size() == 0) { ! synchronized(this){ ! try { ! this.wait(DEFAULT_TIME_OUT); ! } catch (InterruptedException e) { ! // TODO Auto-generated catch block ! e.printStackTrace(); ! } ! } ! } ! ! while (methodsCalled.size() != 0) { ! CalledMethod calledMethod = methodsCalled.remove(0); ! CalledMethodImpl m = (CalledMethodImpl) methodsExpected.remove(0); ! m.setParameters(calledMethod.getParameters()); ! m.setStackTrace(calledMethod.getStackTrace()); ! ! } ! ! } ! ! public void addIgnoreMethod(String methodName, Class... vargs) { ! // TODO Auto-generated method stub ! ! } ! ! public void removeIgnoreMethod(String methodName, Class... vargs) { ! // TODO Auto-generated method stub ! ! } ! ! public void setDefaultReturnValue(Object returnValue, String methodName, ! Class... vargs) { ! ! ! } ! ! public Object instance() { ! // TODO Auto-generated method stub ! return null; ! } ! ! synchronized protected Object methodCalledImpl(String methodName, ! Object[] parameters) { ! ! methodName = methodName.intern(); ! String params = ""; ! if (parameters == null) { ! params = "no params"; ! } else { ! Object[] array = (Object[]) parameters; ! for (int i = 0; i < array.length - 1; i++) { ! params += array[i] + ", "; ! } ! params += array[array.length - 1]; ! } ! ! String stackTrace = "method Called=" + methodName + "(" + params ! + "on object" + this + ")"; ! // if(methodsExpected.size()!=0){ ! CalledMethod calledMethod = new CalledMethodImpl(methodName, ! parameters, stackTrace); ! ! methodsCalled.add(calledMethod); ! ! // } ! ! return getReturnValue(methodName); ! } ! ! private Object getReturnValue(String methodName) { ! if(retVal.size()==0){ ! String returnValue="No return value is set"; ! setDefaultReturnValue(returnValue,methodName); ! } ! if(retVal.containsKey(methodName)){ ! return retVal.get(methodName); ! } ! ! return null; ! ! ! } } |