Skip to content

Commit 53127b8

Browse files
committed
Merge remote-tracking branch 'origin/update-from-template' into develop
2 parents f493484 + cc03283 commit 53127b8

File tree

10 files changed

+83
-33
lines changed

10 files changed

+83
-33
lines changed

.config/checkstyle/checkstyle.xml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
<module name="TreeWalker">
5353
<!-- Checks - sorted alphabetically -->
5454
<module name="ArrayTypeStyle"/>
55+
<module name="AvoidDoubleBraceInitialization"/>
5556
<module name="AvoidStarImport"/>
5657
<module name="ConstantName"/>
5758
<module name="DefaultComesLast"/>
@@ -68,6 +69,11 @@
6869
<module name="FinalParameters"/>
6970
<module name="GenericWhitespace"/>
7071
<module name="HideUtilityClassConstructor"/>
72+
<module name="IllegalCatch">
73+
<!-- https://docs.pmd-code.org/pmd-doc-7.11.0/pmd_rules_java_errorprone.html#avoidcatchingnpe -->
74+
<!-- https://docs.pmd-code.org/pmd-doc-7.11.0/pmd_rules_java_errorprone.html#avoidcatchingthrowable -->
75+
<property name="illegalClassNames" value="Error,Throwable,NullPointerException,java.lang.Error,java.lang.Throwable,java.lang.NullPointerException"/>
76+
</module>
7177
<module name="IllegalImport"/>
7278
<module name="InterfaceIsType"/>
7379
<module name="JavadocStyle">
@@ -93,7 +99,6 @@
9399
<module name="MethodParamPad"/>
94100
<module name="MissingDeprecated"/>
95101
<module name="MissingOverride"/>
96-
<module name="MissingSwitchDefault"/>
97102
<module name="ModifierOrder"/>
98103
<module name="NeedBraces"/>
99104
<module name="NoClone"/>
@@ -122,7 +127,13 @@
122127
</module>
123128
<module name="TypecastParenPad"/>
124129
<module name="TypeName"/>
130+
<module name="UnnecessaryParentheses"/>
131+
<module name="UnnecessarySemicolonAfterOuterTypeDeclaration"/>
132+
<module name="UnnecessarySemicolonAfterTypeMemberDeclaration"/>
133+
<module name="UnnecessarySemicolonInEnumeration"/>
134+
<module name="UnnecessarySemicolonInTryWithResources"/>
125135
<module name="UnusedImports"/>
136+
<module name="UnusedLocalVariable"/>
126137
<module name="UpperEll"/>
127138
<module name="VisibilityModifier">
128139
<property name="packageAllowed" value="true"/>

.config/pmd/ruleset.xml

Lines changed: 39 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,38 @@
1010

1111
<!-- Only rules that don't overlap with CheckStyle! -->
1212

13+
<rule ref="category/java/bestpractices.xml/AvoidPrintStackTrace"/>
14+
<rule ref="category/java/bestpractices.xml/AvoidStringBufferField"/>
1315
<rule ref="category/java/bestpractices.xml/AvoidUsingHardCodedIP"/>
16+
<rule ref="category/java/bestpractices.xml/ConstantsInInterface"/>
17+
<rule ref="category/java/bestpractices.xml/ExhaustiveSwitchHasDefault"/>
18+
<rule ref="category/java/bestpractices.xml/LiteralsFirstInComparisons"/>
19+
<!-- CheckStyle can't handle this switch behavior -> delegated to PMD -->
20+
<rule ref="category/java/bestpractices.xml/NonExhaustiveSwitch"/>
21+
<rule ref="category/java/bestpractices.xml/OneDeclarationPerLine">
22+
<properties>
23+
<property name="strictMode" value="true"/>
24+
</properties>
25+
</rule>
1426
<rule ref="category/java/bestpractices.xml/PreserveStackTrace"/>
27+
<rule ref="category/java/bestpractices.xml/SimplifiableTestAssertion"/>
28+
<rule ref="category/java/bestpractices.xml/SystemPrintln"/>
29+
<rule ref="category/java/bestpractices.xml/UnusedAssignment"/>
30+
<rule ref="category/java/bestpractices.xml/UnusedFormalParameter"/>
31+
<rule ref="category/java/bestpractices.xml/UnusedPrivateField"/>
32+
<rule ref="category/java/bestpractices.xml/UnusedPrivateMethod"/>
1533
<rule ref="category/java/bestpractices.xml/UseCollectionIsEmpty"/>
34+
<rule ref="category/java/bestpractices.xml/UseEnumCollections"/>
1635
<rule ref="category/java/bestpractices.xml/UseStandardCharsets"/>
36+
<rule ref="category/java/bestpractices.xml/UseTryWithResources"/>
1737

