Bug 196815 - Access Rules on import do not work for reexported classes
Summary: Access Rules on import do not work for reexported classes
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 M1   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-17 10:05 EDT by Markus Milleder CLA
Modified: 2007-12-20 06:46 EST (History)
0 users

See Also:


Attachments
3 projects as described in the bug report (3.89 KB, application/octet-stream)
2007-07-17 10:09 EDT, Markus Milleder CLA
no flags Details

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

Steps To Reproduce:
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 "importer"'s Properties/Java Build Path/Projects, add an access rule forbidding access to "**/a/**".

Expected: an error message about the access restriction.
Observed: no error message.

More information:
With a direct dependency on "exporter", the access rule works as expected.

Originally noticed in 3.2.2, verified in 3.3 (with a newly extracted 3.3 classic package).
Comment 1 Markus Milleder CLA 2007-07-17 10:09:47 EDT
Created attachment 73948 [details]
3 projects as described in the bug report
Comment 2 Markus Milleder CLA 2007-07-26 10:10:38 EDT
Trying to show the effect to a colleague, I noticed it works now. Further experimentation gave me the impression that it only fails with newly made projects, but works for projects (or maybe access rules ?) that existed when Eclipse started.

I agree this is probably too vague to find the problem, and I won't resist if somebody tries it and then closes the bug "WORKSFORME", but it doesn't work well enough for me to do so myself.
Comment 3 Frederic Fusier CLA 2007-07-26 11:08:38 EDT
In fact it seems more than an invalid usage than a not reproduceable issue.
I can reproduce the described behavior when I follow the steps described at comment 0.

However, I think this is the expected behavior. As the 'importer' project as no source, the access rule set at step 8 obviously has no effect.

You need to set the access rule directly on 'transmitter' project to get the error message...
Comment 4 Frederic Fusier CLA 2007-12-20 06:46:43 EST
Verified for 3.4M1