diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9171397..a6a1bae 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,11 +14,21 @@ on: default: false type: boolean required: false + testCoverageDryRun: + description: 'dryrun coverage report?' + default: false + type: boolean + required: false testVerbose: description: 'test output verbose' default: false type: boolean required: false + applyQodanaScan: + description: 'apply Qodana Scan?' + default: true + type: boolean + required: false deployOssrh: description: 'deploy to ossrh?' default: true @@ -33,9 +43,13 @@ jobs: release: name: Release to Sonatype runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + checks: write env: MAVEN_OPTS: -Xmx2g - TEST_VERBOSE: ${{ inputs.testVerbose }} + TEST_VERBOSE: ${{ inputs.testVerbose == 'true' }} steps: - name: Checkout ${{ github.event.release.tag_name }} @@ -63,31 +77,43 @@ jobs: - name: Maven settings.xml id: settings run: | + echo "# env and var" >> "$GITHUB_STEP_SUMMARY" + echo "" >> "$GITHUB_STEP_SUMMARY" JAVA_HOME=$(asdf where java) + echo "- JAVA_HOME=$JAVA_HOME" >> "$GITHUB_STEP_SUMMARY" echo "JAVA_HOME=$JAVA_HOME" >> "$GITHUB_OUTPUT" + echo "- GIT_BRANCH=$(git branch --show-current)" >> "$GITHUB_STEP_SUMMARY" echo "GIT_BRANCH=$(git branch --show-current)" >> "$GITHUB_OUTPUT" _opt=$(git describe --tags --exact-match 2>/dev/null || true) if [ "$_opt" != "" ]; then _opt="-Drevision=$_opt" - echo "MVN_REVISION=$_opt" + echo "- MVN_REVISION=$_opt" >> "$GITHUB_STEP_SUMMARY" echo "MVN_REVISION=$_opt" >> "$GITHUB_OUTPUT" fi _ver=$(mvn --quiet --non-recursive -DforceStdout -Dexpression=project.version $_opt help:evaluate) - echo "WINGS_VERSION=$_ver" + echo "- WINGS_VERSION=$_ver" >> "$GITHUB_STEP_SUMMARY" echo "WINGS_VERSION=$_ver" >> "$GITHUB_OUTPUT" _cov=${{ inputs.testCoverReport || github.event_name == 'push' }} - echo "MVN_COVERAGE=$_cov" + echo "- MVN_COVERAGE=$_cov" >> "$GITHUB_STEP_SUMMARY" echo "MVN_COVERAGE=$_cov" >> "$GITHUB_OUTPUT" _drh=${{ inputs.deployOssrh || github.event_name == 'release' }} - echo "MVN_DEPLOYRH=$_drh" + echo "- MVN_DEPLOYRH=$_drh" >> "$GITHUB_STEP_SUMMARY" echo "MVN_DEPLOYRH=$_drh" >> "$GITHUB_OUTPUT" - mvn -v - git --no-pager log --graph -10 --pretty=format:'%H - %ai %d %s' + _qod=${{ inputs.applyQodanaScan || 'false' }} + echo "- QODANA_SCAN=$_qod" >> "$GITHUB_STEP_SUMMARY" + echo "QODANA_SCAN=$_qod" >> "$GITHUB_OUTPUT" + + echo "# mvn and git" >> "$GITHUB_STEP_SUMMARY" + echo "" >> "$GITHUB_STEP_SUMMARY" + echo '```text' >> "$GITHUB_STEP_SUMMARY" + mvn -v >> "$GITHUB_STEP_SUMMARY" + git --no-pager log --graph -10 --pretty=format:'%H - %ai %d %s' >> "$GITHUB_STEP_SUMMARY" + echo '```' >> "$GITHUB_STEP_SUMMARY" mkdir -p ~/.m2 cat > ~/.m2/settings.xml << "EOF" @@ -102,18 +128,27 @@ jobs: EOF - + - name: Qodana Scan + uses: JetBrains/qodana-action@v2023.3 + if: steps.settings.outputs.QODANA_SCAN == 'true' + env: + QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }} ## report if not release - name: Test Coverage ${{ steps.settings.outputs.WINGS_VERSION }} ${{ steps.settings.outputs.GIT_BRANCH }} if: steps.settings.outputs.MVN_COVERAGE == 'true' run: > mvn - -P coverage - -Dmaven.test.failure.ignore=${{ inputs.testFailureIgnore }} - -DrepoToken=${{ secrets.COVERALLS_REPO_TOKEN }} + -P 'coverage' + -Dmaven.test.failure.ignore=$TESTFAILS_IGNORE + -DrepoToken=$COVERALLS_WINGS -DdryRun=$COVERALLS_DRYRUN clean test jacoco:report coveralls:report env: + TZ: Asia/Shanghai JAVA_HOME: ${{ steps.settings.outputs.JAVA_HOME }} + COVERALLS_WINGS: ${{ secrets.COVERALLS_REPO_TOKEN }} + COVERALLS_DRYRUN: ${{ inputs.testCoverageDryRun || 'false' }} + TESTFAILS_IGNORE: ${{ inputs.testFailureIgnore || 'false' }} + ## import gpp private key - name: Import GPG key if: steps.settings.outputs.MVN_DEPLOYRH == 'true' @@ -127,7 +162,7 @@ jobs: if: steps.settings.outputs.MVN_DEPLOYRH == 'true' run: > mvn - -P ossrh + -P 'ossrh' ${{ steps.settings.outputs.MVN_REVISION }} -Dgpg.passphrase=${MVN_GPG_PASS} clean deploy diff --git a/src/main/java/pro/fessional/mirana/best/DummyBlock.java b/src/main/java/pro/fessional/mirana/best/DummyBlock.java index 436619c..256985f 100644 --- a/src/main/java/pro/fessional/mirana/best/DummyBlock.java +++ b/src/main/java/pro/fessional/mirana/best/DummyBlock.java @@ -28,7 +28,9 @@ public static void ignore(Throwable t) { /** * statement has empty body */ + @SuppressWarnings("EmptyMethod") public static void empty() { + // ignore, need empty } /** diff --git a/src/main/java/pro/fessional/mirana/best/TypedKey.java b/src/main/java/pro/fessional/mirana/best/TypedKey.java index ceeb125..bca8df9 100644 --- a/src/main/java/pro/fessional/mirana/best/TypedKey.java +++ b/src/main/java/pro/fessional/mirana/best/TypedKey.java @@ -67,6 +67,7 @@ public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof TypedReg)) return false; TypedReg reg = (TypedReg) o; + //noinspection EqualsBetweenInconvertibleTypes return Objects.equals(regType, reg.regType); } diff --git a/src/main/java/pro/fessional/mirana/bits/Bytes.java b/src/main/java/pro/fessional/mirana/bits/Bytes.java index 4686cf6..4d697da 100644 --- a/src/main/java/pro/fessional/mirana/bits/Bytes.java +++ b/src/main/java/pro/fessional/mirana/bits/Bytes.java @@ -123,6 +123,7 @@ public static int unicode(char c, byte[] ob) { if (ob == null) return 0; if (c > Byte.MAX_VALUE) { + //noinspection UnnecessaryLocalVariable final int i = c; ob[0] = '\\'; ob[1] = 'u'; diff --git a/src/main/java/pro/fessional/mirana/code/SlotCode.java b/src/main/java/pro/fessional/mirana/code/SlotCode.java index 27e8cc2..9a13039 100644 --- a/src/main/java/pro/fessional/mirana/code/SlotCode.java +++ b/src/main/java/pro/fessional/mirana/code/SlotCode.java @@ -28,7 +28,6 @@ public class SlotCode { } public final int size; - private final int last; private final Slot[] slot; private final Random rand; @@ -49,7 +48,7 @@ public SlotCode(int size, Supplier rand) { public SlotCode(int size, Random rand) { final int page = (size - 1) / bits + 1; this.size = size; - this.last = (1 << (bits - size % bits)) - 1; + int last = (1 << (bits - size % bits)) - 1; this.rand = rand; this.slot = new Slot[page]; for (int i = 0; i < page; i++) { diff --git a/src/main/java/pro/fessional/mirana/cond/EqualsUtil.java b/src/main/java/pro/fessional/mirana/cond/EqualsUtil.java index dfed1dc..f47e019 100644 --- a/src/main/java/pro/fessional/mirana/cond/EqualsUtil.java +++ b/src/main/java/pro/fessional/mirana/cond/EqualsUtil.java @@ -68,7 +68,7 @@ public static boolean inVal(Number a, Number[] nums) { public static boolean inVal(Number a, Number b, Number... nums) { if (a == null || b == null || nums == null) return false; final boolean e = eqVal(a, b); - return e ? e : inVal(a, Arrays.asList(nums)); + return e || inVal(a, Arrays.asList(nums)); } @@ -133,7 +133,7 @@ public static boolean inCase(String a, CharSequence[] strs) { public static boolean inCase(String a, CharSequence b, CharSequence... strs) { if (a == null || b == null || strs == null) return false; final boolean e = eqCase(a, b); - return e ? e : inCase(a, Arrays.asList(strs)); + return e || inCase(a, Arrays.asList(strs)); } public static boolean inCase(String a, Iterable strs) { @@ -159,7 +159,7 @@ public static boolean inCaseless(String a, CharSequence[] strs) { public static boolean inCaseless(String a, CharSequence b, CharSequence... strs) { if (a == null || b == null || strs == null) return false; final boolean e = eqCaseless(a, b); - return e ? e : inCaseless(a, Arrays.asList(strs)); + return e || inCaseless(a, Arrays.asList(strs)); } public static boolean inCaseless(String a, Iterable strs) { diff --git a/src/main/java/pro/fessional/mirana/data/Arr.java b/src/main/java/pro/fessional/mirana/data/Arr.java index 9369ae6..1f6ba5a 100644 --- a/src/main/java/pro/fessional/mirana/data/Arr.java +++ b/src/main/java/pro/fessional/mirana/data/Arr.java @@ -69,7 +69,7 @@ public static byte[] set(byte[] arr, int idx, byte v) { return arr; } else { - byte[] tmp = new byte[Math.max(idx, arr.length) + 1]; + byte[] tmp = new byte[idx + 1]; System.arraycopy(arr, 0, tmp, 0, arr.length); tmp[idx] = v; return tmp; @@ -83,7 +83,7 @@ public static short[] set(short[] arr, int idx, short v) { return arr; } else { - short[] tmp = new short[Math.max(idx, arr.length) + 1]; + short[] tmp = new short[idx + 1]; System.arraycopy(arr, 0, tmp, 0, arr.length); tmp[idx] = v; return tmp; @@ -97,7 +97,7 @@ public static char[] set(char[] arr, int idx, char v) { return arr; } else { - char[] tmp = new char[Math.max(idx, arr.length) + 1]; + char[] tmp = new char[idx + 1]; System.arraycopy(arr, 0, tmp, 0, arr.length); tmp[idx] = v; return tmp; @@ -111,7 +111,7 @@ public static int[] set(int[] arr, int idx, int v) { return arr; } else { - int[] tmp = new int[Math.max(idx, arr.length) + 1]; + int[] tmp = new int[idx + 1]; System.arraycopy(arr, 0, tmp, 0, arr.length); tmp[idx] = v; return tmp; @@ -125,7 +125,7 @@ public static long[] set(long[] arr, int idx, long v) { return arr; } else { - long[] tmp = new long[Math.max(idx, arr.length) + 1]; + long[] tmp = new long[idx + 1]; System.arraycopy(arr, 0, tmp, 0, arr.length); tmp[idx] = v; return tmp; @@ -139,7 +139,7 @@ public static float[] set(float[] arr, int idx, float v) { return arr; } else { - float[] tmp = new float[Math.max(idx, arr.length) + 1]; + float[] tmp = new float[idx + 1]; System.arraycopy(arr, 0, tmp, 0, arr.length); tmp[idx] = v; return tmp; @@ -153,7 +153,7 @@ public static double[] set(double[] arr, int idx, double v) { return arr; } else { - double[] tmp = new double[Math.max(idx, arr.length) + 1]; + double[] tmp = new double[idx + 1]; System.arraycopy(arr, 0, tmp, 0, arr.length); tmp[idx] = v; return tmp; diff --git a/src/main/java/pro/fessional/mirana/data/DataResult.java b/src/main/java/pro/fessional/mirana/data/DataResult.java index 47d968e..894da3b 100644 --- a/src/main/java/pro/fessional/mirana/data/DataResult.java +++ b/src/main/java/pro/fessional/mirana/data/DataResult.java @@ -41,7 +41,7 @@ default boolean isSuccess() { */ default boolean hasMessage() { String msg = getMessage(); - return msg != null && msg.length() > 0; + return msg != null && !msg.isEmpty(); } /** diff --git a/src/main/java/pro/fessional/mirana/data/Z.java b/src/main/java/pro/fessional/mirana/data/Z.java index 4044441..bed8dda 100644 --- a/src/main/java/pro/fessional/mirana/data/Z.java +++ b/src/main/java/pro/fessional/mirana/data/Z.java @@ -139,7 +139,7 @@ static BigDecimal decimalSafe(BigDecimal d, Iterable ts) for (CharSequence t : ts) { if (t != null && t.length() > 0) { String s = t.toString().trim(); - if (s.length() > 0) { + if (!s.isEmpty()) { try { return new BigDecimal(s); } @@ -177,7 +177,7 @@ static Long int64Safe(Long d, Iterable ts) { for (CharSequence t : ts) { if (t != null && t.length() > 0) { String s = t.toString().trim(); - if (s.length() > 0) { + if (!s.isEmpty()) { try { return Long.valueOf(s); } @@ -215,7 +215,7 @@ static Integer int32Safe(Integer d, Iterable ts) { for (CharSequence t : ts) { if (t != null && t.length() > 0) { String s = t.toString().trim(); - if (s.length() > 0) { + if (!s.isEmpty()) { try { return Integer.valueOf(s); } @@ -330,7 +330,7 @@ static String notBlankSafe(String d, Iterable ts) { for (CharSequence t : ts) { if (t != null && t.length() > 0) { String s = t.toString().trim(); - if (s.length() > 0) return s; + if (!s.isEmpty()) return s; } } return d; diff --git a/src/main/java/pro/fessional/mirana/func/Clz.java b/src/main/java/pro/fessional/mirana/func/Clz.java index 8b8c5ba..73fb443 100644 --- a/src/main/java/pro/fessional/mirana/func/Clz.java +++ b/src/main/java/pro/fessional/mirana/func/Clz.java @@ -35,13 +35,12 @@ else if (c == '[') { // Array if (p < 0) throw new RuntimeException("Invalid signature: " + signature); list.add(Class.forName(signature.substring(i, p + 1).replace('/', '.'))); i = p; - break; } else { list.add(Class.forName(signature.substring(i, Math.min(j + 1, len)))); i = j; - break; } + break; } } else if (c == 'B') list.add(byte.class); diff --git a/src/main/java/pro/fessional/mirana/i18n/I18nString.java b/src/main/java/pro/fessional/mirana/i18n/I18nString.java index 9416d1c..8f35d7b 100644 --- a/src/main/java/pro/fessional/mirana/i18n/I18nString.java +++ b/src/main/java/pro/fessional/mirana/i18n/I18nString.java @@ -67,7 +67,7 @@ public String getI18n() { @Contract("_ -> this") public I18nString setHint(String hint) { - this.hint = hint == null ? "" : hint;; + this.hint = hint == null ? "" : hint; return this; } @@ -114,8 +114,8 @@ public String getI18nHint() { @Override public String toString() { - if (i18n != null && i18n.length() > 0) return i18n; - if (hint != null && hint.length() > 0) return hint; + if (i18n != null && !i18n.isEmpty()) return i18n; + if (hint != null && !hint.isEmpty()) return hint; return code; } diff --git a/src/main/java/pro/fessional/mirana/id/LightIdBufferedProvider.java b/src/main/java/pro/fessional/mirana/id/LightIdBufferedProvider.java index 578abd4..a6ccfcf 100644 --- a/src/main/java/pro/fessional/mirana/id/LightIdBufferedProvider.java +++ b/src/main/java/pro/fessional/mirana/id/LightIdBufferedProvider.java @@ -200,13 +200,15 @@ public boolean setMinCount(int n) { /** * Whether to preload a fixed count of ids. - * fixed if greater than zero, dynamic otherwise + * fixed if ge FIX_COUNT, dynamic otherwise * - * @param n count, Fixed count if greater than 0 + * @param n count, Fixed count if ge FIX_COUNT * @return success or not * @see #FIX_COUNT */ public boolean setFixCount(int n) { + if (n < FIX_COUNT) return false; + loadFixCount = n; return true; } diff --git a/src/main/java/pro/fessional/mirana/page/PageResult.java b/src/main/java/pro/fessional/mirana/page/PageResult.java index ae4e8f9..627aac5 100644 --- a/src/main/java/pro/fessional/mirana/page/PageResult.java +++ b/src/main/java/pro/fessional/mirana/page/PageResult.java @@ -237,7 +237,7 @@ public PageResult addData(E e) { @Contract("_->this") public PageResult addData(Collection ds) { - if (ds != null && ds.size() > 0) { + if (ds != null && !ds.isEmpty()) { Collection data = getData(); if (data == empty) { data = new ArrayList<>(size > 0 ? size : 20); @@ -250,7 +250,7 @@ public PageResult addData(Collection ds) { @Override public boolean hasData() { final Collection data = getData(); - return data.size() > 0; + return !data.isEmpty(); } @NotNull diff --git a/src/main/java/pro/fessional/mirana/page/PageUtil.java b/src/main/java/pro/fessional/mirana/page/PageUtil.java index 1ce6f14..ac2be43 100644 --- a/src/main/java/pro/fessional/mirana/page/PageUtil.java +++ b/src/main/java/pro/fessional/mirana/page/PageUtil.java @@ -99,7 +99,7 @@ public Sb(StringBuilder sb) { @Contract("_,_->this") public Sb by(String key, boolean asc) { - if (key != null && key.length() > 0) { + if (key != null && !key.isEmpty()) { buf.append(SORT_DELI); if (!asc) buf.append(SORT_DESC); buf.append(key); diff --git a/src/main/java/pro/fessional/mirana/pain/ThrowableUtil.java b/src/main/java/pro/fessional/mirana/pain/ThrowableUtil.java index 523fd37..f1d7ae3 100644 --- a/src/main/java/pro/fessional/mirana/pain/ThrowableUtil.java +++ b/src/main/java/pro/fessional/mirana/pain/ThrowableUtil.java @@ -54,12 +54,12 @@ private static void print(@Out final Appendable buffer, final Throwable t, final boolean caused = c != null; try { if (reverse) { - if (caused) print(buffer, c, reverse, shorten, stack, max, nextDepth); - doPrint(buffer, t, reverse, shorten, !caused, caused ? stack : Integer.MAX_VALUE, cur); + if (caused) print(buffer, c, true, shorten, stack, max, nextDepth); + doPrint(buffer, t, true, shorten, !caused, caused ? stack : Integer.MAX_VALUE, cur); } else { - doPrint(buffer, t, reverse, shorten, !caused, caused ? stack : Integer.MAX_VALUE, cur); - if (caused) print(buffer, c, reverse, shorten, stack, max, nextDepth); + doPrint(buffer, t, false, shorten, !caused, caused ? stack : Integer.MAX_VALUE, cur); + if (caused) print(buffer, c, false, shorten, stack, max, nextDepth); } } catch (IOException e) { @@ -164,7 +164,7 @@ public static Throwable root(Throwable t) { t = x; } } - return t; + return null; } /** diff --git a/src/main/java/pro/fessional/mirana/stat/GitStat.java b/src/main/java/pro/fessional/mirana/stat/GitStat.java index 0913100..b558704 100644 --- a/src/main/java/pro/fessional/mirana/stat/GitStat.java +++ b/src/main/java/pro/fessional/mirana/stat/GitStat.java @@ -197,7 +197,7 @@ public static String trimFile(String... str) { StringBuilder out = new StringBuilder(); ByteArrayOutputStream buf = new ByteArrayOutputStream(); for (String s : str) { - if (s == null || s.length() == 0) continue; + if (s == null || s.isEmpty()) continue; for (int i = 0, len = s.length(); i < len; i++) { char c = s.charAt(i); diff --git a/src/main/java/pro/fessional/mirana/text/BuilderHelper.java b/src/main/java/pro/fessional/mirana/text/BuilderHelper.java index 6f5aa6c..1cfc565 100644 --- a/src/main/java/pro/fessional/mirana/text/BuilderHelper.java +++ b/src/main/java/pro/fessional/mirana/text/BuilderHelper.java @@ -334,11 +334,13 @@ public W append(char c) { } @Override + @NotNull public IntStream chars() { return builder.chars(); } @Override + @NotNull public IntStream codePoints() { return builder.codePoints(); } @@ -354,6 +356,7 @@ public char charAt(int index) { } @Override + @NotNull public CharSequence subSequence(int start, int end) { return builder.subSequence(start, end); } diff --git a/src/main/java/pro/fessional/mirana/text/HalfCharUtil.java b/src/main/java/pro/fessional/mirana/text/HalfCharUtil.java index 978d664..5abbd8b 100644 --- a/src/main/java/pro/fessional/mirana/text/HalfCharUtil.java +++ b/src/main/java/pro/fessional/mirana/text/HalfCharUtil.java @@ -19,7 +19,8 @@ public static String half(CharSequence cs) { if (c == '\u3000') { c = ' '; } - else if (c > '\uFF00' && c < '\uFF5F') { + else //noinspection UnnecessaryUnicodeEscape + if (c > '\uFF00' && c < '\uFF5F') { c = (char) (c - 65248); } sb.append(c); @@ -31,7 +32,8 @@ public static char half(char c) { if (c == '\u3000') { c = ' '; } - else if (c > '\uFF00' && c < '\uFF5F') { + else //noinspection UnnecessaryUnicodeEscape + if (c > '\uFF00' && c < '\uFF5F') { c = (char) (c - 65248); } return c; diff --git a/src/main/java/pro/fessional/mirana/text/StringTemplate.java b/src/main/java/pro/fessional/mirana/text/StringTemplate.java index 3b236e5..164135d 100644 --- a/src/main/java/pro/fessional/mirana/text/StringTemplate.java +++ b/src/main/java/pro/fessional/mirana/text/StringTemplate.java @@ -79,7 +79,7 @@ private B(boolean fix, String txt) { @NotNull @Contract("_,_->this") public B bindStr(String str, Object obj) { - if (str != null && str.length() > 0) { + if (str != null && !str.isEmpty()) { final K k = new K(false, str, keys.size()); keys.add(k); objs.add(obj); @@ -90,7 +90,7 @@ public B bindStr(String str, Object obj) { @NotNull @Contract("_,_->this") public B bindReg(String reg, Object obj) { - if (reg != null && reg.length() > 0) { + if (reg != null && !reg.isEmpty()) { final K k = new K(true, reg, keys.size()); keys.add(k); objs.add(obj); diff --git a/src/main/java/pro/fessional/mirana/time/DateParser.java b/src/main/java/pro/fessional/mirana/time/DateParser.java index 0ee6719..354f4c1 100644 --- a/src/main/java/pro/fessional/mirana/time/DateParser.java +++ b/src/main/java/pro/fessional/mirana/time/DateParser.java @@ -715,7 +715,7 @@ public int getErrorIndex() { // ///////////////////////////// - enum Ptn { + public enum Ptn { DATE(8, new String[]{"2000", "01", "01"}), TIME(9, new String[]{"00", "00", "00", "000"}), FULL(17, new String[]{"2000", "01", "01", "00", "00", "00", "000"}), diff --git a/src/main/java/pro/fessional/mirana/time/Sleep.java b/src/main/java/pro/fessional/mirana/time/Sleep.java index b861b53..6bbbf12 100644 --- a/src/main/java/pro/fessional/mirana/time/Sleep.java +++ b/src/main/java/pro/fessional/mirana/time/Sleep.java @@ -59,6 +59,7 @@ public static void snoozeInterrupt(long ms) { boolean rup = false; do { try { + //noinspection BusyWait Thread.sleep(ms); break; } diff --git a/src/main/java/pro/fessional/mirana/time/ThreadNow.java b/src/main/java/pro/fessional/mirana/time/ThreadNow.java index 74bae15..da60bb5 100644 --- a/src/main/java/pro/fessional/mirana/time/ThreadNow.java +++ b/src/main/java/pro/fessional/mirana/time/ThreadNow.java @@ -61,6 +61,7 @@ public static ZoneId sysZoneId() { * * @see #UtcTimeZone */ + @SuppressWarnings("SameReturnValue") public static TimeZone utcTimeZone() { return UtcTimeZone; } @@ -70,6 +71,7 @@ public static TimeZone utcTimeZone() { * * @see #UtcZoneId */ + @SuppressWarnings("SameReturnValue") public static ZoneId utcZoneId() { return UtcZoneId; }