1838
<!-- Native code is platform dependent; Loading external native libs might pose a security threat -->
1939
<rule ref="category/java/codestyle.xml/AvoidUsingNativeCode"/>
2040
<rule ref="category/java/codestyle.xml/IdenticalCatchBranches"/>
41+
<rule ref="category/java/codestyle.xml/LambdaCanBeMethodReference"/>
2142
<rule ref="category/java/codestyle.xml/NoPackage"/>
2243
<rule ref="category/java/codestyle.xml/PrematureDeclaration"/>
44+
<rule ref="category/java/codestyle.xml/UnnecessarySemicolon"/>
2345

2446
<rule ref="category/java/design.xml">
2547
<!-- Sometimes abstract classes have just fields -->
@@ -76,9 +98,6 @@
7698

7799
<!-- Limit too low -->
78100
<exclude name="UseObjectForClearerAPI"/>
79-
80-
<!-- Handled by checkstyle -->
81-
<exclude name="UseUtilityClass"/>
82101
</rule>
83102

84103
<rule ref="category/java/design.xml/AvoidDeeplyNestedIfStmts">
@@ -114,17 +133,33 @@
114133
</properties>
115134
</rule>
116135

136+
<rule ref="category/java/errorprone.xml/AssignmentToNonFinalStatic"/>
137+
<rule ref="category/java/errorprone.xml/AvoidDecimalLiteralsInBigDecimalConstructor"/>
138+
<rule ref="category/java/errorprone.xml/AvoidMultipleUnaryOperators"/>
117139
<rule ref="category/java/errorprone.xml/AvoidUsingOctalValues"/>
118140
<rule ref="category/java/errorprone.xml/BrokenNullCheck"/>
119141
<rule ref="category/java/errorprone.xml/ComparisonWithNaN"/>
120142
<rule ref="category/java/errorprone.xml/DoNotCallGarbageCollectionExplicitly"/>
121143
<rule ref="category/java/errorprone.xml/DontImportSun"/>
144+
<rule ref="category/java/errorprone.xml/DontUseFloatTypeForLoopIndices"/>
145+
<rule ref="category/java/errorprone.xml/EqualsNull"/>
146+
<rule ref="category/java/errorprone.xml/IdempotentOperations"/>
147+
<rule ref="category/java/errorprone.xml/ImplicitSwitchFallThrough"/>
148+
<rule ref="category/java/errorprone.xml/InstantiationToGetClass"/>
149+
<rule ref="category/java/errorprone.xml/InvalidLogMessageFormat"/>
150+
<rule ref="category/java/errorprone.xml/JumbledIncrementer"/>
122151
<rule ref="category/java/errorprone.xml/MisplacedNullCheck"/>
152+
<rule ref="category/java/errorprone.xml/MoreThanOneLogger"/>
153+
<rule ref="category/java/errorprone.xml/NonStaticInitializer"/>
154+
<rule ref="category/java/errorprone.xml/ReturnFromFinallyBlock"/>
155+
<rule ref="category/java/errorprone.xml/SingletonClassReturningNewInstance"/>
156+
<rule ref="category/java/errorprone.xml/UnconditionalIfStatement"/>
123157
<rule ref="category/java/errorprone.xml/UnnecessaryCaseChange"/>
158+
<rule ref="category/java/errorprone.xml/UselessOperationOnImmutable"/>
124159

125160

126161
<rule ref="category/java/multithreading.xml">
127-
<!-- Just bloats code -->
162+
<!-- Just bloats code; improved in JEP-491/Java 24+ -->
128163
<exclude name="AvoidSynchronizedAtMethodLevel"/>
129164

130165
<!-- NOPE -->

.github/workflows/broken-links.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919

2020
- name: Link Checker
2121
id: lychee
22-
uses: lycheeverse/lychee-action@v2
22+
uses: lycheeverse/lychee-action@82202e5e9c2f4ef1a55a3d02563e1cb6041e5332 # v2
2323
with:
2424
fail: false # Don't fail on broken links, create an issue instead
2525

