Skip to content

Commit

Permalink
JDK 21 build and test support (#1880)
Browse files Browse the repository at this point in the history
There are following changes due JDK21:
-@SuppressWarnings("this-escape") mainly in jpa.jpql, dbws.builder.oracle.test modules
-<comp.xlint>-Xlint:all,-this-escape</comp.xlint> in pom.xml in core.test.framework as compiler hangs there without any additional message
-some package renaming in tests in corba module as JDK21 doesn't like same packages in different jars in classpath (testing jars are on the classpath not module path)
-SecurityManager tests are not called in JDK21
-GitHub Action JDK21-EA added

Signed-off-by: Radek Felcman <radek.felcman@oracle.com>
  • Loading branch information
rfelcman authored May 17, 2023
1 parent 77180c9 commit 90eb04b
Show file tree
Hide file tree
Showing 36 changed files with 251 additions and 191 deletions.
43 changes: 27 additions & 16 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,44 +19,55 @@ on:
branches: [ main, master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

concurrency:
group: ${{ github.ref }}
cancel-in-progress: true

jobs:
build:
build_test_job:
name: Test on JDK ${{ matrix.java_version }}
runs-on: ubuntu-latest

strategy:
matrix:
java_version: [ 17 ]
java_version: [ 17, 21-ea ]

steps:
- name: Cancel previous runs of this workflow
uses: styfle/cancel-workflow-action@0.9.1
with:
all_but_latest: true
access_token: ${{ github.token }}
- name: Start MySQL Database
run: |
sudo systemctl start mysql.service
mysql -e 'SET GLOBAL log_bin_trust_function_creators = 1;' -uroot -proot
mysql -e 'CREATE DATABASE ecltests;' -uroot -proot
mysql -e 'SHOW DATABASES;' -uroot -proot
mysql -e 'status;' -uroot -proot
- name: Cache local Maven repository
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Checkout for build
uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: ${{ matrix.java_version }}
- name: Verify
run: mvn -B -V -U -C -Pstaging,oss-release,test-lrg,mysql,dependency-check clean verify -Dgpg.skip=true -Dwarn.limit=15 -Dcomp.xlint=-Xlint:none
cache: maven
- name: Execute Tests on JDK ${{ matrix.java_version }}
run: mvn -B -V -U -C -Pstaging,oss-release,test-lrg,mysql clean verify -Dgpg.skip=true -Dwarn.limit=15 -Dcomp.xlint=-Xlint:none

common_validations_job:
name: Common Validations
runs-on: ubuntu-latest
needs: build_test_job

steps:
- name: Checkout for build
uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
cache: maven
- name: Execute Validations
run: mvn -B -V org.owasp:dependency-check-maven:aggregate
- name: Upload dependency-check
uses: actions/upload-artifact@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion foundation/org.eclipse.persistence.corba/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@
<!-- see https://github.com/eclipse-ee4j/orb-gmbal/issues/22 -->
<id>corba-tests</id>
<activation>
<jdk>[8,14)</jdk>
<jdk>[8,25)</jdk>
</activation>
<build>
<plugins>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 2023 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
Expand All @@ -20,10 +20,10 @@
import org.eclipse.persistence.internal.helper.Helper;
import org.eclipse.persistence.testing.framework.TestModel;
import org.eclipse.persistence.testing.framework.TestSuite;
import org.eclipse.persistence.testing.tests.security.corba.SecurityWhileConvertingToMethodTest;
import org.eclipse.persistence.testing.tests.security.corba.SecurityWhileConvertingToMethodTest.ConvertMethodAbstractSession;
import org.eclipse.persistence.testing.tests.security.corba.SecurityWhileConvertingToMethodTest.ConvertMethodNoArg;
import org.eclipse.persistence.testing.tests.security.corba.SecurityWhileConvertingToMethodTest.ConvertMethodSession;
import org.eclipse.persistence.testing.tests.securitycorba.SecurityWhileConvertingToMethodTest;
import org.eclipse.persistence.testing.tests.securitycorba.SecurityWhileConvertingToMethodTest.ConvertMethodAbstractSession;
import org.eclipse.persistence.testing.tests.securitycorba.SecurityWhileConvertingToMethodTest.ConvertMethodNoArg;
import org.eclipse.persistence.testing.tests.securitycorba.SecurityWhileConvertingToMethodTest.ConvertMethodSession;
import org.eclipse.persistence.testing.tests.sessionsxml.corba.SessionsXMLSchemaSunCORBATransportConfigTest;

public class CorbaTestModel extends TestModel {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
Expand All @@ -12,7 +12,7 @@

// Contributors:
// Oracle - initial API and implementation from Oracle TopLink
package org.eclipse.persistence.testing.tests.remote.rmi.IIOP;
package org.eclipse.persistence.testing.tests.remotecorba.rmi.IIOP;

import javax.naming.InitialContext;
import java.lang.reflect.Method;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
Expand All @@ -12,7 +12,7 @@

// Contributors:
// Oracle - initial API and implementation from Oracle TopLink
package org.eclipse.persistence.testing.tests.remote.rmi.IIOP;
package org.eclipse.persistence.testing.tests.remotecorba.rmi.IIOP;

import java.rmi.*;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
Expand All @@ -12,7 +12,7 @@

// Contributors:
// Oracle - initial API and implementation from Oracle TopLink
package org.eclipse.persistence.testing.tests.remote.rmi.IIOP;
package org.eclipse.persistence.testing.tests.remotecorba.rmi.IIOP;

import org.eclipse.persistence.internal.sessions.remote.Transporter;
import org.eclipse.persistence.sessions.Session;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
Expand All @@ -12,7 +12,7 @@

// Contributors:
// Oracle - initial API and implementation from Oracle TopLink
package org.eclipse.persistence.testing.tests.remote.rmi.IIOP;
package org.eclipse.persistence.testing.tests.remotecorba.rmi.IIOP;

import java.rmi.*;
import org.eclipse.persistence.sessions.remote.rmi.iiop.*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
Expand All @@ -12,7 +12,7 @@

// Contributors:
// Oracle - initial API and implementation from Oracle TopLink
package org.eclipse.persistence.testing.tests.remote.rmi.IIOP;
package org.eclipse.persistence.testing.tests.remotecorba.rmi.IIOP;

import java.lang.reflect.Constructor;
import java.rmi.RMISecurityManager;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
Expand All @@ -12,7 +12,7 @@

// Contributors:
// Oracle - initial API and implementation from Oracle TopLink
package org.eclipse.persistence.testing.tests.remote.rmi.IIOP;
package org.eclipse.persistence.testing.tests.remotecorba.rmi.IIOP;

// Tie class generated by rmic, do not edit.
// Contents subject to change without notice.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
Expand All @@ -12,7 +12,7 @@

// Contributors:
// Oracle - initial API and implementation from Oracle TopLink
package org.eclipse.persistence.testing.tests.remote.rmi.IIOP;
package org.eclipse.persistence.testing.tests.remotecorba.rmi.IIOP;

// Stub class generated by rmic, do not edit.
// Contents subject to change without notice.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
Expand All @@ -12,7 +12,7 @@

// Contributors:
// Oracle - initial API and implementation from Oracle TopLink
package org.eclipse.persistence.testing.tests.remote.suncorba;
package org.eclipse.persistence.testing.tests.remotecorba.suncorba;

import java.util.Properties;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
Expand All @@ -12,7 +12,7 @@

// Contributors:
// Oracle - initial API and implementation from Oracle TopLink
package org.eclipse.persistence.testing.tests.remote.suncorba;
package org.eclipse.persistence.testing.tests.remotecorba.suncorba;

import org.eclipse.persistence.internal.sessions.remote.Transporter;
import org.eclipse.persistence.sessions.Session;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
Expand All @@ -12,7 +12,7 @@

// Contributors:
// Oracle - initial API and implementation from Oracle TopLink
package org.eclipse.persistence.testing.tests.remote.suncorba;
package org.eclipse.persistence.testing.tests.remotecorba.suncorba;

/**
* org.eclipse.persistence.testing/Remote/SunCORBA/CORBAServerManager.java
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
Expand All @@ -12,7 +12,7 @@

// Contributors:
// Oracle - initial API and implementation from Oracle TopLink
package org.eclipse.persistence.testing.tests.remote.suncorba;
package org.eclipse.persistence.testing.tests.remotecorba.suncorba;

import java.lang.reflect.Constructor;
import java.util.Properties;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
Expand All @@ -12,7 +12,7 @@

// Contributors:
// Oracle - initial API and implementation from Oracle TopLink
package org.eclipse.persistence.testing.tests.remote.suncorba;
package org.eclipse.persistence.testing.tests.remotecorba.suncorba;

/**
* org/eclipse/persistence/testing/Remote/SunCORBA/CORBAServerManagerHelper.java
Expand All @@ -26,48 +26,48 @@ abstract public class CORBAServerManagerHelper
private static String _id = "IDL:org/eclipse/persistence/testing/Remote/SunCORBA/CORBAServerManager:1.0";

private static org.omg.CORBA.TypeCode __typeCode = null;
public static org.eclipse.persistence.testing.tests.remote.suncorba.CORBAServerManager extract (org.omg.CORBA.Any a)
public static CORBAServerManager extract (org.omg.CORBA.Any a)
{
return read (a.create_input_stream ());
}
public static String id ()
{
return _id;
}
public static void insert (org.omg.CORBA.Any a, org.eclipse.persistence.testing.tests.remote.suncorba.CORBAServerManager that)
public static void insert (org.omg.CORBA.Any a, CORBAServerManager that)
{
org.omg.CORBA.portable.OutputStream out = a.create_output_stream ();
a.type (type ());
write (out, that);
a.read_value (out.create_input_stream (), type ());
}
public static org.eclipse.persistence.testing.tests.remote.suncorba.CORBAServerManager narrow (org.omg.CORBA.Object obj)
public static CORBAServerManager narrow (org.omg.CORBA.Object obj)
{
if (obj == null)
return null;
else if (obj instanceof org.eclipse.persistence.testing.tests.remote.suncorba.CORBAServerManager)
return (org.eclipse.persistence.testing.tests.remote.suncorba.CORBAServerManager)obj;
else if (obj instanceof CORBAServerManager)
return (CORBAServerManager)obj;
else if (!obj._is_a (id ()))
throw new org.omg.CORBA.BAD_PARAM ();
else
{
org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate ();
return new org.eclipse.persistence.testing.tests.remote.suncorba._CORBAServerManagerStub (delegate);
return new _CORBAServerManagerStub(delegate);
}
}
public static org.eclipse.persistence.testing.tests.remote.suncorba.CORBAServerManager read (org.omg.CORBA.portable.InputStream istream)
public static CORBAServerManager read (org.omg.CORBA.portable.InputStream istream)
{
return narrow (istream.read_Object (_CORBAServerManagerStub.class));
}
synchronized public static org.omg.CORBA.TypeCode type ()
{
if (__typeCode == null)
{
__typeCode = org.omg.CORBA.ORB.init ().create_interface_tc (org.eclipse.persistence.testing.tests.remote.suncorba.CORBAServerManagerHelper.id (), "CORBAServerManager");
__typeCode = org.omg.CORBA.ORB.init ().create_interface_tc (CORBAServerManagerHelper.id (), "CORBAServerManager");
}
return __typeCode;
}
public static void write (org.omg.CORBA.portable.OutputStream ostream, org.eclipse.persistence.testing.tests.remote.suncorba.CORBAServerManager value)
public static void write (org.omg.CORBA.portable.OutputStream ostream, CORBAServerManager value)
{
ostream.write_Object (value);
}
Expand Down
Loading

0 comments on commit 90eb04b

Please sign in to comment.