Skip to content

Commit cac623b

Browse files
committed
Refer to the "Java Module System" instead of "Jigsaw"
1 parent c5f51aa commit cac623b

File tree

5 files changed

+26
-24
lines changed

5 files changed

+26
-24
lines changed

framework-docs/modules/ROOT/pages/core/beans/classpath-scanning.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,8 +317,8 @@ exposed based on security policies in some environments -- for example, standalo
317317
JDK 1.7.0_45 and higher (which requires 'Trusted-Library' setup in your manifests -- see
318318
{stackoverflow-questions}/19394570/java-jre-7u45-breaks-classloader-getresources).
319319
320-
On JDK 9's module path (Jigsaw), Spring's classpath scanning generally works as expected.
321-
However, make sure that your component classes are exported in your `module-info`
320+
On the module path (Java Module System), Spring's classpath scanning generally works as
321+
expected. However, make sure that your component classes are exported in your `module-info`
322322
descriptors. If you expect Spring to invoke non-public members of your classes, make
323323
sure that they are 'opened' (that is, that they use an `opens` declaration instead of an
324324
`exports` declaration in your `module-info` descriptor).

framework-docs/modules/ROOT/pages/core/resources.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -905,8 +905,8 @@ policies in some environments -- for example, stand-alone applications on JDK 1.
905905
and higher (which requires 'Trusted-Library' to be set up in your manifests. See
906906
{stackoverflow-questions}/19394570/java-jre-7u45-breaks-classloader-getresources).
907907
908-
On JDK 9's module path (Jigsaw), Spring's classpath scanning generally works as expected.
909-
Putting resources into a dedicated directory is highly recommendable here as well,
908+
On the module path (Java Module System), Spring's classpath scanning generally works as
909+
expected. Putting resources into a dedicated directory is highly recommendable here as well,
910910
avoiding the aforementioned portability problems with searching the jar file root level.
911911
====
912912

framework-docs/modules/ROOT/pages/overview.adoc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@ support for different application architectures, including messaging, transactio
3737
persistence, and web. It also includes the Servlet-based Spring MVC web framework and, in
3838
parallel, the Spring WebFlux reactive web framework.
3939

40-
A note about modules: Spring's framework jars allow for deployment to JDK 9's module path
41-
("Jigsaw"). For use in Jigsaw-enabled applications, the Spring Framework 5 jars come with
42-
"Automatic-Module-Name" manifest entries which define stable language-level module names
43-
("spring.core", "spring.context", etc.) independent from jar artifact names (the jars follow
44-
the same naming pattern with "-" instead of ".", e.g. "spring-core" and "spring-context").
45-
Of course, Spring's framework jars keep working fine on the classpath on both JDK 8 and 9+.
40+
A note about modules: Spring Framework's jars allow for deployment to the module path (Java
41+
Module System). For use in module-enabled applications, the Spring Framework jars come with
42+
`Automatic-Module-Name` manifest entries which define stable language-level module names
43+
(`spring.core`, `spring.context`, etc.) independent from jar artifact names. The jars follow
44+
the same naming pattern with `-` instead of `.` – for example, `spring-core` and `spring-context`.
45+
Of course, Spring Framework's jars also work fine on the classpath.
4646

4747

4848

