Skip to content

Fix Illegal Reflective Access Warnings (Java 11) #5232

Description

@co-jo

Problem description

As we move forward to using Java 11, the (new) module system imposes new constraints on how packages are handled. One of these issues is an `Illegal reflective access warning'. Eventually these warnings will evolve into errors, so they must be handled.

Problem location

Building pravega produces two warnings:

WARNING: Illegal reflective access by org.apache.hadoop.security.authentication.util.KerberosUtil 
(file:/.../hadoop-auth-2.8.5.jar) to method sun.security.krb5.Config.getInstance()

WARNING: Illegal reflective access by org.mockito.internal.util.reflection.AccessibilityChanger
(file:/.../mockito-core-3.3.3.jar) to field java.util.concurrent.CompletableFuture.result

As of 10/5/2020, the lastest release of mockito-core does not fix these issues. The lastest minor release of hadoop-core also does not fix these issues.

Suggestions for an improvement

We do not want to mask and forget about these warnings. We must update these packages (when possible) to a version that
respects the module system.

Metadata

Metadata

Assignees

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions