Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • "n the first case your code (in moduleA) sees the Type but cannot see the class which implements your Type, because it's in the moduleB." do you mean that if the package of PropertiesProviderImpl had been "exported" then the code will have behaved as if from the class? Apparently this is not the case. Commented Mar 9, 2018 at 15:50
  • Sorry, for waiting, busy days :( I should learn more about it too :(. Back to your main question look at this: openjdk.java.net/jeps/261#Risks-and-Assumptions especially to 1st and 4th points Commented Mar 12, 2018 at 11:51
  • well it seems that I need to read the fine print "module is readable by the module containing the code that is attempting to access it" it means that only the code of the super-class that "contains" it applies the rules (not the inherited code in the subclass!). So for the sake of modularity it violates the rules of inheritance ... I suppose that it is a catch 22 situation and specifications opted for the lesser of two evils. Commented Mar 12, 2018 at 14:55