From e9962712113fc649ea84a0805b7872e65b0e2328 Mon Sep 17 00:00:00 2001 From: Miguel Reboiro-Jato Date: Wed, 10 Oct 2018 11:17:33 +0200 Subject: [PATCH] Fixes some JavaDoc errors Some JavaDoc errors detected in the entities have been fixed. --- .../main/java/es/uvigo/esei/xcs/domain/entities/Owner.java | 5 +++-- .../main/java/es/uvigo/esei/xcs/domain/entities/Pet.java | 7 ++++++- .../main/java/es/uvigo/esei/xcs/rest/OwnerResource.java | 1 + rest/src/main/java/es/uvigo/esei/xcs/rest/PetResource.java | 1 + 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/domain/src/main/java/es/uvigo/esei/xcs/domain/entities/Owner.java b/domain/src/main/java/es/uvigo/esei/xcs/domain/entities/Owner.java index decf5df..ca93173 100644 --- a/domain/src/main/java/es/uvigo/esei/xcs/domain/entities/Owner.java +++ b/domain/src/main/java/es/uvigo/esei/xcs/domain/entities/Owner.java @@ -79,9 +79,8 @@ public class Owner extends User implements Serializable { } /** - * Returns the pets that belongs to this owner. The collection returned is + * Returns the pets that belong to this owner. The collection returned is * unmodifiable and no order are guaranteed. - * If the pet already belongs to this owner, no action will be done. * * @return the pets that belongs to this owner. */ @@ -138,6 +137,8 @@ public class Owner extends User implements Serializable { /** * Adds a pet directly to the pets collection of this owner if the pet does * not already belongs to this owner. The pet's owner will not be updated. + * If the pet already belongs to this owner, no action will be done. + * * * @param pet the pet to add to this owner. {@code null} values not * supported. diff --git a/domain/src/main/java/es/uvigo/esei/xcs/domain/entities/Pet.java b/domain/src/main/java/es/uvigo/esei/xcs/domain/entities/Pet.java index 0fe3e20..d2338b2 100644 --- a/domain/src/main/java/es/uvigo/esei/xcs/domain/entities/Pet.java +++ b/domain/src/main/java/es/uvigo/esei/xcs/domain/entities/Pet.java @@ -103,6 +103,11 @@ public class Pet implements Serializable { this.setOwner(owner); } + /** + * Returns the identifier of this pet. + * + * @return the identifier of this pet. + */ public int getId() { return id; } @@ -195,7 +200,7 @@ public class Pet implements Serializable { } /** - * Sets the owner of this pet. The new owner can be {@code null}, meaining + * Sets the owner of this pet. The new owner can be {@code null}, meaning * that the pet has no owner. * * @param owner the new owner of the pet. {@code null} value is valid, diff --git a/rest/src/main/java/es/uvigo/esei/xcs/rest/OwnerResource.java b/rest/src/main/java/es/uvigo/esei/xcs/rest/OwnerResource.java index 6d92173..8d15c31 100644 --- a/rest/src/main/java/es/uvigo/esei/xcs/rest/OwnerResource.java +++ b/rest/src/main/java/es/uvigo/esei/xcs/rest/OwnerResource.java @@ -119,6 +119,7 @@ public class OwnerResource { * Deletes an owner. * * @param login the login of the owner to be deleted. + * @return an empty {@code OK} response. * @throws IllegalArgumentException if {@code login} is {@code null} or if * it does not identifies a valid owner. */ diff --git a/rest/src/main/java/es/uvigo/esei/xcs/rest/PetResource.java b/rest/src/main/java/es/uvigo/esei/xcs/rest/PetResource.java index 55ac0f1..9194ef2 100644 --- a/rest/src/main/java/es/uvigo/esei/xcs/rest/PetResource.java +++ b/rest/src/main/java/es/uvigo/esei/xcs/rest/PetResource.java @@ -129,6 +129,7 @@ public class PetResource { * Deletes a pet. * * @param id the identifier of the pet to be deleted. + * @return an empty {@code OK} response. * @throws IllegalArgumentException if there is no pet with the provided * identifier. * @throws SecurityException if the pet's owner is not the current user. -- 2.18.1