diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 28e82c4efdf..df2344f4b72 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -7,7 +7,7 @@ name: "Validate" on: [pull_request, push] env: - JAVA_VERSION: '19' + JAVA_VERSION: '20' JAVA_DISTRO: 'temurin' HELIDON_PIPELINES: 'true' MAVEN_HTTP_ARGS: '-Dmaven.wagon.httpconnectionManager.ttlSeconds=60 -Dmaven.wagon.http.retryHandler.count=3' @@ -24,7 +24,7 @@ jobs: - uses: actions/checkout@v3 with: fetch-depth: 0 - - name: Set up JDK 19 + - name: Set up JDK ${{ env.JAVA_VERSION }} uses: actions/setup-java@v3.6.0 with: distribution: ${{ env.JAVA_DISTRO }} @@ -37,7 +37,7 @@ jobs: runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v3 - - name: Set up JDK 19 + - name: Set up JDK ${{ env.JAVA_VERSION }} uses: actions/setup-java@v3.6.0 with: distribution: ${{ env.JAVA_DISTRO }} @@ -50,7 +50,7 @@ jobs: runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v3 - - name: Set up JDK 19 + - name: Set up JDK ${{ env.JAVA_VERSION }} uses: actions/setup-java@v3.6.0 with: distribution: ${{ env.JAVA_DISTRO }} @@ -63,7 +63,7 @@ jobs: runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v3 - - name: Set up JDK 19 + - name: Set up JDK ${{ env.JAVA_VERSION }} uses: actions/setup-java@v3.6.0 with: distribution: ${{ env.JAVA_DISTRO }} @@ -79,7 +79,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 - - name: Set up JDK 19 + - name: Set up JDK ${{ env.JAVA_VERSION }} uses: actions/setup-java@v3.6.0 with: distribution: ${{ env.JAVA_DISTRO }} @@ -95,7 +95,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 - - name: Set up JDK 19 + - name: Set up JDK ${{ env.JAVA_VERSION }} uses: actions/setup-java@v3.6.0 with: distribution: ${{ env.JAVA_DISTRO }} @@ -115,7 +115,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 - - name: Set up JDK 19 + - name: Set up JDK ${{ env.JAVA_VERSION }} uses: actions/setup-java@v3.6.0 with: distribution: ${{ env.JAVA_DISTRO }} @@ -131,7 +131,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 - - name: Set up JDK 19 + - name: Set up JDK ${{ env.JAVA_VERSION }} uses: actions/setup-java@v3.6.0 with: distribution: ${{ env.JAVA_DISTRO }} @@ -147,7 +147,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 - - name: Set up JDK 19 + - name: Set up JDK ${{ env.JAVA_VERSION }} uses: actions/setup-java@v3.6.0 with: distribution: ${{ env.JAVA_DISTRO }} diff --git a/README.md b/README.md index aa9328a0053..656698373c9 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ Helidon supports two programming models: In either case your application is just a Java SE program. ## Early access branch -This branch requires Java 19 early access release with Loom support. +This branch requires Java 20 early access release with Loom support. Applications written using this version will require `--enable-preview` to be used when starting JVM. Kindly use latest official release to work with Java 17, unless you are interested in the newest and greatest! diff --git a/applications/mp/pom.xml b/applications/mp/pom.xml index 125ae1e547b..01db13152e1 100644 --- a/applications/mp/pom.xml +++ b/applications/mp/pom.xml @@ -35,7 +35,7 @@ 1.0.6 0.14.0 2.7.5.1 - ${version.lib.hibernate} + 6.1.7.Final io.helidon.microprofile.cdi.Main diff --git a/applications/parent/pom.xml b/applications/parent/pom.xml index adfea299c34..2590acbc805 100644 --- a/applications/parent/pom.xml +++ b/applications/parent/pom.xml @@ -35,7 +35,7 @@ UTF-8 UTF-8 - 19 + 20 ${maven.compiler.source} ${maven.compiler.source} 3.8.1 diff --git a/archetypes/helidon/src/main/archetype/common/files/Dockerfile.native.mustache b/archetypes/helidon/src/main/archetype/common/files/Dockerfile.native.mustache index eb27cc0281c..26e49853284 100644 --- a/archetypes/helidon/src/main/archetype/common/files/Dockerfile.native.mustache +++ b/archetypes/helidon/src/main/archetype/common/files/Dockerfile.native.mustache @@ -1,6 +1,6 @@ # 1st stage, build the app -FROM ghcr.io/graalvm/graalvm-ce:ol9-java19-22.3.0 as build +FROM ghcr.io/graalvm/graalvm-ce:ol9-java20-22.3.1 as build # Install native-image RUN gu install native-image diff --git a/builder/processor-tools/src/main/java/io/helidon/builder/processor/tools/ToStringAnnotationValueVisitor.java b/builder/processor-tools/src/main/java/io/helidon/builder/processor/tools/ToStringAnnotationValueVisitor.java index 2d8976742b1..9fdf77d2cdf 100644 --- a/builder/processor-tools/src/main/java/io/helidon/builder/processor/tools/ToStringAnnotationValueVisitor.java +++ b/builder/processor-tools/src/main/java/io/helidon/builder/processor/tools/ToStringAnnotationValueVisitor.java @@ -32,27 +32,27 @@ class ToStringAnnotationValueVisitor implements AnnotationValueVisitor vals, Object o) { } } - String result = String.join(", ", values); - if (mapBlankArrayToNull && result.isBlank()) { - result = null; + if (mapBlankArrayToNull && values.isEmpty()) { + return null; } else if (mapToSourceDeclaration) { - result = "{"; + StringBuilder resultBuilder = new StringBuilder("{"); + for (AnnotationValue val : vals) { String stringVal = val.accept(this, null); if (stringVal != null) { - if (result.length() > 1) { - result += ", "; + if (resultBuilder.length() > 1) { + resultBuilder.append(", "); } - result += stringVal; + resultBuilder.append(stringVal); } } - result += "}"; + + resultBuilder.append("}"); + + return resultBuilder.toString(); } - return result; + return String.join(", ", values); } @Override diff --git a/dependencies/pom.xml b/dependencies/pom.xml index 7dd676084df..5a12c07a68c 100644 --- a/dependencies/pom.xml +++ b/dependencies/pom.xml @@ -44,7 +44,7 @@ 1.2 9.1.6 4.1.2 - 3.0.3 + 4.0.1 4.0.2 2.18.0 2.3.1 @@ -61,7 +61,7 @@ 2.1.212 1.3 4.3.1 - 6.1.4.Final + 6.1.7.Final 7.0.2.Final 5.0.1 1.5.18 diff --git a/etc/scripts/includes/pipeline-env.sh b/etc/scripts/includes/pipeline-env.sh index 3ee715af232..2d8aea3813b 100644 --- a/etc/scripts/includes/pipeline-env.sh +++ b/etc/scripts/includes/pipeline-env.sh @@ -1,5 +1,5 @@ # -# Copyright (c) 2018, 2022 Oracle and/or its affiliates. +# Copyright (c) 2018, 2023 Oracle and/or its affiliates. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -47,7 +47,7 @@ if [ -z "${__PIPELINE_ENV_INCLUDED__}" ]; then . ${WS_DIR}/etc/scripts/includes/error_handlers.sh if [ -z "${GRAALVM_HOME}" ]; then - export GRAALVM_HOME="/tools/graalvm-ce-java19-22.3.0" + export GRAALVM_HOME="/tools/graalvm-ce-java20-22.3.1" fi require_env() { @@ -75,7 +75,7 @@ if [ -z "${__PIPELINE_ENV_INCLUDED__}" ]; then if [ -n "${JENKINS_HOME}" ] ; then export PIPELINE="true" - export JAVA_HOME="/tools/jdk19" + export JAVA_HOME="/tools/jdk20" MAVEN_OPTS="${MAVEN_OPTS} -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn" MAVEN_OPTS="${MAVEN_OPTS} -Dorg.slf4j.simpleLogger.showDateTime=true" MAVEN_OPTS="${MAVEN_OPTS} -Dorg.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss,SSS" diff --git a/examples/integrations/neo4j/neo4j-mp/Dockerfile.native b/examples/integrations/neo4j/neo4j-mp/Dockerfile.native index 8b4b5a9f63e..403c9eba53e 100644 --- a/examples/integrations/neo4j/neo4j-mp/Dockerfile.native +++ b/examples/integrations/neo4j/neo4j-mp/Dockerfile.native @@ -1,5 +1,5 @@ # -# Copyright (c) 2021, 2022 Oracle and/or its affiliates. +# Copyright (c) 2021, 2023 Oracle and/or its affiliates. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -15,7 +15,7 @@ # # 1st stage, build the app -FROM ghcr.io/graalvm/graalvm-ce:ol9-java19-22.3.0 as build +FROM ghcr.io/graalvm/graalvm-ce:ol9-java20-22.3.1 as build # Install native-image RUN gu install native-image diff --git a/examples/integrations/neo4j/neo4j-se/Dockerfile.native b/examples/integrations/neo4j/neo4j-se/Dockerfile.native index cec6ac66574..bc844d3d556 100644 --- a/examples/integrations/neo4j/neo4j-se/Dockerfile.native +++ b/examples/integrations/neo4j/neo4j-se/Dockerfile.native @@ -1,5 +1,5 @@ # -# Copyright (c) 2021, 2022 Oracle and/or its affiliates. +# Copyright (c) 2021, 2023 Oracle and/or its affiliates. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -15,7 +15,7 @@ # # 1st stage, build the app -FROM ghcr.io/graalvm/graalvm-ce:ol9-java19-22.3.0 as build +FROM ghcr.io/graalvm/graalvm-ce:ol9-java20-22.3.1 as build # Install native-image RUN gu install native-image diff --git a/examples/microprofile/http-status-count-mp/src/test/java/io/helidon/examples/mp/httpstatuscount/StatusTest.java b/examples/microprofile/http-status-count-mp/src/test/java/io/helidon/examples/mp/httpstatuscount/StatusTest.java index a124a1d3d1c..35501be0eb3 100644 --- a/examples/microprofile/http-status-count-mp/src/test/java/io/helidon/examples/mp/httpstatuscount/StatusTest.java +++ b/examples/microprofile/http-status-count-mp/src/test/java/io/helidon/examples/mp/httpstatuscount/StatusTest.java @@ -55,7 +55,8 @@ void findStatusMetrics() { @Test void checkStatusMetrics() { - checkAfterStatus(171); + // intermediate responses are not "full" responses and since JDK 20 they are not returned by the client at all + // checkAfterStatus(171); checkAfterStatus(200); checkAfterStatus(201); checkAfterStatus(204); diff --git a/examples/nima/observe/src/main/java/io/helidon/examples/nima/observe/ObserveMain.java b/examples/nima/observe/src/main/java/io/helidon/examples/nima/observe/ObserveMain.java index 071f4fd2b87..722deedaee2 100644 --- a/examples/nima/observe/src/main/java/io/helidon/examples/nima/observe/ObserveMain.java +++ b/examples/nima/observe/src/main/java/io/helidon/examples/nima/observe/ObserveMain.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Oracle and/or its affiliates. + * Copyright (c) 2022, 2023 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -48,7 +48,7 @@ public static void main(String[] args) { .routing(it -> routing(config, it)) .start(); - System.out.println("WEB server is up! http://localhost:" + server.port() + "/greet"); + System.out.println("WEB server is up! http://localhost:" + server.port()); } /** diff --git a/examples/nima/quickstart-standalone/pom.xml b/examples/nima/quickstart-standalone/pom.xml index d5c87945f8f..e5c321a3486 100644 --- a/examples/nima/quickstart-standalone/pom.xml +++ b/examples/nima/quickstart-standalone/pom.xml @@ -29,7 +29,7 @@ UTF-8 UTF-8 - 19 + 20 ${maven.compiler.source} ${maven.compiler.source} diff --git a/examples/quickstarts/helidon-quickstart-mp/Dockerfile.native b/examples/quickstarts/helidon-quickstart-mp/Dockerfile.native index c4470c1d57c..c1cc5e0f29c 100644 --- a/examples/quickstarts/helidon-quickstart-mp/Dockerfile.native +++ b/examples/quickstarts/helidon-quickstart-mp/Dockerfile.native @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2022 Oracle and/or its affiliates. +# Copyright (c) 2020, 2023 Oracle and/or its affiliates. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -15,7 +15,7 @@ # # 1st stage, build the app -FROM ghcr.io/graalvm/graalvm-ce:ol9-java19-22.3.0 as build +FROM ghcr.io/graalvm/graalvm-ce:ol9-java20-22.3.1 as build # Install native-image RUN gu install native-image diff --git a/examples/quickstarts/helidon-quickstart-se/Dockerfile.native b/examples/quickstarts/helidon-quickstart-se/Dockerfile.native index de40ef33a52..8a66b49f15b 100644 --- a/examples/quickstarts/helidon-quickstart-se/Dockerfile.native +++ b/examples/quickstarts/helidon-quickstart-se/Dockerfile.native @@ -1,5 +1,5 @@ # -# Copyright (c) 2019, 2022 Oracle and/or its affiliates. +# Copyright (c) 2019, 2023 Oracle and/or its affiliates. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -15,7 +15,7 @@ # # 1st stage, build the app -FROM ghcr.io/graalvm/graalvm-ce:ol9-java19-22.3.0 as build +FROM ghcr.io/graalvm/graalvm-ce:ol9-java20-22.3.1 as build # Install native-image RUN gu install native-image diff --git a/examples/quickstarts/helidon-standalone-quickstart-mp/Dockerfile.native b/examples/quickstarts/helidon-standalone-quickstart-mp/Dockerfile.native index 0cfa3515179..8db5ef1733c 100644 --- a/examples/quickstarts/helidon-standalone-quickstart-mp/Dockerfile.native +++ b/examples/quickstarts/helidon-standalone-quickstart-mp/Dockerfile.native @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2022 Oracle and/or its affiliates. +# Copyright (c) 2020, 2023 Oracle and/or its affiliates. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -15,7 +15,7 @@ # # 1st stage, build the app -FROM ghcr.io/graalvm/graalvm-ce:ol9-java19-22.3.0 as build +FROM ghcr.io/graalvm/graalvm-ce:ol9-java20-22.3.1 as build # Install native-image RUN gu install native-image diff --git a/examples/quickstarts/helidon-standalone-quickstart-mp/pom.xml b/examples/quickstarts/helidon-standalone-quickstart-mp/pom.xml index 9b3ad185c94..a4b094e3f7a 100644 --- a/examples/quickstarts/helidon-standalone-quickstart-mp/pom.xml +++ b/examples/quickstarts/helidon-standalone-quickstart-mp/pom.xml @@ -29,7 +29,7 @@ 4.0.0-SNAPSHOT io.helidon.microprofile.cdi.Main - 19 + 20 ${maven.compiler.source} true UTF-8 diff --git a/examples/quickstarts/helidon-standalone-quickstart-se/Dockerfile.native b/examples/quickstarts/helidon-standalone-quickstart-se/Dockerfile.native index 46000ec91f8..a680fae1546 100644 --- a/examples/quickstarts/helidon-standalone-quickstart-se/Dockerfile.native +++ b/examples/quickstarts/helidon-standalone-quickstart-se/Dockerfile.native @@ -1,5 +1,5 @@ # -# Copyright (c) 2019, 2022 Oracle and/or its affiliates. +# Copyright (c) 2019, 2023 Oracle and/or its affiliates. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -15,7 +15,7 @@ # # 1st stage, build the app -FROM ghcr.io/graalvm/graalvm-ce:ol9-java19-22.3.0 as build +FROM ghcr.io/graalvm/graalvm-ce:ol9-java20-22.3.1 as build # Install native-image RUN gu install native-image diff --git a/examples/quickstarts/helidon-standalone-quickstart-se/pom.xml b/examples/quickstarts/helidon-standalone-quickstart-se/pom.xml index b1f68404560..2a50df3e025 100644 --- a/examples/quickstarts/helidon-standalone-quickstart-se/pom.xml +++ b/examples/quickstarts/helidon-standalone-quickstart-se/pom.xml @@ -29,7 +29,7 @@ 4.0.0-SNAPSHOT io.helidon.examples.quickstart.se.Main - 19 + 20 ${maven.compiler.source} true UTF-8 diff --git a/integrations/cdi/eclipselink-cdi/src/main/java/io/helidon/integrations/cdi/eclipselink/CDISEPlatform.java b/integrations/cdi/eclipselink-cdi/src/main/java/io/helidon/integrations/cdi/eclipselink/CDISEPlatform.java index b41853dcaa0..a8707191b4b 100644 --- a/integrations/cdi/eclipselink-cdi/src/main/java/io/helidon/integrations/cdi/eclipselink/CDISEPlatform.java +++ b/integrations/cdi/eclipselink-cdi/src/main/java/io/helidon/integrations/cdi/eclipselink/CDISEPlatform.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2021 Oracle and/or its affiliates. + * Copyright (c) 2019, 2023 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -38,6 +38,7 @@ import org.eclipse.persistence.platform.server.ServerPlatformBase; import org.eclipse.persistence.sessions.DatabaseSession; import org.eclipse.persistence.sessions.DatasourceLogin; +import org.eclipse.persistence.sessions.ExternalTransactionController; import org.eclipse.persistence.sessions.JNDIConnector; import org.eclipse.persistence.sessions.Session; import org.eclipse.persistence.transaction.JTATransactionController; @@ -258,7 +259,7 @@ public void initializeExternalTransactionController() { * @see TransactionController */ @Override - public Class getExternalTransactionControllerClass() { + public Class getExternalTransactionControllerClass() { if (this.externalTransactionControllerClass == null) { this.externalTransactionControllerClass = TransactionController.class; } diff --git a/messaging/connectors/jms/etc/spotbugs/exclude.xml b/messaging/connectors/jms/etc/spotbugs/exclude.xml new file mode 100644 index 00000000000..5aa32330590 --- /dev/null +++ b/messaging/connectors/jms/etc/spotbugs/exclude.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/messaging/connectors/jms/pom.xml b/messaging/connectors/jms/pom.xml index 8cca32caa07..b4af76a2e5a 100644 --- a/messaging/connectors/jms/pom.xml +++ b/messaging/connectors/jms/pom.xml @@ -32,6 +32,10 @@ jar Helidon Messaging JMS Connector + + etc/spotbugs/exclude.xml + + org.eclipse.microprofile.reactive.messaging diff --git a/nima/http/media/jsonp/src/main/resources/META-INF/native-image/io.helidon.nima.http.media/helidon-nima-http-mediate-jsonp/native-image.properties b/nima/http/media/jsonp/src/main/resources/META-INF/native-image/io.helidon.nima.http.media/helidon-nima-http-mediate-jsonp/native-image.properties new file mode 100644 index 00000000000..684c15bed9b --- /dev/null +++ b/nima/http/media/jsonp/src/main/resources/META-INF/native-image/io.helidon.nima.http.media/helidon-nima-http-mediate-jsonp/native-image.properties @@ -0,0 +1,17 @@ +# +# Copyright (c) 2023 Oracle and/or its affiliates. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +Args=--initialize-at-build-time=org.eclipse.parsson diff --git a/nima/webserver/webserver/src/main/java/io/helidon/nima/webserver/http1/Http1ServerResponse.java b/nima/webserver/webserver/src/main/java/io/helidon/nima/webserver/http1/Http1ServerResponse.java index 3dadb53db2a..54201b2826b 100644 --- a/nima/webserver/webserver/src/main/java/io/helidon/nima/webserver/http1/Http1ServerResponse.java +++ b/nima/webserver/webserver/src/main/java/io/helidon/nima/webserver/http1/Http1ServerResponse.java @@ -103,7 +103,11 @@ static void nonEntityBytes(ServerResponseHeaders headers, buffer.write(OK_200); } else { buffer.write(HTTP_BYTES); - buffer.write((status.code() + " " + status.reasonPhrase()).getBytes(StandardCharsets.US_ASCII)); + if (status.reasonPhrase().isEmpty()) { + buffer.write((status.codeText()).getBytes(StandardCharsets.US_ASCII)); + } else { + buffer.write((status.code() + " " + status.reasonPhrase()).getBytes(StandardCharsets.US_ASCII)); + } buffer.write('\r'); buffer.write('\n'); } diff --git a/pico/processor/etc/spotbugs/exclude.xml b/pico/processor/etc/spotbugs/exclude.xml index ce4d3c2a536..c559ec8db28 100644 --- a/pico/processor/etc/spotbugs/exclude.xml +++ b/pico/processor/etc/spotbugs/exclude.xml @@ -27,5 +27,10 @@ + + + + + diff --git a/pom.xml b/pom.xml index 9885f686fa4..f9aab8d0c3b 100644 --- a/pom.xml +++ b/pom.xml @@ -35,7 +35,7 @@ Java libraries for writing microservices - 19 + 20 all UTF-8 @@ -117,8 +117,8 @@ 3.0.0 3.0.0 3.0.1 - 4.7.1.1 - 1.11.0 + 4.7.3.2 + 1.12.0 8.1.1 3.0.0-M5 1.1