Skip to content

Commit 90d1dd7

Browse files
committed
Merge remote-tracking branch 'origin/update-from-template' into develop
2 parents 0227b92 + f31305e commit 90d1dd7

File tree

13 files changed

+111
-116
lines changed

13 files changed

+111
-116
lines changed

.config/checkstyle/checkstyle.xml

Lines changed: 9 additions & 1 deletion
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">
@@ -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: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
timeout-minutes: 30
2929
strategy:
3030
matrix:
31-
java: [17, 21, 25]
31+
java: [21, 25]
3232
distribution: [temurin]
3333
steps:
3434
- uses: actions/checkout@v6
@@ -40,15 +40,15 @@ 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') }}
4747
restore-keys: |
4848
${{ runner.os }}-mvn-build-
4949
5050
- name: Cache Vaadin prod bundles
51-
uses: actions/cache@v4
51+
uses: actions/cache@v5
5252
with:
5353
path: |
5454
**/bundles/prod.bundle
@@ -78,7 +78,7 @@ jobs:
7878
fi
7979
8080
- name: Upload demo files
81-
uses: actions/upload-artifact@v5
81+
uses: actions/upload-artifact@v6
8282
with:
8383
name: demo-files-java-${{ matrix.java }}
8484
path: ${{ env.DEMO_MAVEN_MODULE }}/target/${{ env.DEMO_MAVEN_MODULE }}.jar
@@ -90,7 +90,7 @@ jobs:
9090
timeout-minutes: 15
9191
strategy:
9292
matrix:
93-
java: [17]
93+
java: [21]
9494
distribution: [temurin]
9595
steps:
9696
- uses: actions/checkout@v6
@@ -102,15 +102,15 @@ jobs:
102102
java-version: ${{ matrix.java }}
103103

104104
- name: Cache Maven
105-
uses: actions/cache@v4
105+
uses: actions/cache@v5
106106
with:
107107
path: ~/.m2/repository
108108
key: ${{ runner.os }}-mvn-checkstyle-${{ hashFiles('**/pom.xml') }}
109109
restore-keys: |
110110
${{ runner.os }}-mvn-checkstyle-
111111
112112
- name: CheckStyle Cache
113-
uses: actions/cache@v4
113+
uses: actions/cache@v5
114114
with:
115115
path: '**/target/checkstyle-cachefile'
116116
key: ${{ runner.os }}-checkstyle-${{ hashFiles('**/pom.xml') }}
@@ -126,7 +126,7 @@ jobs:
126126
timeout-minutes: 15
127127
strategy:
128128
matrix:
129-
java: [17]
129+
java: [21]
130130
distribution: [temurin]
131131
steps:
132132
- uses: actions/checkout@v6
@@ -138,15 +138,15 @@ jobs:
138138
java-version: ${{ matrix.java }}
139139

140140
- name: Cache Maven
141-
uses: actions/cache@v4
141+
uses: actions/cache@v5
142142
with:
143143
path: ~/.m2/repository
144144
key: ${{ runner.os }}-mvn-pmd-${{ hashFiles('**/pom.xml') }}
145145
restore-keys: |
146146
${{ runner.os }}-mvn-pmd-
147147
148148
- name: PMD Cache
149-
uses: actions/cache@v4
149+
uses: actions/cache@v5
150150
with:
151151
path: '**/target/pmd/pmd.cache'
152152
key: ${{ runner.os }}-pmd-${{ hashFiles('**/pom.xml') }}
@@ -161,7 +161,7 @@ jobs:
161161

162162
- name: Upload report
163163
if: always()
164-
uses: actions/upload-artifact@v5
164+
uses: actions/upload-artifact@v6
165165
with:
166166
name: pmd-report
167167
if-no-files-found: ignore

.github/workflows/release.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ jobs:
2323
- name: Set up JDK
2424
uses: actions/setup-java@v5
2525
with:
26-
java-version: '17'
26+
java-version: '21'
2727
distribution: 'temurin'
2828

2929
# Try to reuse existing cache from check-build
3030
- name: Try restore Maven Cache
31-
uses: actions/cache/restore@v4
31+
uses: actions/cache/restore@v5
3232
with:
3333
path: ~/.m2/repository
3434
key: ${{ runner.os }}-mvn-build-${{ hashFiles('**/pom.xml') }}
@@ -91,7 +91,7 @@ jobs:
9191
9292
- name: Create Release
9393
id: create-release
94-
uses: shogo82148/actions-create-release@28d99e2a5b407558d17c15d0384fc0d7fb625b4c # v1
94+
uses: shogo82148/actions-create-release@559c27ce7eb834825e2b55927c64f6d1bd1db716 # v1
9595
with:
9696
tag_name: v${{ steps.version.outputs.release }}
9797
release_name: v${{ steps.version.outputs.release }}
@@ -130,7 +130,7 @@ jobs:
130130
uses: actions/setup-java@v5
131131
with: # running setup-java overwrites the settings.xml
132132
distribution: 'temurin'
133-
java-version: '17'
133+
java-version: '21'
134134
server-id: github-central
135135
server-password: PACKAGES_CENTRAL_TOKEN
136136
gpg-passphrase: MAVEN_GPG_PASSPHRASE
@@ -147,7 +147,7 @@ jobs:
147147
uses: actions/setup-java@v5
148148
with: # running setup-java again overwrites the settings.xml
149149
distribution: 'temurin'
150-
java-version: '17'
150+
java-version: '21'
151151
server-id: sonatype-central-portal
152152
server-username: MAVEN_CENTRAL_USERNAME
153153
server-password: MAVEN_CENTRAL_TOKEN
@@ -177,12 +177,12 @@ jobs:
177177
- name: Setup - Java
178178
uses: actions/setup-java@v5
179179
with:
180-
java-version: '17'
180+
java-version: '21'
181181
distribution: 'temurin'
182182

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

