* BAEL-1068 - Javadoc example classes

* BAEL-1068 - Formatting change for pom.xml

* Updated javadoc comments to reflect article example

* Added javadoc tags for throws, deprecated, and version and a clause to throw an exception
This commit is contained in:
Jonathan 2018-03-11 13:18:35 -05:00 committed by Grzegorz Piwowarek
parent 9bbbe5446f
commit f50d111c5e
1 changed files with 7 additions and 1 deletions

View File

@ -23,9 +23,15 @@ public class SuperHero extends Person {
* @return the amount of health hero has after attack * @return the amount of health hero has after attack
* @see <a href="http://www.link_to_jira/HERO-402">HERO-402</a> * @see <a href="http://www.link_to_jira/HERO-402">HERO-402</a>
* @since 1.0 * @since 1.0
* @deprecated As of version 1.1, use . . . instead
* @version 1.2
* @throws IllegalArgumentException if incomingDamage is negative
*/ */
public int successfullyAttacked(int incomingDamage, String damageType) { public int successfullyAttacked(int incomingDamage, String damageType) throws Exception {
// do things // do things
if (incomingDamage < 0) {
throw new IllegalArgumentException ("Cannot cause negative damage");
}
return 0; return 0;
} }