diff --git a/spring-context/src/main/java/org/springframework/scheduling/annotation/AsyncAnnotationBeanPostProcessor.java b/spring-context/src/main/java/org/springframework/scheduling/annotation/AsyncAnnotationBeanPostProcessor.java index 2b467ab6f06..d47552e6af9 100644 --- a/spring-context/src/main/java/org/springframework/scheduling/annotation/AsyncAnnotationBeanPostProcessor.java +++ b/spring-context/src/main/java/org/springframework/scheduling/annotation/AsyncAnnotationBeanPostProcessor.java @@ -87,7 +87,6 @@ public class AsyncAnnotationBeanPostProcessor extends AbstractBeanFactoryAwareAd private Class asyncAnnotationType; - public AsyncAnnotationBeanPostProcessor() { setBeforeExistingAdvisors(true); } diff --git a/spring-context/src/main/java/org/springframework/validation/beanvalidation/MethodValidationInterceptor.java b/spring-context/src/main/java/org/springframework/validation/beanvalidation/MethodValidationInterceptor.java index 836462406a0..39c85182f40 100644 --- a/spring-context/src/main/java/org/springframework/validation/beanvalidation/MethodValidationInterceptor.java +++ b/spring-context/src/main/java/org/springframework/validation/beanvalidation/MethodValidationInterceptor.java @@ -69,8 +69,6 @@ import org.springframework.validation.method.ParameterValidationResult; * at the type level of the containing target class, applying to all public service methods * of that class. By default, JSR-303 will validate against its default group only. * - *

This functionality requires a Bean Validation 1.1+ provider. - * * @author Juergen Hoeller * @author Rossen Stoyanchev * @since 3.1 diff --git a/spring-context/src/main/java/org/springframework/validation/beanvalidation/MethodValidationPostProcessor.java b/spring-context/src/main/java/org/springframework/validation/beanvalidation/MethodValidationPostProcessor.java index 5e23dd4152c..a049c7336f7 100644 --- a/spring-context/src/main/java/org/springframework/validation/beanvalidation/MethodValidationPostProcessor.java +++ b/spring-context/src/main/java/org/springframework/validation/beanvalidation/MethodValidationPostProcessor.java @@ -60,8 +60,6 @@ import org.springframework.validation.method.MethodValidationResult; * inline constraint annotations. Validation groups can be specified through {@code @Validated} * as well. By default, JSR-303 will validate against its default group only. * - *

This functionality requires a Bean Validation 1.1+ provider. - * * @author Juergen Hoeller * @since 3.1 * @see MethodValidationInterceptor diff --git a/spring-context/src/main/java/org/springframework/validation/beanvalidation/SpringConstraintValidatorFactory.java b/spring-context/src/main/java/org/springframework/validation/beanvalidation/SpringConstraintValidatorFactory.java index 8354be65c5d..f46bd7dfd53 100644 --- a/spring-context/src/main/java/org/springframework/validation/beanvalidation/SpringConstraintValidatorFactory.java +++ b/spring-context/src/main/java/org/springframework/validation/beanvalidation/SpringConstraintValidatorFactory.java @@ -56,7 +56,6 @@ public class SpringConstraintValidatorFactory implements ConstraintValidatorFact return this.beanFactory.createBean(key); } - // Bean Validation 1.1 releaseInstance method @Override public void releaseInstance(ConstraintValidator instance) { this.beanFactory.destroyBean(instance); diff --git a/spring-context/src/main/java/org/springframework/validation/beanvalidation/SpringValidatorAdapter.java b/spring-context/src/main/java/org/springframework/validation/beanvalidation/SpringValidatorAdapter.java index 75cee767215..d14b5251814 100644 --- a/spring-context/src/main/java/org/springframework/validation/beanvalidation/SpringValidatorAdapter.java +++ b/spring-context/src/main/java/org/springframework/validation/beanvalidation/SpringValidatorAdapter.java @@ -55,8 +55,6 @@ import org.springframework.validation.SmartValidator; * {@link CustomValidatorBean} and {@link LocalValidatorFactoryBean}, * and as the primary implementation of the {@link SmartValidator} interface. * - *

This adapter is fully compatible with Bean Validation 1.1 as well as 2.0. - * * @author Juergen Hoeller * @author Sam Brannen * @since 3.0 diff --git a/spring-core/src/main/java/org/springframework/core/io/buffer/DataBuffer.java b/spring-core/src/main/java/org/springframework/core/io/buffer/DataBuffer.java index 2161e6be793..0ac03091a48 100644 --- a/spring-core/src/main/java/org/springframework/core/io/buffer/DataBuffer.java +++ b/spring-core/src/main/java/org/springframework/core/io/buffer/DataBuffer.java @@ -36,8 +36,9 @@ import org.springframework.util.Assert; *

