diff options
| author | Robert Godfrey <rgodfrey@apache.org> | 2010-09-12 22:40:40 +0000 |
|---|---|---|
| committer | Robert Godfrey <rgodfrey@apache.org> | 2010-09-12 22:40:40 +0000 |
| commit | 8c8130d0288446f88deef393823cccffcaed474d (patch) | |
| tree | 781c5801bc2e3d2f84724bec6c959b2af329f3bd /qpid/java/junit-toolkit/src | |
| parent | 8a4c51f79be29149fa30a01e7fab6f36301f24bb (diff) | |
| download | qpid-python-8c8130d0288446f88deef393823cccffcaed474d.tar.gz | |
QPID-2857 : Address issues found by running FindBugs against the Java codebase
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@996393 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/junit-toolkit/src')
2 files changed, 30 insertions, 24 deletions
diff --git a/qpid/java/junit-toolkit/src/main/org/apache/qpid/junit/extensions/AsymptoticTestDecorator.java b/qpid/java/junit-toolkit/src/main/org/apache/qpid/junit/extensions/AsymptoticTestDecorator.java index 4faa58688f..8869d25be3 100644 --- a/qpid/java/junit-toolkit/src/main/org/apache/qpid/junit/extensions/AsymptoticTestDecorator.java +++ b/qpid/java/junit-toolkit/src/main/org/apache/qpid/junit/extensions/AsymptoticTestDecorator.java @@ -136,24 +136,27 @@ public class AsymptoticTestDecorator extends WrappedSuiteTestDecorator log.debug("params = " + ((params == null) ? null : MathUtils.printArray(params))); log.debug("repeat = " + repeat); - for (int n : params) + if(params != null) { - for (int j = 0; j < repeat; j++) + for (int n : params) { - log.debug("n = " + n); + for (int j = 0; j < repeat; j++) + { + log.debug("n = " + n); - // Set the integer parameter in the TKTestResult to be passed to the tests. - tkResult.setN(n); + // Set the integer parameter in the TKTestResult to be passed to the tests. + tkResult.setN(n); - if (tkResult.shouldStop()) - { - log.debug("tkResult.shouldStop = " + true); + if (tkResult.shouldStop()) + { + log.debug("tkResult.shouldStop = " + true); - break; - } + break; + } - log.debug("Calling super#run"); - super.run(tkResult); + log.debug("Calling super#run"); + super.run(tkResult); + } } } } diff --git a/qpid/java/junit-toolkit/src/main/org/apache/qpid/junit/extensions/ParameterVariationTestDecorator.java b/qpid/java/junit-toolkit/src/main/org/apache/qpid/junit/extensions/ParameterVariationTestDecorator.java index 2c207635c7..7da4667928 100644 --- a/qpid/java/junit-toolkit/src/main/org/apache/qpid/junit/extensions/ParameterVariationTestDecorator.java +++ b/qpid/java/junit-toolkit/src/main/org/apache/qpid/junit/extensions/ParameterVariationTestDecorator.java @@ -138,24 +138,27 @@ public class ParameterVariationTestDecorator extends WrappedSuiteTestDecorator log.debug("params = " + ((params == null) ? null : MathUtils.printArray(params))); log.debug("repeat = " + repeat); - for (int n : params) + if(params != null) { - for (int j = 0; j < repeat; j++) + for (int n : params) { - log.debug("n = " + n); + for (int j = 0; j < repeat; j++) + { + log.debug("n = " + n); - // Set the integer parameter in the TKTestResult to be passed to the tests. - tkResult.setN(n); + // Set the integer parameter in the TKTestResult to be passed to the tests. + tkResult.setN(n); - if (tkResult.shouldStop()) - { - log.debug("tkResult.shouldStop = " + true); + if (tkResult.shouldStop()) + { + log.debug("tkResult.shouldStop = " + true); - break; - } + break; + } - log.debug("Calling super#run"); - super.run(tkResult); + log.debug("Calling super#run"); + super.run(tkResult); + } } } } |