.github/workflows/test-deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
uses: actions/setup-java@v5
1818
with: # running setup-java overwrites the settings.xml
1919
distribution: 'temurin'
20-
java-version: '17'
20+
java-version: '21'
2121
server-id: github-central
2222
server-password: PACKAGES_CENTRAL_TOKEN
2323
gpg-passphrase: MAVEN_GPG_PASSPHRASE
@@ -34,7 +34,7 @@ jobs:
3434
uses: actions/setup-java@v5
3535
with: # running setup-java again overwrites the settings.xml
3636
distribution: 'temurin'
37-
java-version: '17'
37+
java-version: '21'
3838
server-id: sonatype-central-portal
3939
server-username: MAVEN_CENTRAL_USERNAME
4040
server-password: MAVEN_CENTRAL_TOKEN

.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

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[![Published on Vaadin Directory](https://img.shields.io/badge/Vaadin%20Directory-published-00b4f0?logo=vaadin)](https://vaadin.com/directory/component/editable-labels-for-vaadin)
22
[![Latest version](https://img.shields.io/maven-central/v/software.xdev/vaadin-editable-label?logo=apache%20maven)](https://mvnrepository.com/artifact/software.xdev/vaadin-editable-label)
33
[![Build](https://img.shields.io/github/actions/workflow/status/xdev-software/vaadin-editable-label/check-build.yml?branch=develop)](https://github.com/xdev-software/vaadin-editable-label/actions/workflows/check-build.yml?query=branch%3Adevelop)
4-
![Vaadin 24+](https://img.shields.io/badge/Vaadin%20Platform/Flow-24+-00b4f0)
4+
![Vaadin 25+](https://img.shields.io/badge/Vaadin%20Platform/Flow-25+-00b4f0)
55

66
# Editable Labels for Vaadin
77
A Vaadin Flow implementation for editable labels

pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
<dependency>
4646
<groupId>com.puppycrawl.tools</groupId>
4747
<artifactId>checkstyle</artifactId>
48-
<version>12.1.2</version>
48+
<version>13.0.0</version>
4949
</dependency>
5050
</dependencies>
5151
<configuration>
@@ -83,12 +83,12 @@
8383
<dependency>
8484
<groupId>net.sourceforge.pmd</groupId>
8585
<artifactId>pmd-core</artifactId>
86-
<version>7.18.0</version>
86+
<version>7.20.0</version>
8787
</dependency>
8888
<dependency>
8989
<groupId>net.sourceforge.pmd</groupId>
9090
<artifactId>pmd-java</artifactId>
91-
<version>7.18.0</version>
91+
<version>7.20.0</version>
9292
</dependency>
9393
</dependencies>
9494
</plugin>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Delay install of newly released packages to prevent supply chain attacks
2+
minimumReleaseAge: 180 # 3h
3+
overrides:
4+
# Remove unused packages
5+
# glob CLI unused
6+
"jackspeak": "npm:empty-npm-package@1.0.0"
7+
"foreground-child": "npm:empty-npm-package@1.0.0"
8+
"package-json-from-dist": "npm:empty-npm-package@1.0.0"
9+
# rollup-plugin-visualizer CLI unused
10+
"yargs": "npm:empty-npm-package@1.0.0"
11+
"open": "npm:empty-npm-package@1.0.0"
12+
# transform-ast test only
13+
"nanobench": "npm:empty-npm-package@1.0.0"
14+
# Workbox unused
15+
"workbox-google-analytics": "npm:empty-npm-package@1.0.0"
16+
"@surma/rollup-plugin-off-main-thread": "npm:empty-npm-package@1.0.0"
17+
"@babel/preset-env": "npm:empty-npm-package@1.0.0"
18+
"@babel/runtime": "npm:empty-npm-package@1.0.0"
19+
"@rollup/plugin-replace@2.4.2": "npm:empty-npm-package@1.0.0"
20+
"@rollup/plugin-babel": "npm:empty-npm-package@1.0.0"
21+
"@rollup/plugin-node-resolve": "npm:empty-npm-package@1.0.0"
22+
"@rollup/plugin-terser": "npm:empty-npm-package@1.0.0"
23+
"tempy": "npm:empty-npm-package@1.0.0"
24+
# Disable telemetry
25+
"@vaadin/vaadin-usage-statistics": "npm:empty-npm-package@1.0.0"

0 commit comments

Comments
 (0)