From 6cd6b779a6a31965e56e1556ed11179fbd925932 Mon Sep 17 00:00:00 2001 From: Leonie Eitze Date: Mon, 26 Jun 2023 12:55:52 +0200 Subject: [PATCH] More checkstyle improvements on Offer components --- .../java/de/rwu/easydrop/model/Offer.java | 36 +++++++++---------- .../service/validation/OfferValidator.java | 4 +-- .../easydrop/service/writer/OfferWriter.java | 2 +- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/main/java/de/rwu/easydrop/model/Offer.java b/src/main/java/de/rwu/easydrop/model/Offer.java index 174e1d4..8fae3b7 100644 --- a/src/main/java/de/rwu/easydrop/model/Offer.java +++ b/src/main/java/de/rwu/easydrop/model/Offer.java @@ -13,35 +13,35 @@ import lombok.Data; @Data public class Offer { - /* - * The product that our software buys + /** + * The product that our software buys. */ - Product sourceProduct; + private Product sourceProduct; - /* - * The product that our software sells + /** + * The product that our software sells. */ - Product saleProduct; + private Product saleProduct; - /* - * Date of the creation of the offer + /** + * Date of the creation of the offer. * NOTE: Use Timestamp? https://docs.oracle.com/javase/8/docs/api/java/sql/Timestamp.html */ - Date creationDate; + private Date creationDate; - /* - * Date of last update of the offer on the destination website (API) + /** + * Date of last update of the offer on the destination website (API). */ - Date upDate; + private Date upDate; - /* - * Date of last check if offer is still valid + /** + * Date of last check if offer is still valid. */ - Date checkDate; + private Date checkDate; - /* - * ID of the offer + /** + * ID of the offer. */ - String offerId; + private String offerId; } diff --git a/src/main/java/de/rwu/easydrop/service/validation/OfferValidator.java b/src/main/java/de/rwu/easydrop/service/validation/OfferValidator.java index ab6b26e..c3f2257 100644 --- a/src/main/java/de/rwu/easydrop/service/validation/OfferValidator.java +++ b/src/main/java/de/rwu/easydrop/service/validation/OfferValidator.java @@ -7,7 +7,7 @@ import de.rwu.easydrop.model.Offer; * * @since 0.2.0 */ -public class OfferValidator { +public final class OfferValidator { /** * Private constructor to prevent unwanted instantiation. * @@ -21,7 +21,7 @@ public class OfferValidator { * * @param offer the Offer */ - public static void validate(final Offer offer) {} + public static void validate(final Offer offer) { } } diff --git a/src/main/java/de/rwu/easydrop/service/writer/OfferWriter.java b/src/main/java/de/rwu/easydrop/service/writer/OfferWriter.java index 8933d55..6ba6a4c 100644 --- a/src/main/java/de/rwu/easydrop/service/writer/OfferWriter.java +++ b/src/main/java/de/rwu/easydrop/service/writer/OfferWriter.java @@ -22,7 +22,7 @@ public class OfferWriter { /** * Validates and saves product to persistence. * - * @param product + * @param offer */ public void writeOfferToPersistence(final Offer offer) { OfferValidator.validate(offer);