Skip to content

Commit c58c827

Browse files
committed
Polishing
1 parent 40f9fe0 commit c58c827

File tree

6 files changed

+17
-17
lines changed

6 files changed

+17
-17
lines changed

spring-core/src/main/java/org/springframework/aot/generate/GeneratedClasses.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
package org.springframework.aot.generate;
1818

19-
import java.io.IOException;
2019
import java.util.ArrayList;
2120
import java.util.Comparator;
2221
import java.util.List;
@@ -157,7 +156,6 @@ private GeneratedClass createAndAddGeneratedClass(String featureName,
157156
* Write the {@link GeneratedClass generated classes} using the given
158157
* {@link GeneratedFiles} instance.
159158
* @param generatedFiles where to write the generated classes
160-
* @throws IOException on IO error
161159
*/
162160
void writeTo(GeneratedFiles generatedFiles) {
163161
Assert.notNull(generatedFiles, "'generatedFiles' must not be null");

spring-core/src/main/java/org/springframework/util/function/ThrowingBiFunction.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,10 @@ public R apply(T t, U u) {
100100
}
101101

102102
/**
103-
* Lambda friendly convenience method that can be used to create
103+
* Lambda friendly convenience method that can be used to create a
104104
* {@link ThrowingBiFunction} where the {@link #apply(Object, Object)}
105-
* method wraps any thrown checked exceptions using the given
106-
* {@code exceptionWrapper}.
105+
* method wraps any checked exception thrown by the supplied lambda expression
106+
* or method reference.
107107
* @param <T> the type of the first argument to the function
108108
* @param <U> the type of the second argument to the function
109109
* @param <R> the type of the result of the function
@@ -115,7 +115,7 @@ static <T, U, R> ThrowingBiFunction<T, U, R> of(ThrowingBiFunction<T, U, R> func
115115
}
116116

117117
/**
118-
* Lambda friendly convenience method that can be used to create
118+
* Lambda friendly convenience method that can be used to create a
119119
* {@link ThrowingBiFunction} where the {@link #apply(Object, Object)}
120120
* method wraps any thrown checked exceptions using the given
121121
* {@code exceptionWrapper}.

spring-core/src/main/java/org/springframework/util/function/ThrowingConsumer.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ default void accept(T t) {
5555
* @param exceptionWrapper {@link BiFunction} that wraps the given message
5656
* and checked exception into a runtime exception
5757
*/
58-
default void accept(T t,BiFunction<String, Exception, RuntimeException> exceptionWrapper) {
58+
default void accept(T t, BiFunction<String, Exception, RuntimeException> exceptionWrapper) {
5959
try {
6060
acceptWithException(t);
6161
}
@@ -92,9 +92,10 @@ public void accept(T t) {
9292
}
9393

9494
/**
95-
* Lambda friendly convenience method that can be used to create
95+
* Lambda friendly convenience method that can be used to create a
9696
* {@link ThrowingConsumer} where the {@link #accept(Object)} method wraps
97-
* any thrown checked exceptions using the given {@code exceptionWrapper}.
97+
* any checked exception thrown by the supplied lambda expression or method
98+
* reference.
9899
* @param <T> the type of the input to the operation
99100
* @param consumer the source consumer
100101
* @return a new {@link ThrowingConsumer} instance
@@ -104,7 +105,7 @@ static <T> ThrowingConsumer<T> of(ThrowingConsumer<T> consumer) {
104105
}
105106

106107
/**
107-
* Lambda friendly convenience method that can be used to create
108+
* Lambda friendly convenience method that can be used to create a
108109
* {@link ThrowingConsumer} where the {@link #accept(Object)} method wraps
109110
* any thrown checked exceptions using the given {@code exceptionWrapper}.
110111
* @param <T> the type of the input to the operation

spring-core/src/main/java/org/springframework/util/function/ThrowingFunction.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,10 @@ public R apply(T t) {
9595
}
9696

9797
/**
98-
* Lambda friendly convenience method that can be used to create
98+
* Lambda friendly convenience method that can be used to create a
9999
* {@link ThrowingFunction} where the {@link #apply(Object)} method wraps
100-
* any thrown checked exceptions using the given {@code exceptionWrapper}.
100+
* any checked exception thrown by the supplied lambda expression or method
101+
* reference.
101102
* @param <T> the type of the input to the function
102103
* @param <R> the type of the result of the function
103104
* @param function the source function
@@ -108,7 +109,7 @@ static <T, R> ThrowingFunction<T, R> of(ThrowingFunction<T, R> function) {
108109
}
109110

110111
/**
111-
* Lambda friendly convenience method that can be used to create
112+
* Lambda friendly convenience method that can be used to create a
112113
* {@link ThrowingFunction} where the {@link #apply(Object)} method wraps
113114
* any thrown checked exceptions using the given {@code exceptionWrapper}.
114115
* @param <T> the type of the input to the function

spring-core/src/main/java/org/springframework/util/function/ThrowingSupplier.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,9 @@ public T get() {
9191
}
9292

9393
/**
94-
* Lambda friendly convenience method that can be used to create
95-
* {@link ThrowingSupplier} where the {@link #get()} method wraps any
96-
* thrown checked exceptions.
94+
* Lambda friendly convenience method that can be used to create a
95+
* {@link ThrowingSupplier} where the {@link #get()} method wraps any checked
96+
* exception thrown by the supplied lambda expression or method reference.
9797
* @param <T> the type of results supplied by this supplier
9898
* @param supplier the source supplier
9999
* @return a new {@link ThrowingSupplier} instance

spring-core/src/test/java/org/springframework/util/function/ThrowingConsumerTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ void throwingModifiesThrownException() {
6969
}
7070

7171
@Test
72-
void ofModifiesThrowException() {
72+
void ofModifiesThrownException() {
7373
ThrowingConsumer<Object> consumer = ThrowingConsumer.of(this::throwIOException,
7474
IllegalStateException::new);
7575
assertThatIllegalStateException().isThrownBy(

0 commit comments

Comments
 (0)