From 1b9e7ba6f45b01d0de25a79e037732c3425e7347 Mon Sep 17 00:00:00 2001 From: Vincent Siveton Date: Sun, 17 Feb 2008 15:01:23 +0000 Subject: [PATCH] o improved code readingness and javadoc git-svn-id: https://svn.apache.org/repos/asf/maven/plugin-tools/trunk@628490 13f79535-47bb-0310-9956-ffa450edef68 --- .../plugin/testing/AbstractMojoTestCase.java | 35 ++++++++----------- 1 file changed, 14 insertions(+), 21 deletions(-) diff --git a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/AbstractMojoTestCase.java b/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/AbstractMojoTestCase.java index 7cfa715..7c1023b 100644 --- a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/AbstractMojoTestCase.java +++ b/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/AbstractMojoTestCase.java @@ -42,7 +42,7 @@ import java.lang.reflect.AccessibleObject; /** * TODO: add a way to use the plugin POM for the lookup so that the user doesn't have to provide the a:g:v:goal * as the role hint for the mojo lookup. - * TODO: standarize the execution of the mojo and looking at the results, but could simply have a template method + * TODO: standardize the execution of the mojo and looking at the results, but could simply have a template method * for verifying the state of the mojo post execution * TODO: need a way to look at the state of the mojo without adding getters, this could be where we finally specify * the expressions which extract values from the mojo. @@ -303,7 +303,7 @@ public abstract class AbstractMojoTestCase } /** - * convience method to obtain the value of a variable on a mojo that might not have a getter. + * Convenience method to obtain the value of a variable on a mojo that might not have a getter. * * NOTE: the caller is responsible for casting to to what the desired type is. * @@ -323,7 +323,7 @@ public abstract class AbstractMojoTestCase } /** - * convience method to obtain all variables and values from the mojo (including its superclasses) + * Convenience method to obtain all variables and values from the mojo (including its superclasses) * * Note: the values in the map are of type Object so the caller is responsible for casting to desired types. * @@ -337,7 +337,7 @@ public abstract class AbstractMojoTestCase } /** - * convience method to obtain all variables and values from the mojo (including its superclasses) + * Convenience method to obtain all variables and values from the mojo (including its superclasses) * * Note: the values in the map are of type Object so the caller is responsible for casting to desired types. * @@ -373,7 +373,8 @@ public abstract class AbstractMojoTestCase } /** - * convience method to set values to variables in objects that don't have setters + * Convenience method to set values to variables in objects that don't have setters + * * @param object * @param variable * @param value @@ -417,20 +418,14 @@ public abstract class AbstractMojoTestCase { throw new Exception( "unable to determine " + element ); } - else - { - return elementDom.getValue(); - } - } - else - { - throw new Exception( "unable to determine " + element ); + + return elementDom.getValue(); } + + throw new Exception( "unable to determine " + element ); } - else - { - return elementDom.getValue(); - } + + return elementDom.getValue(); } /** @@ -448,9 +443,7 @@ public abstract class AbstractMojoTestCase { return; } - else - { - throw new Exception( "container is null, make sure super.setUp() is called" ); - } + + throw new Exception( "container is null, make sure super.setUp() is called" ); } }