From b870684fea5fb9fd95f433ef3a85f492048c1b80 Mon Sep 17 00:00:00 2001 From: ZhouXY108 Date: Sat, 9 Sep 2023 18:18:01 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9D=99=E6=80=81=E6=96=B9=E6=B3=95=E4=B8=8D?= =?UTF-8?q?=E9=9C=80=E8=A6=81=20final?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plusone/jdbc/PlusoneJdbcDaoSupport.java | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/plusone-basic/plusone-basic-infrastructure/src/main/java/xyz/zhouxy/plusone/jdbc/PlusoneJdbcDaoSupport.java b/plusone-basic/plusone-basic-infrastructure/src/main/java/xyz/zhouxy/plusone/jdbc/PlusoneJdbcDaoSupport.java index 4932d4e..b5017e4 100644 --- a/plusone-basic/plusone-basic-infrastructure/src/main/java/xyz/zhouxy/plusone/jdbc/PlusoneJdbcDaoSupport.java +++ b/plusone-basic/plusone-basic-infrastructure/src/main/java/xyz/zhouxy/plusone/jdbc/PlusoneJdbcDaoSupport.java @@ -103,49 +103,49 @@ public abstract class PlusoneJdbcDaoSupport { return Numbers.sum(i); } - protected static final void assertResultEquals(T result, T expectedValue) { + protected static void assertResultEquals(T result, T expectedValue) { if (!Objects.equals(result, expectedValue)) { throw new DataOperationResultException(); } } - protected static final void assertResultEquals(T result, T expectedValue, Function errMsg) { + protected static void assertResultEquals(T result, T expectedValue, Function errMsg) { if (!Objects.equals(result, expectedValue)) { throw new DataOperationResultException(errMsg.apply(result)); } } - protected static final void assertResultEquals(T result, T expectedValue, String msgTemplate, Object... args) { + protected static void assertResultEquals(T result, T expectedValue, String msgTemplate, Object... args) { if (!Objects.equals(result, expectedValue)) { throw new DataOperationResultException(String.format(msgTemplate, args)); } } - protected static final void assertResultEqualsOrThrow(T result, T expectedValue, + protected static void assertResultEqualsOrThrow(T result, T expectedValue, Function e) throws E { if (!Objects.equals(result, expectedValue)) { throw e.apply(result); } } - protected static final void assertUpdateOneRow(int result) { + protected static void assertUpdateOneRow(int result) { assertResultEquals(result, 1); } - protected static final void assertUpdateOneRow(int result, Function errMsg) { + protected static void assertUpdateOneRow(int result, Function errMsg) { assertResultEquals(result, 1, errMsg); } - protected static final void assertUpdateOneRow(int result, String msgTemplate, Object... args) { + protected static void assertUpdateOneRow(int result, String msgTemplate, Object... args) { assertResultEquals(result, 1, msgTemplate, args); } - protected static final void assertUpdateOneRowOrThrow(int result, Function e) + protected static void assertUpdateOneRowOrThrow(int result, Function e) throws E { assertResultEqualsOrThrow(result, 1, e); } - protected static final SqlParameterSource[] buildSqlParameterSourceArray( + protected static SqlParameterSource[] buildSqlParameterSourceArray( T[] c, @Nonnull Function paramSourceBuilder) { if (c == null || c.length == 0) { @@ -154,7 +154,7 @@ public abstract class PlusoneJdbcDaoSupport { return buildSqlParameterSourceArray(Arrays.stream(c), paramSourceBuilder); } - protected static final SqlParameterSource[] buildSqlParameterSourceArray( + protected static SqlParameterSource[] buildSqlParameterSourceArray( Collection c, @Nonnull Function paramSourceBuilder) { if (CollectionUtils.isEmpty(c)) { @@ -163,7 +163,7 @@ public abstract class PlusoneJdbcDaoSupport { return buildSqlParameterSourceArray(c.stream(), paramSourceBuilder); } - protected static final SqlParameterSource[] buildSqlParameterSourceArray( + protected static SqlParameterSource[] buildSqlParameterSourceArray( Stream stream, @Nonnull Function paramSourceBuilder) { Objects.requireNonNull(stream);