Skip to content

Commit 8e83f14

Browse files
committed
Polishing
1 parent db8e9ea commit 8e83f14

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

spring-beans/src/main/java/org/springframework/beans/factory/ObjectProvider.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ default Iterator<T> iterator() {
157157
* @see #orderedStream()
158158
*/
159159
default Stream<T> stream() {
160-
throw new UnsupportedOperationException("Multi-element access not supported");
160+
throw new UnsupportedOperationException("Multi element access not supported");
161161
}
162162

163163
/**
@@ -173,7 +173,7 @@ default Stream<T> stream() {
173173
* @see org.springframework.core.OrderComparator
174174
*/
175175
default Stream<T> orderedStream() {
176-
throw new UnsupportedOperationException("Multi-element access not supported");
176+
throw new UnsupportedOperationException("Ordered element access not supported");
177177
}
178178

179179
}

spring-core/src/main/java/org/springframework/core/log/LogFormatUtils.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
1617
package org.springframework.core.log;
1718

1819
import java.util.function.Function;
@@ -42,16 +43,16 @@ private LogFormatUtils() {
4243
* {@link CharSequence}, and possibly truncating at 100 if limitLength is
4344
* set to true.
4445
* @param value the value to format
45-
* @param limitLength whether to truncate large formatted values (over 100).
46+
* @param limitLength whether to truncate large formatted values (over 100)
4647
* @return the formatted value
4748
* @since 5.1
4849
*/
4950
public static String formatValue(@Nullable Object value, boolean limitLength) {
5051
if (value == null) {
5152
return "";
5253
}
53-
String s = value instanceof CharSequence ? "\"" + value + "\"" : value.toString();
54-
return limitLength && s.length() > 100 ? s.substring(0, 100) + " (truncated)..." : s;
54+
String s = (value instanceof CharSequence ? "\"" + value + "\"" : value.toString());
55+
return (limitLength && s.length() > 100 ? s.substring(0, 100) + " (truncated)..." : s);
5556
}
5657

5758
/**
@@ -70,7 +71,7 @@ public static String formatValue(@Nullable Object value, boolean limitLength) {
7071
* </pre>
7172
* @param logger the logger to use to log the message
7273
* @param messageFactory function that accepts a boolean set to the value
73-
* of {@link Log#isTraceEnabled()}.
74+
* of {@link Log#isTraceEnabled()}
7475
*/
7576
public static void traceDebug(Log logger, Function<Boolean, String> messageFactory) {
7677
if (logger.isDebugEnabled()) {

0 commit comments

Comments
 (0)