@@ -38,7 +38,7 @@ jobs:
3838

3939
- name: Create Issue From File
4040
if: env.lychee_exit_code != 0
41-
uses: peter-evans/create-issue-from-file@v5
41+
uses: peter-evans/create-issue-from-file@e8ef132d6df98ed982188e460ebb3b5d4ef3a9cd # v5
4242
with:
4343
issue-number: ${{ steps.find-issue.outputs.number }}
4444
title: Link Checker Report

.github/workflows/check-build.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,4 @@ jobs:
116116
name: pmd-report
117117
if-no-files-found: ignore
118118
path: |
119-
target/site/*.html
120-
target/site/css/**
121-
target/site/images/logos/maven-feather.png
122-
target/site/images/external.png
119+
target/reports/**

.github/workflows/release.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
cache: 'maven'
2727

2828
- name: Build with Maven
29-
run: ./mvnw -B clean package
29+
run: ./mvnw -B clean package -T2C
3030

3131
- name: Check for uncommited changes
3232
run: |
@@ -64,7 +64,7 @@ jobs:
6464
run: |
6565
mvnwPath=$(readlink -f ./mvnw)
6666
modules=("") # root
67-
modules+=($(grep -ozP '(?<=module>)[^<]+' 'pom.xml' | tr -d '\0'))
67+
modules+=($(grep -oP '(?<=<module>)[^<]+' 'pom.xml'))
6868
for i in "${modules[@]}"
6969
do
7070
echo "Processing $i/pom.xml"
@@ -89,7 +89,7 @@ jobs:
8989
9090
- name: Create Release
9191
id: create_release
92-
uses: shogo82148/actions-create-release@v1
92+
uses: shogo82148/actions-create-release@e5f206451d4ace2da9916d01f1aef279997f8659 # v1
9393
with:
9494
tag_name: v${{ steps.version.outputs.release }}
9595
release_name: v${{ steps.version.outputs.release }}
@@ -119,7 +119,7 @@ jobs:
119119
git config --global user.name "GitHub Actions"
120120
git pull
121121
122-
- name: Set up JDK Apache Maven Central
122+
- name: Set up JDK OSSRH
123123
uses: actions/setup-java@v4
124124
with: # running setup-java again overwrites the settings.xml
125125
java-version: '17'
@@ -130,7 +130,7 @@ jobs:
130130
gpg-passphrase: MAVEN_GPG_PASSPHRASE
131131
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
132132

133-
- name: Publish to Apache Maven Central
133+
- name: Publish to OSSRH
134134
run: ../mvnw -B deploy -Possrh -DskipTests
135135
env:
136136
MAVEN_CENTRAL_USERNAME: ${{ secrets.S01_OSS_SONATYPE_MAVEN_USERNAME }}
@@ -163,7 +163,7 @@ jobs:
163163
working-directory: ${{ env.PRIMARY_MAVEN_MODULE }}
164164

165165
- name: Deploy to Github pages
166-
uses: peaceiris/actions-gh-pages@v4
166+
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4
167167
with:
168168
github_token: ${{ secrets.GITHUB_TOKEN }}
169169
publish_dir: ./${{ env.PRIMARY_MAVEN_MODULE }}/target/site
@@ -186,7 +186,7 @@ jobs:
186186
run: |
187187
mvnwPath=$(readlink -f ./mvnw)
188188
modules=("") # root
189-
modules+=($(grep -ozP '(?<=module>)[^<]+' 'pom.xml' | tr -d '\0'))
189+
modules+=($(grep -oP '(?<=<module>)[^<]+' 'pom.xml'))
190190
for i in "${modules[@]}"
191191
do
192192
echo "Processing $i/pom.xml"

.github/workflows/sync-labels.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ jobs:
2020
with:
2121
sparse-checkout: .github/labels.yml
2222

23-
- uses: EndBug/label-sync@v2
23+
- uses: EndBug/label-sync@52074158190acb45f3077f9099fea818aa43f97a # v2
2424
with:
2525
config-file: .github/labels.yml

.github/workflows/update-from-template.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ jobs:
202202
GH_TOKEN: ${{ secrets.UPDATE_FROM_TEMPLATE_PAT }}
203203
run: |
204204
not_failed_conclusion="skipped|neutral|success"
205-
not_relevant_app_slug="dependabot|github-pages|sonarcloud"
205+
not_relevant_app_slug="dependabot|github-pages|sonarqubecloud"
206206
207207
echo "Waiting for checks to start..."
208208
sleep 40s
@@ -212,7 +212,7 @@ jobs:
212212
213213
echo "Checking if update-branch-merged exists"
214214
git fetch
215-
if [[ $(git rev-parse origin/${{ env.UPDATE_BRANCH_MERGED }}) ]]; then
215+
if [[ $(git ls-remote --heads origin refs/heads/${{ env.UPDATE_BRANCH_MERGED }}) ]]; then
216216
echo "Branch still exists; Continuing..."
217217
else
218218
echo "Branch origin/${{ env.UPDATE_BRANCH_MERGED }} is missing"

.idea/externalDependencies.xml

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
<licenses>
2727
<license>
28-
<name>Apache License, Version 2.0</name>
28+
<name>Apache-2.0</name>
2929
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
3030
<distribution>repo</distribution>
3131
</license>
@@ -44,7 +44,7 @@
4444
<dependency>
4545
<groupId>com.puppycrawl.tools</groupId>
4646
<artifactId>checkstyle</artifactId>
47-
<version>10.21.2</version>
47+
<version>10.23.1</version>
4848
</dependency>
4949
</dependencies>
5050
<configuration>
@@ -81,12 +81,12 @@
8181
<dependency>
8282
<groupId>net.sourceforge.pmd</groupId>
8383
<artifactId>pmd-core</artifactId>
84-
<version>7.10.0</version>
84+
<version>7.13.0</version>
8585
</dependency>
8686
<dependency>
8787
<groupId>net.sourceforge.pmd</groupId>
8888
<artifactId>pmd-java</artifactId>
89-
<version>7.10.0</version>
89+
<version>7.13.0</version>
9090
</dependency>
9191
</dependencies>
9292
</plugin>

spring-data-eclipse-store-migration/pom.xml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535

3636
<licenses>
3737
<license>
38-
<name>Apache License, Version 2.0</name>
38+
<name>Apache-2.0</name>
3939
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
4040
<distribution>repo</distribution>
4141
</license>
@@ -164,15 +164,15 @@
164164
<plugin>
165165
<groupId>org.apache.maven.plugins</groupId>
166166
<artifactId>maven-project-info-reports-plugin</artifactId>
167-
<version>3.8.0</version>
167+
<version>3.9.0</version>
168168
</plugin>
169169
</plugins>
170170
</pluginManagement>
171171
<plugins>
172172
<plugin>
173173
<groupId>com.mycila</groupId>
174174
<artifactId>license-maven-plugin</artifactId>
175-
<version>4.6</version>
175+
<version>5.0.0</version>
176176
<configuration>
177177
<properties>
178178
<email>${project.organization.url}</email>
@@ -201,7 +201,7 @@
201201
<plugin>
202202
<groupId>org.apache.maven.plugins</groupId>
203203
<artifactId>maven-compiler-plugin</artifactId>
204-
<version>3.13.0</version>
204+
<version>3.14.0</version>
205205
<configuration>
206206
<release>${maven.compiler.release}</release>
207207
</configuration>
@@ -253,7 +253,7 @@
253253
<plugin>
254254
<groupId>org.codehaus.mojo</groupId>
255255
<artifactId>flatten-maven-plugin</artifactId>
256-
<version>1.6.0</version>
256+
<version>1.7.0</version>
257257
<configuration>
258258
<flattenMode>ossrh</flattenMode>
259259
</configuration>
@@ -318,7 +318,7 @@
318318
<dependency>
319319
<groupId>com.puppycrawl.tools</groupId>
320320
<artifactId>checkstyle</artifactId>
321-
<version>10.21.2</version>
321+
<version>10.23.1</version>
322322
</dependency>
323323
</dependencies>
324324
<configuration>
@@ -355,12 +355,12 @@
355355
<dependency>
356356
<groupId>net.sourceforge.pmd</groupId>
357357
<artifactId>pmd-core</artifactId>
358-
<version>7.10.0</version>
358+
<version>7.13.0</version>
359359
</dependency>
360360
<dependency>
361361
<groupId>net.sourceforge.pmd</groupId>
362362
<artifactId>pmd-java</artifactId>
363-
<version>7.10.0</version>
363+
<version>7.13.0</version>
364364
</dependency>
365365
</dependencies>
366366
</plugin>

0 commit comments

Comments
 (0)