Skip to content

Commit c53132e

Browse files
committed
Polishing
1 parent 03c3ec1 commit c53132e

File tree

8 files changed

+46
-55
lines changed

8 files changed

+46
-55
lines changed

spring-context/src/main/java/org/springframework/scheduling/annotation/AsyncAnnotationBeanPostProcessor.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ public class AsyncAnnotationBeanPostProcessor extends AbstractBeanFactoryAwareAd
8787
private Class<? extends Annotation> asyncAnnotationType;
8888

8989

90-
9190
public AsyncAnnotationBeanPostProcessor() {
9291
setBeforeExistingAdvisors(true);
9392
}

spring-context/src/main/java/org/springframework/validation/beanvalidation/MethodValidationInterceptor.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,6 @@
6969
* at the type level of the containing target class, applying to all public service methods
7070
* of that class. By default, JSR-303 will validate against its default group only.
7171
*
72-
* <p>This functionality requires a Bean Validation 1.1+ provider.
73-
*
7472
* @author Juergen Hoeller
7573
* @author Rossen Stoyanchev
7674
* @since 3.1

spring-context/src/main/java/org/springframework/validation/beanvalidation/MethodValidationPostProcessor.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,6 @@
6060
* inline constraint annotations. Validation groups can be specified through {@code @Validated}
6161
* as well. By default, JSR-303 will validate against its default group only.
6262
*
63-
* <p>This functionality requires a Bean Validation 1.1+ provider.
64-
*
6563
* @author Juergen Hoeller
6664
* @since 3.1
6765
* @see MethodValidationInterceptor

spring-context/src/main/java/org/springframework/validation/beanvalidation/SpringConstraintValidatorFactory.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ public SpringConstraintValidatorFactory(AutowireCapableBeanFactory beanFactory)
5656
return this.beanFactory.createBean(key);
5757
}
5858

