From dd586be9f43908de302f3b1085a966fa583899e6 Mon Sep 17 00:00:00 2001 From: Thilo Schwarz Date: Wed, 31 Dec 2025 13:38:32 +0100 Subject: [PATCH] fix formatting in `PagingRequest#getPagingParams` JavaDoc and reorder `RecordEntity#getName` method. --- .../thischwa/cf/model/PagingRequest.java | 2 +- .../codes/thischwa/cf/model/RecordEntity.java | 34 +++++++++---------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/main/java/codes/thischwa/cf/model/PagingRequest.java b/src/main/java/codes/thischwa/cf/model/PagingRequest.java index de6277c..dfb37b2 100644 --- a/src/main/java/codes/thischwa/cf/model/PagingRequest.java +++ b/src/main/java/codes/thischwa/cf/model/PagingRequest.java @@ -54,7 +54,7 @@ public class PagingRequest { * Retrieves the pagination parameters in a key-value map format. * * @return a map containing the pagination parameters, where the key "page" indicates the current - * page number and the key "perPage" indicates the number of items per page. + * page number and the key "perPage" indicates the number of items per page. */ public Map getPagingParams() { return Map.of("page", String.valueOf(page), "perPage", String.valueOf(perPage)); diff --git a/src/main/java/codes/thischwa/cf/model/RecordEntity.java b/src/main/java/codes/thischwa/cf/model/RecordEntity.java index d506606..71f48d1 100644 --- a/src/main/java/codes/thischwa/cf/model/RecordEntity.java +++ b/src/main/java/codes/thischwa/cf/model/RecordEntity.java @@ -53,23 +53,6 @@ public class RecordEntity extends AbstractEntity { super(); } - /** - * Retrieves the name of the DNS record. - * If the name contains a dot ('.'), only the substring before the first dot is returned. - * - * @return the name of the DNS record, potentially truncated before the first dot, - * or the full name if no dot is present. - */ - public String getName() { - if (name != null) { - int pos = name.indexOf('.'); - if (pos > 0) { - return name.substring(0, pos); - } - } - return name; - } - /** * Builds and returns a {@link RecordEntity} instance with the specified attributes. * @@ -117,4 +100,21 @@ public class RecordEntity extends AbstractEntity { rec.setId(id); return rec; } + + /** + * Retrieves the name of the DNS record. + * If the name contains a dot ('.'), only the substring before the first dot is returned. + * + * @return the name of the DNS record, potentially truncated before the first dot, + * or the full name if no dot is present. + */ + public String getName() { + if (name != null) { + int pos = name.indexOf('.'); + if (pos > 0) { + return name.substring(0, pos); + } + } + return name; + } }