Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 506254

Summary: Add support for @jdk.Exported annotation
Product: [Eclipse Project] JDT Reporter: Tobias Riemenschneider <tobys>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3    
Version: 4.6   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard: stalebug

Description Tobias Riemenschneider CLA 2016-10-20 03:24:33 EDT
With Java SE 1.8 the @jdk.Exported annotation was introduced. It is used for identifying JDK specific types and packages outside of the Java SE namespaces java.* and javax.* that are part of the official interface of the JDK (see http://bugs.java.com/bugdatabase/view_bug.do?bug_id=8001614 and related reports). For example, several types of the Java 8 Nashorn Javascript Engine are 'made public available' by using this annotation. This annotation is also supported by OpenJDK (see http://mail.openjdk.java.net/pipermail/security-dev/2013-October/009082.html).

Unfortunately the annotation is currently not supported by JDT, i.e., when using such a JDK specific type like jdk.nashorn.api.scripting.NashornException JDT reports an access restriction. As a workaround you can configure the severity of forbidden references to restricted API (which might mask other issues) or add access rules for each and every used type or package to the JRE contained in build path. In combination with build automation tools like Gradle additional configuration in the build scripts is required for preventing that these manual configurations are overwritten on each and every rebuild.

Therefore I would propose to support the @jdk.Exported annotation in JDT and prevent reporting access restrictions for exported types and packages.
Comment 1 Eclipse Genie CLA 2019-10-22 19:50:58 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.