diff --git a/spring-context/src/main/java/org/springframework/cache/CacheManager.java b/spring-context/src/main/java/org/springframework/cache/CacheManager.java index 025e8655cbb..833715c63cb 100644 --- a/spring-context/src/main/java/org/springframework/cache/CacheManager.java +++ b/spring-context/src/main/java/org/springframework/cache/CacheManager.java @@ -33,11 +33,11 @@ public interface CacheManager { /** * Get the cache associated with the given name. - *
Note that the cache may be created at runtime if the native provider - * supports it. + *
Note that the cache may be lazily created at runtime if the + * native provider supports it. * @param name the cache identifier (must not be {@code null}) - * @return the associated cache, or {@code null} if such a cache does not - * exist or could be not created + * @return the associated cache, or {@code null} if such a cache + * does not exist or could be not created */ @Nullable Cache getCache(String name); diff --git a/spring-context/src/main/java/org/springframework/cache/support/AbstractCacheManager.java b/spring-context/src/main/java/org/springframework/cache/support/AbstractCacheManager.java index a767d476b2d..50ab5ccb317 100644 --- a/spring-context/src/main/java/org/springframework/cache/support/AbstractCacheManager.java +++ b/spring-context/src/main/java/org/springframework/cache/support/AbstractCacheManager.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -174,15 +174,15 @@ public abstract class AbstractCacheManager implements CacheManager, Initializing } /** - * Return a missing cache with the specified {@code name} or {@code null} if - * such cache does not exist or could not be created on the fly. - *
Some caches may be created at runtime if the native provider supports - * it. If a lookup by name does not yield any result, a subclass gets a chance - * to register such a cache at runtime. The returned cache will be automatically - * added to this instance. + * Return a missing cache with the specified {@code name}, or {@code null} if + * such a cache does not exist or could not be created on demand. + *
Caches may be lazily created at runtime if the native provider supports it. + * If a lookup by name does not yield any result, an {@code AbstractCacheManager} + * subclass gets a chance to register such a cache at runtime. The returned cache + * will be automatically added to this cache manager. * @param name the name of the cache to retrieve - * @return the missing cache or {@code null} if no such cache exists or could be - * created + * @return the missing cache, or {@code null} if no such cache exists or could be + * created on demand * @since 4.1 * @see #getCache(String) */ diff --git a/spring-context/src/main/java/org/springframework/context/MessageSource.java b/spring-context/src/main/java/org/springframework/context/MessageSource.java index fb17668689a..54f5ea88ed0 100644 --- a/spring-context/src/main/java/org/springframework/context/MessageSource.java +++ b/spring-context/src/main/java/org/springframework/context/MessageSource.java @@ -41,7 +41,7 @@ public interface MessageSource { /** * Try to resolve the message. Return default message if no message was found. - * @param code the code to lookup up, e.g. 'calculator.noRateSet'. + * @param code the message code to look up, e.g. 'calculator.noRateSet'. * MessageSource users are encouraged to base message names on qualified class * or package names, avoiding potential conflicts and ensuring maximum clarity. * @param args an array of arguments that will be filled in for params within @@ -59,7 +59,7 @@ public interface MessageSource { /** * Try to resolve the message. Treat as an error if the message can't be found. - * @param code the code to lookup up, e.g. 'calculator.noRateSet'. + * @param code the message code to look up, e.g. 'calculator.noRateSet'. * MessageSource users are encouraged to base message names on qualified class * or package names, avoiding potential conflicts and ensuring maximum clarity. * @param args an array of arguments that will be filled in for params within