59-
// Bean Validation 1.1 releaseInstance method
6059
@Override
6160
public void releaseInstance(ConstraintValidator<?, ?> instance) {
6261
this.beanFactory.destroyBean(instance);

spring-context/src/main/java/org/springframework/validation/beanvalidation/SpringValidatorAdapter.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@
5555
* {@link CustomValidatorBean} and {@link LocalValidatorFactoryBean},
5656
* and as the primary implementation of the {@link SmartValidator} interface.
5757
*
58-
* <p>This adapter is fully compatible with Bean Validation 1.1 as well as 2.0.
59-
*
6058
* @author Juergen Hoeller
6159
* @author Sam Brannen
6260
* @since 3.0

spring-core/src/main/java/org/springframework/core/io/buffer/DataBuffer.java

Lines changed: 43 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@
3636
* <p>{@code DataBuffer}s has a separate {@linkplain #readPosition() read} and
3737
* {@linkplain #writePosition() write} position, as opposed to {@code ByteBuffer}'s
3838
* single {@linkplain ByteBuffer#position() position}. As such, the {@code DataBuffer}
39-
* does not require a {@linkplain ByteBuffer#flip() flip} to read after writing. In general,
40-
* the following invariant holds for the read and write positions, and the capacity:
39+
* does not require a {@linkplain ByteBuffer#flip() flip} to read after writing.
40+
* In general, the following invariant holds for the read and write positions,
41+
* and the capacity:
4142
*
4243
* <blockquote>
4344
* {@code 0} {@code <=}
@@ -46,12 +47,13 @@
4647
* <i>capacity</i>
4748
* </blockquote>
4849
*
49-
* <p>The {@linkplain #capacity() capacity} of a {@code DataBuffer} is expanded on demand,
50-
* similar to {@code StringBuilder}.
50+
* <p>The {@linkplain #capacity() capacity} of a {@code DataBuffer} is expanded on
51+
* demand, similar to {@code StringBuilder}.
5152
*
52-
* <p>The main purpose of the {@code DataBuffer} abstraction is to provide a convenient wrapper
53-
* around {@link ByteBuffer} which is similar to Netty's {@link io.netty.buffer.ByteBuf} but
54-
* can also be used on non-Netty platforms (i.e. Servlet containers).
53+
* <p>The main purpose of the {@code DataBuffer} abstraction is to provide a
54+
* convenient wrapper around {@link ByteBuffer} which is similar to Netty's
55+
* {@link io.netty.buffer.ByteBuf} but can also be used on non-Netty platforms
56+
* (i.e. Servlet containers).
5557
*
5658
* @author Arjen Poutsma
5759
* @author Brian Clozel
@@ -113,8 +115,8 @@ public interface DataBuffer {
113115
* the current capacity, it will be expanded.
114116
* @param capacity the new capacity
115117
* @return this buffer
116-
* @deprecated as of 6.0, in favor of {@link #ensureWritable(int)}, which
117-
* has different semantics
118+
* @deprecated as of 6.0, in favor of {@link #ensureWritable(int)}
119+
* which has different semantics
118120
*/
119121
@Deprecated(since = "6.0")
120122
DataBuffer capacity(int capacity);
@@ -240,16 +242,16 @@ default int forEachByte(int index, int length, ByteProcessor processor) {
240242
DataBuffer write(byte b);
241243

242244
/**
243-
* Write the given source into this buffer, starting at the current writing position
244-
* of this buffer.
245+
* Write the given source into this buffer, starting at the current writing
246+
* position of this buffer.
245247
* @param source the bytes to be written into this buffer
246248
* @return this buffer
247249
*/
248250
DataBuffer write(byte[] source);
249251

250252
/**
251-
* Write at most {@code length} bytes of the given source into this buffer, starting
252-
* at the current writing position of this buffer.
253+
* Write at most {@code length} bytes of the given source into this buffer,
254+
* starting at the current writing position of this buffer.
253255
* @param source the bytes to be written into this buffer
254256
* @param offset the index within {@code source} to start writing from
255257
* @param length the maximum number of bytes to be written from {@code source}
@@ -258,17 +260,17 @@ default int forEachByte(int index, int length, ByteProcessor processor) {
258260
DataBuffer write(byte[] source, int offset, int length);
259261

260262
/**
261-
* Write one or more {@code DataBuffer}s to this buffer, starting at the current
262-
* writing position. It is the responsibility of the caller to
263+
* Write one or more {@code DataBuffer}s to this buffer, starting at the
264+
* current writing position. It is the responsibility of the caller to
263265
* {@linkplain DataBufferUtils#release(DataBuffer) release} the given data buffers.
264266
* @param buffers the byte buffers to write into this buffer
265267
* @return this buffer
266268
*/
267269
DataBuffer write(DataBuffer... buffers);
268270

269271
/**
270-
* Write one or more {@link ByteBuffer} to this buffer, starting at the current
271-
* writing position.
272+
* Write one or more {@link ByteBuffer} to this buffer, starting at the
273+
* current writing position.
272274
* @param buffers the byte buffers to write into this buffer
273275
* @return this buffer
274276
*/
@@ -321,36 +323,37 @@ else if (cr.isOverflow()) {
321323
}
322324

323325
/**
324-
* Create a new {@code DataBuffer} whose contents is a shared subsequence of this
325-
* data buffer's content. Data between this data buffer and the returned buffer is
326-
* shared; though changes in the returned buffer's position will not be reflected
327-
* in the reading nor writing position of this data buffer.
326+
* Create a new {@code DataBuffer} whose contents is a shared subsequence
327+
* of this data buffer's content. Data between this data buffer and the
328+
* returned buffer is shared; though changes in the returned buffer's
329+
* position will not be reflected in the reading nor writing position
330+
* of this data buffer.
328331
* <p><strong>Note</strong> that this method will <strong>not</strong> call
329-
* {@link DataBufferUtils#retain(DataBuffer)} on the resulting slice: the reference
330-
* count will not be increased.
332+
* {@link DataBufferUtils#retain(DataBuffer)} on the resulting slice:
333+
* the reference count will not be increased.
331334
* @param index the index at which to start the slice
332335
* @param length the length of the slice
333336
* @return the specified slice of this data buffer
334-
* @deprecated as of 6.0, in favor of {@link #split(int)}, which
335-
* has different semantics
337+
* @deprecated as of 6.0, in favor of {@link #split(int)}
338+
* which has different semantics
336339
*/
337340
@Deprecated(since = "6.0")
338341
DataBuffer slice(int index, int length);
339342

340343
/**
341-
* Create a new {@code DataBuffer} whose contents is a shared, retained subsequence of this
342-
* data buffer's content. Data between this data buffer and the returned buffer is
343-
* shared; though changes in the returned buffer's position will not be reflected
344-
* in the reading nor writing position of this data buffer.
344+
* Create a new {@code DataBuffer} whose contents is a shared, retained subsequence
345+
* of this data buffer's content. Data between this data buffer and the returned
346+
* buffer is shared; though changes in the returned buffer's position will not be
347+
* reflected in the reading nor writing position of this data buffer.
345348
* <p><strong>Note</strong> that unlike {@link #slice(int, int)}, this method
346-
* <strong>will</strong> call {@link DataBufferUtils#retain(DataBuffer)} (or equivalent) on the
347-
* resulting slice.
349+
* <strong>will</strong> call {@link DataBufferUtils#retain(DataBuffer)}
350+
* (or equivalent) on the resulting slice.
348351
* @param index the index at which to start the slice
349352
* @param length the length of the slice
350353
* @return the specified, retained slice of this data buffer
351354
* @since 5.2
352-
* @deprecated as of 6.0, in favor of {@link #split(int)}, which
353-
* has different semantics
355+
* @deprecated as of 6.0, in favor of {@link #split(int)}
356+
* which has different semantics
354357
*/
355358
@Deprecated(since = "6.0")
356359
default DataBuffer retainedSlice(int index, int length) {
@@ -359,12 +362,10 @@ default DataBuffer retainedSlice(int index, int length) {
359362

360363
/**
361364
* Splits this data buffer into two at the given index.
362-
*
363365
* <p>Data that precedes the {@code index} will be returned in a new buffer,
364366
* while this buffer will contain data that follows after {@code index}.
365367
* Memory between the two buffers is shared, but independent and cannot
366368
* overlap (unlike {@link #slice(int, int) slice}).
367-
*
368369
* <p>The {@linkplain #readPosition() read} and
369370
* {@linkplain #writePosition() write} position of the returned buffer are
370371
* truncated to fit within the buffers {@linkplain #capacity() capacity} if
@@ -384,22 +385,22 @@ default DataBuffer retainedSlice(int index, int length) {
384385
* will not be reflected in the reading nor writing position of this data buffer.
385386
* @return this data buffer as a byte buffer
386387
* @deprecated as of 6.0, in favor of {@link #toByteBuffer(ByteBuffer)},
387-
* {@link #readableByteBuffers()}, or {@link #writableByteBuffers()}.
388+
* {@link #readableByteBuffers()} or {@link #writableByteBuffers()}
388389
*/
389390
@Deprecated(since = "6.0")
390391
ByteBuffer asByteBuffer();
391392

392393
/**
393-
* Expose a subsequence of this buffer's bytes as a {@link ByteBuffer}. Data between
394-
* this {@code DataBuffer} and the returned {@code ByteBuffer} is shared; though
395-
* changes in the returned buffer's {@linkplain ByteBuffer#position() position}
394+
* Expose a subsequence of this buffer's bytes as a {@link ByteBuffer}. Data
395+
* between this {@code DataBuffer} and the returned {@code ByteBuffer} is shared;
396+
* though changes in the returned buffer's {@linkplain ByteBuffer#position() position}
396397
* will not be reflected in the reading nor writing position of this data buffer.
397398
* @param index the index at which to start the byte buffer
398399
* @param length the length of the returned byte buffer
399400
* @return this data buffer as a byte buffer
400401
* @since 5.0.1
401402
* @deprecated as of 6.0, in favor of {@link #toByteBuffer(int, ByteBuffer, int, int)},
402-
* {@link #readableByteBuffers()}, or {@link #writableByteBuffers()}.
403+
* {@link #readableByteBuffers()} or {@link #writableByteBuffers()}
403404
*/
404405
@Deprecated(since = "6.0")
405406
ByteBuffer asByteBuffer(int index, int length);
@@ -553,6 +554,7 @@ interface ByteBufferIterator extends Iterator<ByteBuffer>, Closeable {
553554
void close();
554555
}
555556

557+
556558
/**
557559
* Process a range of bytes one by one.
558560
* @since 6.2.12
@@ -565,10 +567,9 @@ interface ByteProcessor {
565567
* should continue further.
566568
* @param b a byte from the {@link DataBuffer}
567569
* @return {@code true} if processing should continue,
568-
* or {@code false} if processing should stop at this element.
570+
* or {@code false} if processing should stop at this element
569571
*/
570572
boolean process(byte b);
571-
572573
}
573574

574575
}

spring-web/src/main/java/org/springframework/web/bind/support/SpringWebConstraintValidatorFactory.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ public class SpringWebConstraintValidatorFactory implements ConstraintValidatorF
4444
return getWebApplicationContext().getAutowireCapableBeanFactory().createBean(key);
4545
}
4646

47-
// Bean Validation 1.1 releaseInstance method
4847
@Override
4948
public void releaseInstance(ConstraintValidator<?, ?> instance) {
5049
getWebApplicationContext().getAutowireCapableBeanFactory().destroyBean(instance);

spring-webmvc/src/main/java/org/springframework/web/servlet/view/xslt/XsltView.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -431,11 +431,10 @@ protected void configureResponse(Map<String, Object> model, HttpServletResponse
431431
private Templates loadTemplates() throws ApplicationContextException {
432432
Source stylesheetSource = getStylesheetSource();
433433
try {
434-
Templates templates = getTransformerFactory().newTemplates(stylesheetSource);
435-
return templates;
434+
return getTransformerFactory().newTemplates(stylesheetSource);
436435
}
437436
catch (TransformerConfigurationException ex) {
438-
throw new ApplicationContextException("Can't load stylesheet from '" + getUrl() + "'", ex);
437+
throw new ApplicationContextException("Cannot load stylesheet from '" + getUrl() + "'", ex);
439438
}
440439
finally {
441440
closeSourceIfNecessary(stylesheetSource);
@@ -474,7 +473,7 @@ protected Source getStylesheetSource() {
474473
return new StreamSource(resource.getInputStream(), resource.getURI().toASCIIString());
475474
}
476475
catch (IOException ex) {
477-
throw new ApplicationContextException("Can't load XSLT stylesheet from '" + url + "'", ex);
476+
throw new ApplicationContextException("Cannot load XSLT stylesheet from '" + url + "'", ex);
478477
}
479478
}
480479

0 commit comments

Comments
 (0)