{@code DataBuffer}s has a separate {@linkplain #readPosition() read} and * {@linkplain #writePosition() write} position, as opposed to {@code ByteBuffer}'s * single {@linkplain ByteBuffer#position() position}. As such, the {@code DataBuffer} - * does not require a {@linkplain ByteBuffer#flip() flip} to read after writing. In general, - * the following invariant holds for the read and write positions, and the capacity: + * does not require a {@linkplain ByteBuffer#flip() flip} to read after writing. + * In general, the following invariant holds for the read and write positions, + * and the capacity: * *

* {@code 0} {@code <=} @@ -46,12 +47,13 @@ import org.springframework.util.Assert; * capacity *
* - *

The {@linkplain #capacity() capacity} of a {@code DataBuffer} is expanded on demand, - * similar to {@code StringBuilder}. + *

The {@linkplain #capacity() capacity} of a {@code DataBuffer} is expanded on + * demand, similar to {@code StringBuilder}. * - *

The main purpose of the {@code DataBuffer} abstraction is to provide a convenient wrapper - * around {@link ByteBuffer} which is similar to Netty's {@link io.netty.buffer.ByteBuf} but - * can also be used on non-Netty platforms (i.e. Servlet containers). + *

The main purpose of the {@code DataBuffer} abstraction is to provide a + * convenient wrapper around {@link ByteBuffer} which is similar to Netty's + * {@link io.netty.buffer.ByteBuf} but can also be used on non-Netty platforms + * (i.e. Servlet containers). * * @author Arjen Poutsma * @author Brian Clozel @@ -113,8 +115,8 @@ public interface DataBuffer { * the current capacity, it will be expanded. * @param capacity the new capacity * @return this buffer - * @deprecated as of 6.0, in favor of {@link #ensureWritable(int)}, which - * has different semantics + * @deprecated as of 6.0, in favor of {@link #ensureWritable(int)} + * which has different semantics */ @Deprecated(since = "6.0") DataBuffer capacity(int capacity); @@ -240,16 +242,16 @@ public interface DataBuffer { DataBuffer write(byte b); /** - * Write the given source into this buffer, starting at the current writing position - * of this buffer. + * Write the given source into this buffer, starting at the current writing + * position of this buffer. * @param source the bytes to be written into this buffer * @return this buffer */ DataBuffer write(byte[] source); /** - * Write at most {@code length} bytes of the given source into this buffer, starting - * at the current writing position of this buffer. + * Write at most {@code length} bytes of the given source into this buffer, + * starting at the current writing position of this buffer. * @param source the bytes to be written into this buffer * @param offset the index within {@code source} to start writing from * @param length the maximum number of bytes to be written from {@code source} @@ -258,8 +260,8 @@ public interface DataBuffer { DataBuffer write(byte[] source, int offset, int length); /** - * Write one or more {@code DataBuffer}s to this buffer, starting at the current - * writing position. It is the responsibility of the caller to + * Write one or more {@code DataBuffer}s to this buffer, starting at the + * current writing position. It is the responsibility of the caller to * {@linkplain DataBufferUtils#release(DataBuffer) release} the given data buffers. * @param buffers the byte buffers to write into this buffer * @return this buffer @@ -267,8 +269,8 @@ public interface DataBuffer { DataBuffer write(DataBuffer... buffers); /** - * Write one or more {@link ByteBuffer} to this buffer, starting at the current - * writing position. + * Write one or more {@link ByteBuffer} to this buffer, starting at the + * current writing position. * @param buffers the byte buffers to write into this buffer * @return this buffer */ @@ -321,36 +323,37 @@ public interface DataBuffer { } /** - * Create a new {@code DataBuffer} whose contents is a shared subsequence of this - * data buffer's content. Data between this data buffer and the returned buffer is - * shared; though changes in the returned buffer's position will not be reflected - * in the reading nor writing position of this data buffer. + * Create a new {@code DataBuffer} whose contents is a shared subsequence + * of this data buffer's content. Data between this data buffer and the + * returned buffer is shared; though changes in the returned buffer's + * position will not be reflected in the reading nor writing position + * of this data buffer. *

Note that this method will not call - * {@link DataBufferUtils#retain(DataBuffer)} on the resulting slice: the reference - * count will not be increased. + * {@link DataBufferUtils#retain(DataBuffer)} on the resulting slice: + * the reference count will not be increased. * @param index the index at which to start the slice * @param length the length of the slice * @return the specified slice of this data buffer - * @deprecated as of 6.0, in favor of {@link #split(int)}, which - * has different semantics + * @deprecated as of 6.0, in favor of {@link #split(int)} + * which has different semantics */ @Deprecated(since = "6.0") DataBuffer slice(int index, int length); /** - * Create a new {@code DataBuffer} whose contents is a shared, retained subsequence of this - * data buffer's content. Data between this data buffer and the returned buffer is - * shared; though changes in the returned buffer's position will not be reflected - * in the reading nor writing position of this data buffer. + * Create a new {@code DataBuffer} whose contents is a shared, retained subsequence + * of this data buffer's content. Data between this data buffer and the returned + * buffer is shared; though changes in the returned buffer's position will not be + * reflected in the reading nor writing position of this data buffer. *

Note that unlike {@link #slice(int, int)}, this method - * will call {@link DataBufferUtils#retain(DataBuffer)} (or equivalent) on the - * resulting slice. + * will call {@link DataBufferUtils#retain(DataBuffer)} + * (or equivalent) on the resulting slice. * @param index the index at which to start the slice * @param length the length of the slice * @return the specified, retained slice of this data buffer * @since 5.2 - * @deprecated as of 6.0, in favor of {@link #split(int)}, which - * has different semantics + * @deprecated as of 6.0, in favor of {@link #split(int)} + * which has different semantics */ @Deprecated(since = "6.0") default DataBuffer retainedSlice(int index, int length) { @@ -359,12 +362,10 @@ public interface DataBuffer { /** * Splits this data buffer into two at the given index. - * *

Data that precedes the {@code index} will be returned in a new buffer, * while this buffer will contain data that follows after {@code index}. * Memory between the two buffers is shared, but independent and cannot * overlap (unlike {@link #slice(int, int) slice}). - * *

The {@linkplain #readPosition() read} and * {@linkplain #writePosition() write} position of the returned buffer are * truncated to fit within the buffers {@linkplain #capacity() capacity} if @@ -384,22 +385,22 @@ public interface DataBuffer { * will not be reflected in the reading nor writing position of this data buffer. * @return this data buffer as a byte buffer * @deprecated as of 6.0, in favor of {@link #toByteBuffer(ByteBuffer)}, - * {@link #readableByteBuffers()}, or {@link #writableByteBuffers()}. + * {@link #readableByteBuffers()} or {@link #writableByteBuffers()} */ @Deprecated(since = "6.0") ByteBuffer asByteBuffer(); /** - * Expose a subsequence of this buffer's bytes as a {@link ByteBuffer}. Data between - * this {@code DataBuffer} and the returned {@code ByteBuffer} is shared; though - * changes in the returned buffer's {@linkplain ByteBuffer#position() position} + * Expose a subsequence of this buffer's bytes as a {@link ByteBuffer}. Data + * between this {@code DataBuffer} and the returned {@code ByteBuffer} is shared; + * though changes in the returned buffer's {@linkplain ByteBuffer#position() position} * will not be reflected in the reading nor writing position of this data buffer. * @param index the index at which to start the byte buffer * @param length the length of the returned byte buffer * @return this data buffer as a byte buffer * @since 5.0.1 * @deprecated as of 6.0, in favor of {@link #toByteBuffer(int, ByteBuffer, int, int)}, - * {@link #readableByteBuffers()}, or {@link #writableByteBuffers()}. + * {@link #readableByteBuffers()} or {@link #writableByteBuffers()} */ @Deprecated(since = "6.0") ByteBuffer asByteBuffer(int index, int length); @@ -553,6 +554,7 @@ public interface DataBuffer { void close(); } + /** * Process a range of bytes one by one. * @since 6.2.12 @@ -565,10 +567,9 @@ public interface DataBuffer { * should continue further. * @param b a byte from the {@link DataBuffer} * @return {@code true} if processing should continue, - * or {@code false} if processing should stop at this element. + * or {@code false} if processing should stop at this element */ boolean process(byte b); - } } diff --git a/spring-web/src/main/java/org/springframework/web/bind/support/SpringWebConstraintValidatorFactory.java b/spring-web/src/main/java/org/springframework/web/bind/support/SpringWebConstraintValidatorFactory.java index f53ef9c638d..e0cc1e33710 100644 --- a/spring-web/src/main/java/org/springframework/web/bind/support/SpringWebConstraintValidatorFactory.java +++ b/spring-web/src/main/java/org/springframework/web/bind/support/SpringWebConstraintValidatorFactory.java @@ -44,7 +44,6 @@ public class SpringWebConstraintValidatorFactory implements ConstraintValidatorF return getWebApplicationContext().getAutowireCapableBeanFactory().createBean(key); } - // Bean Validation 1.1 releaseInstance method @Override public void releaseInstance(ConstraintValidator instance) { getWebApplicationContext().getAutowireCapableBeanFactory().destroyBean(instance); diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/xslt/XsltView.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/xslt/XsltView.java index a0ebec16357..b3d433adf5e 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/xslt/XsltView.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/xslt/XsltView.java @@ -431,11 +431,10 @@ public class XsltView extends AbstractUrlBasedView { private Templates loadTemplates() throws ApplicationContextException { Source stylesheetSource = getStylesheetSource(); try { - Templates templates = getTransformerFactory().newTemplates(stylesheetSource); - return templates; + return getTransformerFactory().newTemplates(stylesheetSource); } catch (TransformerConfigurationException ex) { - throw new ApplicationContextException("Can't load stylesheet from '" + getUrl() + "'", ex); + throw new ApplicationContextException("Cannot load stylesheet from '" + getUrl() + "'", ex); } finally { closeSourceIfNecessary(stylesheetSource); @@ -474,7 +473,7 @@ public class XsltView extends AbstractUrlBasedView { return new StreamSource(resource.getInputStream(), resource.getURI().toASCIIString()); } catch (IOException ex) { - throw new ApplicationContextException("Can't load XSLT stylesheet from '" + url + "'", ex); + throw new ApplicationContextException("Cannot load XSLT stylesheet from '" + url + "'", ex); } }