You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by cz...@apache.org on 2025/09/10 09:04:25 UTC
(sling-samples) 01/29: Upgrade project to Java 17 using openrewrite.
This is an automated email from the ASF dual-hosted git repository.
cziegeler pushed a commit to branch appmod/java-upgrade-20250910060318
in repository https://gitbox.apache.org/repos/asf/sling-samples.git
commit ffba89e86b8caf2c5c44b76798afa548bdf68482
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Wed Sep 10 08:07:28 2025 +0200
Upgrade project to Java 17 using openrewrite.
---
slingshot/pom.xml | 2 ++
.../apache/sling/sample/slingshot/comments/impl/CommentPostServlet.java | 1 +
.../apache/sling/sample/slingshot/ratings/impl/RatingPostServlet.java | 1 +
3 files changed, 4 insertions(+)
diff --git a/slingshot/pom.xml b/slingshot/pom.xml
index bd9c1ab..c80f2db 100644
--- a/slingshot/pom.xml
+++ b/slingshot/pom.xml
@@ -34,6 +34,8 @@
<!-- Properties -->
<properties>
+ <maven.compiler.source>17</maven.compiler.source>
+ <maven.compiler.target>17</maven.compiler.target>
<!-- If you set this to true, the scripts are mounted through the file resource provider! -->
<fileMount>false</fileMount>
</properties>
diff --git a/slingshot/src/main/java/org/apache/sling/sample/slingshot/comments/impl/CommentPostServlet.java b/slingshot/src/main/java/org/apache/sling/sample/slingshot/comments/impl/CommentPostServlet.java
index 560913b..d2cf258 100644
--- a/slingshot/src/main/java/org/apache/sling/sample/slingshot/comments/impl/CommentPostServlet.java
+++ b/slingshot/src/main/java/org/apache/sling/sample/slingshot/comments/impl/CommentPostServlet.java
@@ -45,6 +45,7 @@ import org.slf4j.LoggerFactory;
})
public class CommentPostServlet extends SlingAllMethodsServlet {
+ @Serial
private static final long serialVersionUID = 1L;
private final Logger logger = LoggerFactory.getLogger(this.getClass());
diff --git a/slingshot/src/main/java/org/apache/sling/sample/slingshot/ratings/impl/RatingPostServlet.java b/slingshot/src/main/java/org/apache/sling/sample/slingshot/ratings/impl/RatingPostServlet.java
index 5e2abe7..7f6edfe 100644
--- a/slingshot/src/main/java/org/apache/sling/sample/slingshot/ratings/impl/RatingPostServlet.java
+++ b/slingshot/src/main/java/org/apache/sling/sample/slingshot/ratings/impl/RatingPostServlet.java
@@ -49,6 +49,7 @@ property={
})
public class RatingPostServlet extends SlingAllMethodsServlet {
+ @Serial
private static final long serialVersionUID = 1L;
private final Logger logger = LoggerFactory.getLogger(this.getClass());