Bug 196832 - Direct import does not override access restrictions on indirect import
Summary: Direct import does not override access restrictions on indirect import
Status: VERIFIED INVALID
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.4 M2   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-17 11:50 EDT by Markus Milleder CLA
Modified: 2007-09-17 08:25 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Milleder CLA 2007-07-17 11:50:18 EDT
Build ID: I20070625-1500

Steps To Reproduce:
This bug is related to Bug 196815
1. In a new workspace, create a Java project "exporter" containing an interface
"z.a.A"
2. Create an empty Java project "transmitter".
3. In "transmitter"'s Properties/Java Build Path/Projects, add "exporter".
4. In "transmitter"'s Properties/Java Build Path/Order and Export, re-export "exporter".
5. Create a Java project "importer".
6. In "importer"'s Properties/Java Build Path/Projects, add "transmitter".
7. In "importer" create a class that implements "z.a.A".

8. In "transmitter"'s Properties/Java Build Path/Projects, add an access rule forbidding access to "**/a/**". This makes "importer" have an error.
9. In "importer"'s Properties/Java Build Path/Projects, add "exporter" directly.

Expected: Since the direct import has no access restrictions, the error in "import" should go away.
Observed: The error stays.



More information:
For ease of reproduction, use the attached projects from Bug 196815.

I think an unrestricted import should overrule a restricted import so that import/export restrictions can be used to override unfortunate upstream packaging decisions.
Comment 1 Jerome Lanneluc CLA 2007-08-13 07:02:31 EDT
In the "Order and Export" of "importer", "transmitter" appears before "exporter". Thus "z.a.A" is found through "transmitter" and not through "exporter". As a consequence the access rule for "transmitter" applies.

This works as designed. Marking bug report INVALID.
Comment 2 Maxime Daniel CLA 2007-09-17 08:25:58 EDT
Verified for 3.4M2 using build I20070917-0010.