From 6f8f8c232306daa68c5d7c4a1cc4030680c4fdcf Mon Sep 17 00:00:00 2001 From: ZhouXY108 Date: Wed, 28 Jun 2023 01:11:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20bug=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plusone/commons/util/PagingAndSortingQueryParams.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/xyz/zhouxy/plusone/commons/util/PagingAndSortingQueryParams.java b/src/main/java/xyz/zhouxy/plusone/commons/util/PagingAndSortingQueryParams.java index b34bea2..3f4a88b 100644 --- a/src/main/java/xyz/zhouxy/plusone/commons/util/PagingAndSortingQueryParams.java +++ b/src/main/java/xyz/zhouxy/plusone/commons/util/PagingAndSortingQueryParams.java @@ -51,10 +51,11 @@ public class PagingAndSortingQueryParams { } public PagingAndSortingQueryParams(String... sortableColNames) { + Set sortableColNameSet = new HashSet<>(sortableColNames.length); for (String colName : sortableColNames) { Assert.isNotBlank(colName, "Column name must has text."); + sortableColNameSet.add(colName); } - Set sortableColNameSet = new HashSet<>(sortableColNames.length); this.sortableColNames = Collections.unmodifiableSet(sortableColNameSet); }