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 ccedbd590d0b6e04e3bde1ab58dfc6bfa8ec727c Author: Carsten Ziegeler <[email protected]> AuthorDate: Wed Sep 10 08:41:41 2025 +0200 Updated compiler configuration to Java 17 --- slingshot/.vscode/settings.json | 3 +++ slingshot/pom.xml | 8 +++++--- .../sling/sample/slingshot/ratings/impl/RatingPostServlet.java | 1 + 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/slingshot/.vscode/settings.json b/slingshot/.vscode/settings.json new file mode 100644 index 0000000..e0f15db --- /dev/null +++ b/slingshot/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "java.configuration.updateBuildConfiguration": "automatic" +} \ No newline at end of file diff --git a/slingshot/pom.xml b/slingshot/pom.xml index c80f2db..b6ce4b3 100644 --- a/slingshot/pom.xml +++ b/slingshot/pom.xml @@ -32,10 +32,12 @@ <name>Apache Sling Sample Slingshot</name> - <!-- Properties --> + <!-- Properties --> <properties> - <maven.compiler.source>17</maven.compiler.source> - <maven.compiler.target>17</maven.compiler.target> + <sling.java.version>17</sling.java.version> + <maven.compiler.source>17</maven.compiler.source> + <maven.compiler.target>17</maven.compiler.target> + <maven.compiler.release>17</maven.compiler.release> <!-- 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/ratings/impl/RatingPostServlet.java b/slingshot/src/main/java/org/apache/sling/sample/slingshot/ratings/impl/RatingPostServlet.java index 7f6edfe..25d95e2 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 @@ -18,6 +18,7 @@ package org.apache.sling.sample.slingshot.ratings.impl; import java.io.IOException; import java.io.PrintWriter; +import java.io.Serial; import javax.servlet.Servlet; import javax.servlet.ServletException;
