jakartaee / jakartaee/mail-api

Illegal reflective access by com.sun.mail.util.SocketFetcher

Open
#391 12 comments 12 reactions 1 assignee Claimed by @jmehrens View on GitHub
enhancement
Dominant language
Java
Stars
285
Forks
109
Avg merge
15h 19m
Merged PRs (30d)
1

Description

Connecting to a store while running on OpenJDK 11 produces the following warning.

WARNING: An illegal reflective access operation has occurred`
WARNING: Illegal reflective access by com.sun.mail.util.SocketFetcher (file:/home/olivier/.m2/repository/com/sun/mail/mailapi/1.6.3/mailapi-1.6.3.jar) to method sun.security.util.HostnameChecker.getInstance(byte)
WARNING: Please consider reporting this to the maintainers of com.sun.mail.util.SocketFetcher
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

The problem seems to lie in [`SocketFetcher#matchCert`](https://github.com/eclipse-ee4j/javamail/blob/master/mail/src/main/java/com/sun/mail/util/SocketFetcher.java#L683).

I can provide a detailed test case to reproduce the problem, but I suppose it is not necessary, as the source of the problem seems clear.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.