Skip to content

Commit bd05bfa

Browse files
authored
Merge pull request #517 from xdev-software/develop
Release
2 parents 94394b8 + e9f7824 commit bd05bfa

File tree

24 files changed

+138
-94
lines changed

24 files changed

+138
-94
lines changed

.config/checkstyle/checkstyle.xml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,11 @@
7474
<!-- https://docs.pmd-code.org/pmd-doc-7.11.0/pmd_rules_java_errorprone.html#avoidcatchingthrowable -->
7575
<property name="illegalClassNames" value="Error,Throwable,NullPointerException,java.lang.Error,java.lang.Throwable,java.lang.NullPointerException"/>
7676
</module>
77+
<!-- Do not allow params and vars to end with collection type names -->
78+
<module name="IllegalIdentifierName">
79+
<property name="format" value="^(?!(.*(Map|List|Set))$).+$"/>
80+
<property name="tokens" value="PARAMETER_DEF, VARIABLE_DEF, PATTERN_VARIABLE_DEF, RECORD_COMPONENT_DEF, LAMBDA"/>
81+
</module>
7782
<module name="IllegalImport"/>
7883
<module name="InterfaceIsType"/>
7984
<module name="JavadocStyle">
@@ -91,7 +96,7 @@
9196
<property name="ignoreFieldDeclaration" value="true"/>
9297
<property name="ignoreHashCodeMethod" value="true"/>
9398
<!-- Defaults + other common constant values (e.g. time) -->
94-
<property name="ignoreNumbers" value="-1, 0, 1, 2, 3, 4, 5, 10, 12, 24, 31, 60, 100, 1000"/>
99+
<property name="ignoreNumbers" value="-1, 0, 1, 2, 3, 4, 5, 8, 10, 12, 16, 24, 25, 31, 32, 50, 60, 64, 100, 128, 200, 256, 500, 512, 1000, 1024, 2000, 2048, 4000, 4096, 8000, 8192"/>
95100
</module>
96101
<module name="MemberName"/>
97102
<module name="MethodLength"/>
@@ -122,7 +127,10 @@
122127
<module name="StaticVariableName"/>
123128
<module name="StringLiteralEquality"/>
124129
<module name="SuppressWarningsHolder"/>
125-
<module name="TodoComment"/>
130+
<module name="TodoComment">
131+
<!-- Default is "TODO:" -->
132+
<property name="format" value="(?i)(TODO)"/>
133+
</module>
126134
<module name="TypecastParenPad"/>
127135
<module name="TypeName"/>
128136
<module name="UnnecessaryParentheses"/>

.config/pmd/java/ruleset.xml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,30 @@ If you are 100% sure that you escaped the value properly and you have no better
394394
</properties>
395395
</rule>
396396

397+
<!-- Jakarta Persistence -->
398+
<rule name="AvoidListAsEntityRelation"
399+
language="java"
400+
message="Use a Set instead of a List in entity relations"
401+
class="net.sourceforge.pmd.lang.rule.xpath.XPathRule"
402+
externalInfoUrl="https://www.baeldung.com/spring-jpa-onetomany-list-vs-set#bd-pros-and-cons">
403+
<description>
404+
`List` allows duplicates while a `Set` does not.
405+
A `Set` also prevents duplicates when the ORM reads multiple identical rows from the database (e.g. when using JOIN).
406+
</description>
407+
<priority>2</priority>
408+
<properties>
409+
<property name="xpath">
410+
<value>
411+
<![CDATA[
412+
//ClassDeclaration[pmd-java:hasAnnotation('jakarta.persistence.Entity')]
413+
//FieldDeclaration[pmd-java:hasAnnotation('jakarta.persistence.ManyToMany') or pmd-java:hasAnnotation('jakarta.persistence.OneToMany')]
414+
/ClassType[pmd-java:typeIs('java.util.List')]
415+
]]>
416+
</value>
417+
</property>
418+
</properties>
419+
</rule>
420+
397421

398422
<!-- Rules from JPinPoint with slight modifications -->
399423
<!-- https://github.com/jborgers/PMD-jPinpoint-rules -->

.github/workflows/check-build.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
java-version: ${{ matrix.java }}
4141

4242
- name: Cache Maven
43-
uses: actions/cache@v4
43+
uses: actions/cache@v5
4444
with:
4545
path: ~/.m2/repository
4646
key: ${{ runner.os }}-mvn-build-${{ hashFiles('**/pom.xml') }}
@@ -86,15 +86,15 @@ jobs:
8686
java-version: ${{ matrix.java }}
8787

8888
- name: Cache Maven
89-
uses: actions/cache@v4
89+
uses: actions/cache@v5
9090
with:
9191
path: ~/.m2/repository
9292
key: ${{ runner.os }}-mvn-checkstyle-${{ hashFiles('**/pom.xml') }}
9393
restore-keys: |
9494
${{ runner.os }}-mvn-checkstyle-
9595
9696
- name: CheckStyle Cache
97-
uses: actions/cache@v4
97+
uses: actions/cache@v5
9898
with:
9999
path: '**/target/checkstyle-cachefile'
100100
key: ${{ runner.os }}-checkstyle-${{ hashFiles('**/pom.xml') }}
@@ -122,15 +122,15 @@ jobs:
122122
java-version: ${{ matrix.java }}
123123

124124
- name: Cache Maven
125-
uses: actions/cache@v4
125+
uses: actions/cache@v5
126126
with:
127127
path: ~/.m2/repository
128128
key: ${{ runner.os }}-mvn-pmd-${{ hashFiles('**/pom.xml') }}
129129
restore-keys: |
130130
${{ runner.os }}-mvn-pmd-
131131
132132
- name: PMD Cache
133-
uses: actions/cache@v4
133+
uses: actions/cache@v5
134134
with:
135135
path: '**/target/pmd/pmd.cache'
136136
key: ${{ runner.os }}-pmd-${{ hashFiles('**/pom.xml') }}
@@ -145,7 +145,7 @@ jobs:
145145

146146
- name: Upload report
147147
if: always()
148-
uses: actions/upload-artifact@v5
148+
uses: actions/upload-artifact@v6
149149
with:
150150
name: pmd-report
151151
if-no-files-found: ignore

.github/workflows/release.yml

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

2626
# Try to reuse existing cache from check-build
2727
- name: Try restore Maven Cache
28-
uses: actions/cache/restore@v4
28+
uses: actions/cache/restore@v5
2929
with:
3030
path: ~/.m2/repository
3131
key: ${{ runner.os }}-mvn-build-${{ hashFiles('**/pom.xml') }}
@@ -87,7 +87,7 @@ jobs:
8787
8888
- name: Create Release
8989
id: create-release
90-
uses: shogo82148/actions-create-release@28d99e2a5b407558d17c15d0384fc0d7fb625b4c # v1
90+
uses: shogo82148/actions-create-release@559c27ce7eb834825e2b55927c64f6d1bd1db716 # v1
9191
with:
9292
tag_name: v${{ steps.version.outputs.release }}
9393
release_name: v${{ steps.version.outputs.release }}
@@ -187,7 +187,7 @@ jobs:
187187

188188
# Try to reuse existing cache from check-build
189189
- name: Try restore Maven Cache
190-
uses: actions/cache/restore@v4
190+
uses: actions/cache/restore@v5
191191
with:
192192
path: ~/.m2/repository
193193
key: ${{ runner.os }}-mvn-build-${{ hashFiles('**/pom.xml') }}

.github/workflows/run-integration-tests.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,15 @@ jobs:
4141
with:
4242
distribution: temurin
4343
java-version: ${{ matrix.java }}
44-
cache: 'maven'
44+
45+
- name: Cache Maven
46+
uses: actions/cache@v5
47+
with:
48+
path: ~/.m2/repository
49+
key: ${{ runner.os }}-mvn-it-build-${{ hashFiles('**/pom.xml') }}
50+
restore-keys: |
51+
${{ runner.os }}-mvn-it-build-
52+
${{ runner.os }}-mvn-build-
4553
4654
- name: Test
4755
run: |
@@ -60,7 +68,7 @@ jobs:
6068

6169
- name: Upload videos of test failures
6270
if: failure()
63-
uses: actions/upload-artifact@v5
71+
uses: actions/upload-artifact@v6
6472
with:
6573
name: test-fail-videos-${{ matrix.java }}-${{ env.PROJECT_NORMALIZED }}-${{ matrix.parallel }}-${{ matrix.pre-start }}
6674
path: advanced-demo/integration-tests/${{ matrix.project }}/target/records

.idea/checkstyle-idea.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
wrapperVersion=3.3.4
22
distributionType=only-script
3-
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.11/apache-maven-3.9.11-bin.zip
3+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.12/apache-maven-3.9.12-bin.zip

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# 2.9.5
2+
* Updated dependencies
3+
14
# 2.9.4
25
* Selenium
36
* Hide download popup by default in Firefox so that UI is not blocked
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
wrapperVersion=3.3.4
22
distributionType=only-script
3-
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.11/apache-maven-3.9.11-bin.zip
3+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.12/apache-maven-3.9.12-bin.zip

advanced-demo/integration-tests/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,14 @@
6767
<dependency>
6868
<groupId>org.seleniumhq.selenium</groupId>
6969
<artifactId>selenium-dependencies-bom</artifactId>
70-
<version>4.38.0</version>
70+
<version>4.40.0</version>
7171
<type>pom</type>
7272
<scope>import</scope>
7373
</dependency>
7474
<dependency>
7575
<groupId>org.testcontainers</groupId>
7676
<artifactId>testcontainers-bom</artifactId>
77-
<version>2.0.2</version>
77+
<version>2.0.3</version>
7878
<type>pom</type>
7979
<scope>import</scope>
8080
</dependency>
@@ -84,7 +84,7 @@
8484
<dependency>
8585
<groupId>org.junit</groupId>
8686
<artifactId>junit-bom</artifactId>
87-
<version>6.0.1</version>
87+
<version>6.0.2</version>
8888
<type>pom</type>
8989
<scope>import</scope>
9090
</dependency>

0 commit comments

Comments
 (0)