[jsword-svn] common/java/core/org/crosswire/common/util s
jswordcvs at crosswire.org
jswordcvs at crosswire.org
Sat Mar 19 11:45:09 MST 2005
Update of /cvs/jsword/common/java/core/org/crosswire/common/util
In directory www.crosswire.org:/tmp/cvs-serv30532/java/core/org/crosswire/common/util
Modified Files:
StackTrace.java ThreadUtil.java ClassUtil.java
ReflectionUtil.java
Log Message:
Update pmd ruleset.xml, adding new rules, (re)testing all rules, and cleaning up trivial reports.
Index: StackTrace.java
===================================================================
RCS file: /cvs/jsword/common/java/core/org/crosswire/common/util/StackTrace.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** StackTrace.java 28 Nov 2004 21:36:31 -0000 1.5
--- StackTrace.java 19 Mar 2005 18:45:07 -0000 1.6
***************
*** 192,196 ****
* Are there more stack levels
*/
! protected int level;
}
--- 192,196 ----
* Are there more stack levels
*/
! /* pkg protected */ int level;
}
***************
*** 240,244 ****
* Array containing the class names
*/
! protected String[] classNames;
/**
--- 240,244 ----
* Array containing the class names
*/
! /* pkg protected */ String[] classNames;
/**
Index: ClassUtil.java
===================================================================
RCS file: /cvs/jsword/common/java/core/org/crosswire/common/util/ClassUtil.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** ClassUtil.java 28 Nov 2004 21:36:31 -0000 1.7
--- ClassUtil.java 19 Mar 2005 18:45:07 -0000 1.8
***************
*** 159,163 ****
log.debug("Found " + matches.size() + " implementors of " + clazz.getName()); //$NON-NLS-1$ //$NON-NLS-2$
! return (Class[]) matches.toArray(new Class[0]);
}
catch (Exception ex)
--- 159,163 ----
log.debug("Found " + matches.size() + " implementors of " + clazz.getName()); //$NON-NLS-1$ //$NON-NLS-2$
! return (Class[]) matches.toArray(new Class[matches.size()]);
}
catch (Exception ex)
Index: ReflectionUtil.java
===================================================================
RCS file: /cvs/jsword/common/java/core/org/crosswire/common/util/ReflectionUtil.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** ReflectionUtil.java 30 Aug 2004 09:27:27 -0000 1.3
--- ReflectionUtil.java 19 Mar 2005 18:45:07 -0000 1.4
***************
*** 71,75 ****
// The right number of params
Class[] testTypes = testMethods[i].getParameterTypes();
! if (testTypes.length != calledTypes.length) continue;
// Of the right types?
--- 71,78 ----
// The right number of params
Class[] testTypes = testMethods[i].getParameterTypes();
! if (testTypes.length != calledTypes.length)
! {
! continue;
! }
// Of the right types?
***************
*** 127,131 ****
// The right number of params
Class[] testTypes = testMethods[i].getParameterTypes();
! if (testTypes.length != calledTypes.length) continue;
// Of the right types?
--- 130,137 ----
// The right number of params
Class[] testTypes = testMethods[i].getParameterTypes();
! if (testTypes.length != calledTypes.length)
! {
! continue;
! }
// Of the right types?
Index: ThreadUtil.java
===================================================================
RCS file: /cvs/jsword/common/java/core/org/crosswire/common/util/ThreadUtil.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** ThreadUtil.java 28 Nov 2004 21:36:31 -0000 1.4
--- ThreadUtil.java 19 Mar 2005 18:45:07 -0000 1.5
***************
*** 159,163 ****
private static void listThread(List vec, int depth, Thread thread)
{
! if (thread == null) return;
try
--- 159,166 ----
private static void listThread(List vec, int depth, Thread thread)
{
! if (thread == null)
! {
! return;
! }
try
More information about the jsword-svn
mailing list