Skip to content

Commit ea27206

Browse files
committed
Polishing
1 parent c48c5e7 commit ea27206

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

spring-core/src/main/java/org/springframework/core/ResolvableType.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1012,7 +1012,7 @@ public static ResolvableType forClass(@Nullable Class<?> clazz) {
10121012
/**
10131013
* Return a {@link ResolvableType} for the specified {@link Class},
10141014
* doing assignability checks against the raw class only (analogous to
1015-
* {@link Class#isAssignableFrom}), which this serves as a wrapper for.
1015+
* {@link Class#isAssignableFrom}, which this serves as a wrapper for).
10161016
* <p>For example: {@code ResolvableType.forRawClass(List.class)}.
10171017
* @param clazz the class to introspect ({@code null} is semantically
10181018
* equivalent to {@code Object.class} for typical use cases here)

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

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2020 the original author or authors.
2+
* Copyright 2002-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -32,11 +32,11 @@
3232
* its sibling {@link ResizableByteArrayOutputStream}.
3333
*
3434
* <p>Unlike {@link java.io.ByteArrayOutputStream}, this implementation is backed
35-
* by an {@link java.util.ArrayDeque} of {@code byte[]} instead of 1 constantly
35+
* by a {@link java.util.ArrayDeque} of {@code byte[]} instead of 1 constantly
3636
* resizing {@code byte[]}. It does not copy buffers when it gets expanded.
3737
*
3838
* <p>The initial buffer is only created when the stream is first written.
39-
* There is also no copying of the internal buffer if its contents is extracted
39+
* There is also no copying of the internal buffer if its content is extracted
4040
* with the {@link #writeTo(OutputStream)} method.
4141
*
4242
* @author Craig Andrews
@@ -177,10 +177,11 @@ public int size() {
177177

178178
/**
179179
* Convert the stream's data to a byte array and return the byte array.
180-
* <p>Also replaces the internal structures with the byte array to conserve memory:
181-
* if the byte array is being made anyway, mind as well as use it. This approach
182-
* also means that if this method is called twice without any writes in between,
183-
* the second call is a no-op.
180+
* <p>Also replaces the internal structures with the byte array to
181+
* conserve memory: if the byte array is being created anyway, we might
182+
* as well as use it. This approach also means that if this method is
183+
* called twice without any writes in the interim, the second call is
184+
* a no-op.
184185
* <p>This method is "unsafe" as it returns the internal buffer.
185186
* Callers should not modify the returned buffer.
186187
* @return the current contents of this output stream, as a byte array.
@@ -197,11 +198,10 @@ public byte[] toByteArrayUnsafe() {
197198
}
198199

199200
/**
200-
* Creates a newly allocated byte array.
201-
* <p>Its size is the current
202-
* size of this output stream and the valid contents of the buffer
203-
* have been copied into it.</p>
204-
* @return the current contents of this output stream, as a byte array.
201+
* Create a newly allocated byte array.
202+
* <p>Its size is the current size of this output stream, and it will
203+
* contain the valid contents of the internal buffer.
204+
* @return the current contents of this output stream, as a byte array
205205
* @see #size()
206206
* @see #toByteArrayUnsafe()
207207
*/

0 commit comments

Comments
 (0)