1) build and install all-java/hints module.
2) open Java source file.
3) Put cursor on line with public field
4) Invoke 'Encapsulate field a - ' hint
5) CNF is thrown
This a regression caused by integration of issue #54123.
Not a core problem. Modules are responsible for declaring their dependencies
correctly. Track down which module is attempting to use a package which is
forbidden to it, and fix the problem. (I cannot offer any better suggestion
without a stack trace.)
As far as I know, the problem is that:
1. the refactoring module declares public packages for friends (Java hints is
not a friend for refactoring module).
2. the Java hints module declares implementation dependency on the refactoring
3. the Java hints module is not granted the access to classes from the
refactoring module in spite of it declares the implementation dependency.
I suppose that the implementation dependecy should allow unrestricted access to
all module's classes.
I am attaching a test case the shows the problem.
Created attachment 22187 [details]
Testcase (patch) that shows the problem.
I guess Yarda's patch for issue #54123 was wrong then. It would incorrectly
refuse access in the case that a module with an impl dep on a module with friend
packages tried to access one of those friend packages without being a friend.
Easy to correct though.
Nonetheless please fix the java/hints -> refactoring dep to use normal friend
access, not impl deps.
Should be fixed now. BTW thanks Jan for the test.
committed * Up-To-Date 1.66
committed * Up-To-Date 1.42
committed * Up-To-Date 1.27
added * Up-To-Date 1.1
Thanks for fixing this so quickly that I really could not do it sooner.
Oh no problem. It was actually pretty easy with the test already written. :-)
Can someone verify that it is working correctly for java/hints?