Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Java to 20 GA #6474

Merged
merged 4 commits into from
Mar 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 10 additions & 10 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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 }}
Expand All @@ -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 }}
Expand All @@ -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 }}
Expand All @@ -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 }}
Expand All @@ -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 }}
Expand All @@ -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 }}
Expand All @@ -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 }}
Expand All @@ -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 }}
Expand All @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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!

Expand Down
2 changes: 1 addition & 1 deletion applications/mp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<version.plugin.jandex>1.0.6</version.plugin.jandex>
<version.plugin.jaxb2>0.14.0</version.plugin.jaxb2>
<version.plugin.eclipselink>2.7.5.1</version.plugin.eclipselink>
<version.plugin.hibernate.enhance>${version.lib.hibernate}</version.plugin.hibernate.enhance>
<version.plugin.hibernate.enhance>6.1.7.Final</version.plugin.hibernate.enhance>
<mainClass>io.helidon.microprofile.cdi.Main</mainClass>
</properties>

Expand Down
2 changes: 1 addition & 1 deletion applications/parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.compiler.source>19</maven.compiler.source>
<maven.compiler.source>20</maven.compiler.source>
<maven.compiler.target>${maven.compiler.source}</maven.compiler.target>
<maven.compiler.release>${maven.compiler.source}</maven.compiler.release>
<version.plugin.compiler>3.8.1</version.plugin.compiler>
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,27 +32,27 @@ class ToStringAnnotationValueVisitor implements AnnotationValueVisitor<String, O
private boolean mapBlankArrayToNull;
private boolean mapToSourceDeclaration;

public ToStringAnnotationValueVisitor mapVoidToNull(boolean val) {
ToStringAnnotationValueVisitor mapVoidToNull(boolean val) {
this.mapVoidToNull = val;
return this;
}

public ToStringAnnotationValueVisitor mapBooleanToNull(boolean val) {
ToStringAnnotationValueVisitor mapBooleanToNull(boolean val) {
this.mapFalseToNull = val;
return this;
}

public ToStringAnnotationValueVisitor mapEmptyStringToNull(boolean val) {
ToStringAnnotationValueVisitor mapEmptyStringToNull(boolean val) {
this.mapEmptyStringToNull = val;
return this;
}

public ToStringAnnotationValueVisitor mapBlankArrayToNull(boolean val) {
ToStringAnnotationValueVisitor mapBlankArrayToNull(boolean val) {
this.mapBlankArrayToNull = val;
return this;
}

public ToStringAnnotationValueVisitor mapToSourceDeclaration(boolean val) {
ToStringAnnotationValueVisitor mapToSourceDeclaration(boolean val) {
this.mapToSourceDeclaration = val;
return this;
}
Expand Down Expand Up @@ -150,24 +150,27 @@ public String visitArray(List<? extends AnnotationValue> 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
Expand Down
4 changes: 2 additions & 2 deletions dependencies/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<version.lib.commons-logging>1.2</version.lib.commons-logging>
<version.lib.cron-utils>9.1.6</version.lib.cron-utils>
<version.lib.dropwizard.metrics>4.1.2</version.lib.dropwizard.metrics>
<version.lib.eclipselink>3.0.3</version.lib.eclipselink>
<version.lib.eclipselink>4.0.1</version.lib.eclipselink>
<version.lib.el-impl>4.0.2</version.lib.el-impl>
<version.lib.etcd4j>2.18.0</version.lib.etcd4j>
<version.lib.failsafe>2.3.1</version.lib.failsafe>
Expand All @@ -61,7 +61,7 @@
<version.lib.h2>2.1.212</version.lib.h2>
<version.lib.hamcrest>1.3</version.lib.hamcrest>
<version.lib.handlebars>4.3.1</version.lib.handlebars>
<version.lib.hibernate>6.1.4.Final</version.lib.hibernate>
<version.lib.hibernate>6.1.7.Final</version.lib.hibernate>
<version.lib.hibernate-validator>7.0.2.Final</version.lib.hibernate-validator>
<version.lib.hikaricp>5.0.1</version.lib.hikaricp>
<version.lib.hystrix>1.5.18</version.lib.hystrix>
Expand Down
6 changes: 3 additions & 3 deletions etc/scripts/includes/pipeline-env.sh
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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() {
Expand Down Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions examples/integrations/neo4j/neo4j-mp/Dockerfile.native
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions examples/integrations/neo4j/neo4j-se/Dockerfile.native
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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());
}

/**
Expand Down
2 changes: 1 addition & 1 deletion examples/nima/quickstart-standalone/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.compiler.source>19</maven.compiler.source>
<maven.compiler.source>20</maven.compiler.source>
<maven.compiler.target>${maven.compiler.source}</maven.compiler.target>
<maven.compiler.release>${maven.compiler.source}</maven.compiler.release>

Expand Down
4 changes: 2 additions & 2 deletions examples/quickstarts/helidon-quickstart-mp/Dockerfile.native
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions examples/quickstarts/helidon-quickstart-se/Dockerfile.native
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<helidon.version>4.0.0-SNAPSHOT</helidon.version>
<mainClass>io.helidon.microprofile.cdi.Main</mainClass>

<maven.compiler.source>19</maven.compiler.source>
<maven.compiler.source>20</maven.compiler.source>
<maven.compiler.target>${maven.compiler.source}</maven.compiler.target>
<maven.site.skip>true</maven.site.skip>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<helidon.version>4.0.0-SNAPSHOT</helidon.version>
<mainClass>io.helidon.examples.quickstart.se.Main</mainClass>

<maven.compiler.source>19</maven.compiler.source>
<maven.compiler.source>20</maven.compiler.source>
<maven.compiler.target>${maven.compiler.source}</maven.compiler.target>
<maven.site.skip>true</maven.site.skip>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down