Update javadoc: it incorrectly said to return 'true'

This commit is contained in:
Tagir Valeev 2022-06-15 11:09:14 +02:00 committed by Dave Syer
parent 21b94869e8
commit 2a12048e78

View file

@ -101,7 +101,7 @@ public class Owner extends Person {
/** /**
* Return the Pet with the given name, or null if none found for this Owner. * Return the Pet with the given name, or null if none found for this Owner.
* @param name to test * @param name to test
* @return true if pet name is already in use * @return a pet if pet name is already in use
*/ */
public Pet getPet(String name) { public Pet getPet(String name) {
return getPet(name, false); return getPet(name, false);
@ -127,7 +127,7 @@ public class Owner extends Person {
/** /**
* Return the Pet with the given name, or null if none found for this Owner. * Return the Pet with the given name, or null if none found for this Owner.
* @param name to test * @param name to test
* @return true if pet name is already in use * @return a pet if pet name is already in use
*/ */
public Pet getPet(String name, boolean ignoreNew) { public Pet getPet(String name, boolean ignoreNew) {
name = name.toLowerCase(); name = name.toLowerCase();