4

In two places in the package documentation for the java.lang.module package, the phrase "at the discretion of the host system" occurs.

I feel like it is trying to tell me something important, and I understand the English, but I fail to see what that important something might be.

Here is one of two possible examples drawn from the documentation (with my emphasis):

Recursive enumeration takes a set of module names, looks up each of their module declarations, and for each module declaration, recursively enumerates:

  • the module names given by the 'requires' directives with the 'transitive' modifier, and
  • at the discretion of the host system, the module names given by the 'requires' directives without the 'transitive' modifier.

If my module-info.java file has, simply, requires foo; (i.e. not requires transitive foo;), and foo exists in some way, is it the case that the "host system" can simply pretend that foo does not participate in the resolved module graph? What could be a reason for calling this out explicitly?

Naman
  • 27,789
  • 26
  • 218
  • 353
Laird Nelson
  • 15,321
  • 19
  • 73
  • 127
  • not really sure, but considering how the host system such as IDEs, etc would treat the dependencies to be categorized on the module or the classpath, it might just so be that the resolution as you said could be impacted, hence an explicit callout mostly. – Naman Aug 26 '21 at 04:36

0 Answers0