spring-context/src/main/java/org/springframework/context/support/ResourceBundleMessageSource.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,12 +243,12 @@ protected ResourceBundle doGetBundle(String basename, Locale locale) throws Miss
243243
return ResourceBundle.getBundle(basename, locale, classLoader, control);
244244
}
245245
catch (UnsupportedOperationException ex) {
246-
// Probably in a Jigsaw environment on JDK 9+
246+
// Probably in a Java Module System environment on JDK 9+
247247
this.control = null;
248248
String encoding = getDefaultEncoding();
249249
if (encoding != null && logger.isInfoEnabled()) {
250250
logger.info("ResourceBundleMessageSource is configured to read resources with encoding '" +
251-
encoding + "' but ResourceBundle.Control not supported in current system environment: " +
251+
encoding + "' but ResourceBundle.Control is not supported in current system environment: " +
252252
ex.getMessage() + " - falling back to plain ResourceBundle.getBundle retrieval with the " +
253253
"platform default encoding. Consider setting the 'defaultEncoding' property to 'null' " +
254254
"for participating in the platform default and therefore avoiding this log message.");

spring-core/src/main/java/org/springframework/util/ClassUtils.java

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -332,10 +332,10 @@ public static Class<?> forName(String name, @Nullable ClassLoader classLoader)
332332
* @return a class instance for the supplied name
333333
* @throws IllegalArgumentException if the class name was not resolvable
334334
* (that is, the class could not be found or the class file could not be loaded)
335-
* @throws IllegalStateException if the corresponding class is resolvable but
336-
* there was a readability mismatch in the inheritance hierarchy of the class
337-
* (typically a missing dependency declaration in a Jigsaw module definition
338-
* for a superclass or interface implemented by the class to be loaded here)
335+
* @throws IllegalStateException if the corresponding class is resolvable but there
336+
* was a readability mismatch in the inheritance hierarchy of the class (typically a
337+
* missing dependency declaration in a Java Module System module definition for a
338+
* superclass or interface implemented by the class to be loaded here)
339339
* @see #forName(String, ClassLoader)
340340
*/
341341
public static Class<?> resolveClassName(String className, @Nullable ClassLoader classLoader)
@@ -365,10 +365,10 @@ public static Class<?> resolveClassName(String className, @Nullable ClassLoader
365365
* (can be {@code null} which indicates the default class loader)
366366
* @return whether the specified class is present (including all of its
367367
* superclasses and interfaces)
368-
* @throws IllegalStateException if the corresponding class is resolvable but
369-
* there was a readability mismatch in the inheritance hierarchy of the class
370-
* (typically a missing dependency declaration in a Jigsaw module definition
371-
* for a superclass or interface implemented by the class to be checked here)
368+
* @throws IllegalStateException if the corresponding class is resolvable but there
369+
* was a readability mismatch in the inheritance hierarchy of the class (typically a
370+
* missing dependency declaration in a Java Module System module definition for a
371+
* superclass or interface implemented by the class to be checked here)
372372
*/
373373
public static boolean isPresent(String className, @Nullable ClassLoader classLoader) {
374374
try {
@@ -1388,8 +1388,9 @@ public static Method getMostSpecificMethod(Method method, @Nullable Class<?> tar
13881388

13891389
/**
13901390
* Determine a corresponding interface method for the given method handle, if possible.
1391-
* <p>This is particularly useful for arriving at a public exported type on Jigsaw
1392-
* which can be reflectively invoked without an illegal access warning.
1391+
* <p>This is particularly useful for arriving at a public exported type on the Java
1392+
* Module System which allows the method to be invoked via reflection without an illegal
1393+
* access warning.
13931394
* @param method the method to be invoked, potentially from an implementation class
13941395
* @return the corresponding interface method, or the original method if none found
13951396
* @since 5.1
@@ -1402,8 +1403,9 @@ public static Method getInterfaceMethodIfPossible(Method method) {
14021403

14031404
/**
14041405
* Determine a corresponding interface method for the given method handle, if possible.
1405-
* <p>This is particularly useful for arriving at a public exported type on Jigsaw
1406-
* which can be reflectively invoked without an illegal access warning.
1406+
* <p>This is particularly useful for arriving at a public exported type on the Java
1407+
* Module System which allows the method to be invoked via reflection without an illegal
1408+
* access warning.
14071409
* @param method the method to be invoked, potentially from an implementation class
14081410
* @param targetClass the target class to check for declared interfaces
14091411
* @return the corresponding interface method, or the original method if none found

0 commit comments

Comments
 (0)