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

Run tests with JDK8 in GitHub actions #40

Merged
merged 10 commits into from
Jan 19, 2023
Merged

Conversation

jbescos
Copy link
Member

@jbescos jbescos commented Nov 2, 2022

Adding JDK8 to make sure there are no runtime errors with JDK8.

Currently test are failing because of test errors, which is actually what we wanted:

java.lang.ArrayStoreException
	at java.lang.System.arraycopy(Native Method)
	at java.util.ArrayList.toArray(ArrayList.java:414)
	at jakarta.activation.MailcapCommandMap.<init>(MailcapCommandMap.java:181)
	at jakarta.activation.CommandMap.getDefaultCommandMap(CommandMap.java:60)
	at jakarta.activation.DataHandler.getCommandMap(DataHandler.java:128)
	at jakarta.activation.DataHandler.getDataContentHandler(DataHandler.java:590)
	at jakarta.activation.DataHandler.writeTo(DataHandler.java:290)
	at jakarta.mail.internet.MimeUtility.getEncoding(MimeUtility.java:316)
	at jakarta.mail.internet.MimeBodyPart.updateHeaders(MimeBodyPart.java:1580)
	at jakarta.mail.internet.MimeMessage.updateHeaders(MimeMessage.java:2265)
	at jakarta.mail.internet.MimeMessage.saveChanges(MimeMessage.java:2225)
	at jakarta.mail.internet.MimeMessage.writeTo(MimeMessage.java:1904)
	at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1329)

This will work when this PR is merged and we update the version of angus-activation.

I keep this as a draft till that moment happens to keep the builds green.

You can test this following these steps: eclipse-ee4j/angus-activation#11

Signed-off-by: Jorge Bescos Gascon <jorge.bescos.gascon@oracle.com>
@lukasj
Copy link
Member

lukasj commented Jan 11, 2023

time to rebase this on master and finalize...

Signed-off-by: Jorge Bescos Gascon <jorge.bescos.gascon@oracle.com>
@jbescos
Copy link
Member Author

jbescos commented Jan 11, 2023

time to rebase this on master and finalize...

Done, but we have to wait for a new release of activation. Then I will update the pom.xml to use it, and we can merge it.

@lukasj
Copy link
Member

lukasj commented Jan 11, 2023

ang-activation 2.0.0 is already in staging and integrated here, just rebase on top of master...

@jbescos
Copy link
Member Author

jbescos commented Jan 11, 2023

ang-activation 2.0.0 is already in staging and integrated here, just rebase on top of master...

It looks there is a new issue:

Error:  COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
Error:  /home/runner/work/angus-mail/angus-mail/core/src/main/java/com/sun/mail/nativeimage/AngusMailFeature.java:[23,38] cannot access org.graalvm.nativeimage.hosted.Feature
  bad class file: /home/runner/.m2/repository/org/graalvm/sdk/graal-sdk/22.3.0/graal-sdk-22.3.0.jar(org/graalvm/nativeimage/hosted/Feature.class)
    class file has wrong version 55.0, should be 52.0
    Please remove or make sure it appears in the correct subdirectory of the classpath.

It seems that graal dependency was not compiled for JDK 8.

Signed-off-by: Jorge Bescos Gascon <jorge.bescos.gascon@oracle.com>
pom.xml Outdated
@@ -91,7 +91,7 @@ Copyright &#169; 2019, ${current.year} Eclipse Foundation. All rights reserved.]
<servlet-api.version>5.0.0</servlet-api.version>
<angus.activation.version>2.0.0</angus.activation.version>
<angus-mail.version>${project.version}</angus-mail.version>
<graal.sdk.version>22.3.0</graal.sdk.version>
<graal.sdk.version>22.0.0</graal.sdk.version>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prefer exclusion of the file from the build on JDK 8 over changing graalvm version

Signed-off-by: Jorge Bescos Gascon <jorge.bescos.gascon@oracle.com>
Signed-off-by: Jorge Bescos Gascon <jorge.bescos.gascon@oracle.com>
@jbescos jbescos marked this pull request as ready for review January 11, 2023 16:28
Signed-off-by: Jorge Bescos Gascon <jorge.bescos.gascon@oracle.com>
Signed-off-by: Jorge Bescos Gascon <jorge.bescos.gascon@oracle.com>
Signed-off-by: Jorge Bescos Gascon <jorge.bescos.gascon@oracle.com>
Signed-off-by: Jorge Bescos Gascon <jorge.bescos.gascon@oracle.com>
Copy link
Member

@lukasj lukasj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lukasj lukasj merged commit 0ff77bc into eclipse-ee4j:master Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants