diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/parsing/ReaderContext.java b/spring-beans/src/main/java/org/springframework/beans/factory/parsing/ReaderContext.java index 93ebbcc8e8a53bb67506b0340f371517fa8048f9..564053ee06628f8893ecff09ecd99c39b9c18df4 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/parsing/ReaderContext.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/parsing/ReaderContext.java @@ -91,7 +91,7 @@ public class ReaderContext { } /** - * Raise a fatal error. + * Raise a regular error. */ public void error(String message, @Nullable Object source) { error(message, source, null, null); diff --git a/spring-context-support/src/main/java/org/springframework/cache/jcache/JCacheCache.java b/spring-context-support/src/main/java/org/springframework/cache/jcache/JCacheCache.java index 7dfea6c3ab212ab44cc09630b20c9ced8ea0f741..54be6d678f8bcecfa9e5d05999a40399108e27b9 100644 --- a/spring-context-support/src/main/java/org/springframework/cache/jcache/JCacheCache.java +++ b/spring-context-support/src/main/java/org/springframework/cache/jcache/JCacheCache.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2015 the original author or authors. + * Copyright 2002-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-context/src/main/java/org/springframework/cache/support/NoOpCache.java b/spring-context/src/main/java/org/springframework/cache/support/NoOpCache.java index 144f69f8e940bf534ba3e37280c811f9330a2cb4..d95bc1b574622da8da98b8bb1c49a6f34b57b78c 100644 --- a/spring-context/src/main/java/org/springframework/cache/support/NoOpCache.java +++ b/spring-context/src/main/java/org/springframework/cache/support/NoOpCache.java @@ -46,7 +46,6 @@ public class NoOpCache implements Cache { } - @Override public String getName() { return this.name; diff --git a/spring-context/src/main/java/org/springframework/context/event/GenericApplicationListenerAdapter.java b/spring-context/src/main/java/org/springframework/context/event/GenericApplicationListenerAdapter.java index 127d24250f1a92fabc8315144ad5aee3ac31bd28..32f990638930d4054008222cc55c8dc6cc9ae04a 100644 --- a/spring-context/src/main/java/org/springframework/context/event/GenericApplicationListenerAdapter.java +++ b/spring-context/src/main/java/org/springframework/context/event/GenericApplicationListenerAdapter.java @@ -97,7 +97,6 @@ public class GenericApplicationListenerAdapter implements GenericApplicationList ResolvableType declaredEventType = resolveDeclaredEventType(listener.getClass()); if (declaredEventType == null || declaredEventType.isAssignableFrom( ResolvableType.forClass(ApplicationEvent.class))) { - Class> targetClass = AopUtils.getTargetClass(listener); if (targetClass != listener.getClass()) { declaredEventType = resolveDeclaredEventType(targetClass); diff --git a/spring-context/src/main/java/org/springframework/jmx/export/naming/KeyNamingStrategy.java b/spring-context/src/main/java/org/springframework/jmx/export/naming/KeyNamingStrategy.java index cd4efba2e41182d8b04db59f59e2319ff36d8552..c57cb2e3b0c894084d30f0b8b5d7d01c160f627e 100644 --- a/spring-context/src/main/java/org/springframework/jmx/export/naming/KeyNamingStrategy.java +++ b/spring-context/src/main/java/org/springframework/jmx/export/naming/KeyNamingStrategy.java @@ -110,7 +110,6 @@ public class KeyNamingStrategy implements ObjectNamingStrategy, InitializingBean * Merges the {@code Properties} configured in the {@code mappings} and * {@code mappingLocations} into the final {@code Properties} instance * used for {@code ObjectName} resolution. - * @throws IOException */ @Override public void afterPropertiesSet() throws IOException { diff --git a/spring-context/src/main/java/org/springframework/validation/DefaultMessageCodesResolver.java b/spring-context/src/main/java/org/springframework/validation/DefaultMessageCodesResolver.java index b431b89db8a918f6535df2b4c48553b20ed1498b..2d37ee4e66af686cd92663268d2796767c01ba89 100644 --- a/spring-context/src/main/java/org/springframework/validation/DefaultMessageCodesResolver.java +++ b/spring-context/src/main/java/org/springframework/validation/DefaultMessageCodesResolver.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -142,7 +142,7 @@ public class DefaultMessageCodesResolver implements MessageCodesResolver, Serial * object/field-specific code, a field-specific code, a plain error code. *
Arrays, Lists and Maps are resolved both for specific elements and * the whole collection. - *
See the {@link DefaultMessageCodesResolver class level Javadoc} for + *
See the {@link DefaultMessageCodesResolver class level javadoc} for * details on the generated codes. * @return the list of codes */ diff --git a/spring-core/src/main/java/org/springframework/core/io/VfsUtils.java b/spring-core/src/main/java/org/springframework/core/io/VfsUtils.java index 813167abd326d15088ae64b3d2d7546c891d7285..dddf8bfd18e38255749593a9eb9d7fa4a21a9703 100644 --- a/spring-core/src/main/java/org/springframework/core/io/VfsUtils.java +++ b/spring-core/src/main/java/org/springframework/core/io/VfsUtils.java @@ -91,7 +91,7 @@ public abstract class VfsUtils { Class> visitorAttributesClass = loader.loadClass(VFS3_PKG + "VisitorAttributes"); VISITOR_ATTRIBUTES_FIELD_RECURSE = visitorAttributesClass.getField("RECURSE"); } - catch (Exception ex) { + catch (Throwable ex) { throw new IllegalStateException("Could not detect JBoss VFS infrastructure", ex); } } diff --git a/spring-expression/src/main/java/org/springframework/expression/common/TemplateAwareExpressionParser.java b/spring-expression/src/main/java/org/springframework/expression/common/TemplateAwareExpressionParser.java index 0e7e1e9139a19388e424369dcaa4974a4aa0bceb..dbbff571dd1da4ab225f6c1e81f810baec43e4ea 100644 --- a/spring-expression/src/main/java/org/springframework/expression/common/TemplateAwareExpressionParser.java +++ b/spring-expression/src/main/java/org/springframework/expression/common/TemplateAwareExpressionParser.java @@ -90,6 +90,7 @@ public abstract class TemplateAwareExpressionParser implements ExpressionParser String prefix = context.getExpressionPrefix(); String suffix = context.getExpressionSuffix(); int startIdx = 0; + while (startIdx < expressionString.length()) { int prefixIndex = expressionString.indexOf(prefix, startIdx); if (prefixIndex >= startIdx) { @@ -104,22 +105,18 @@ public abstract class TemplateAwareExpressionParser implements ExpressionParser "No ending suffix '" + suffix + "' for expression starting at character " + prefixIndex + ": " + expressionString.substring(prefixIndex)); } - if (suffixIndex == afterPrefixIndex) { throw new ParseException(expressionString, prefixIndex, "No expression defined within delimiter '" + prefix + suffix + "' at character " + prefixIndex); } - String expr = expressionString.substring(prefixIndex + prefix.length(), suffixIndex); expr = expr.trim(); - if (expr.isEmpty()) { throw new ParseException(expressionString, prefixIndex, "No expression defined within delimiter '" + prefix + suffix + "' at character " + prefixIndex); } - expressions.add(doParseExpression(expr, context)); startIdx = suffixIndex + suffix.length(); } @@ -129,6 +126,7 @@ public abstract class TemplateAwareExpressionParser implements ExpressionParser startIdx = expressionString.length(); } } + return expressions.toArray(new Expression[expressions.size()]); } diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/ast/FunctionReference.java b/spring-expression/src/main/java/org/springframework/expression/spel/ast/FunctionReference.java index aa9ff91666ff3574c54d3b437228dd7d552ccf8c..a0b58ab8790da55c003399b4dd5b2ce8b2aa68b7 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/ast/FunctionReference.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/ast/FunctionReference.java @@ -62,7 +62,7 @@ public class FunctionReference extends SpelNodeImpl { public FunctionReference(String functionName, int pos, SpelNodeImpl... arguments) { - super(pos,arguments); + super(pos, arguments); this.name = functionName; } diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/ast/NullLiteral.java b/spring-expression/src/main/java/org/springframework/expression/spel/ast/NullLiteral.java index 89635ca172662e90b9abfac2eccbc977990c2f66..87dcf4f834b642434c849eeb4c54cb80f1d60d17 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/ast/NullLiteral.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/ast/NullLiteral.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2014 the original author or authors. + * Copyright 2002-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/ast/SpelNodeImpl.java b/spring-expression/src/main/java/org/springframework/expression/spel/ast/SpelNodeImpl.java index f635908a6fef502eabd841a369ff293fd51d9d17..21719576b6e2166935301c98976e0755915d54e4 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/ast/SpelNodeImpl.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/ast/SpelNodeImpl.java @@ -196,9 +196,9 @@ public abstract class SpelNodeImpl implements SpelNode, Opcodes { /** - * Generate code that handles building the argument values for the specified method. This method will take account - * of whether the invoked method is a varargs method and if it is then the argument values will be appropriately - * packaged into an array. + * Generate code that handles building the argument values for the specified method. + * This method will take account of whether the invoked method is a varargs method + * and if it is then the argument values will be appropriately packaged into an array. * @param mv the method visitor where code should be generated * @param cf the current codeflow * @param member the method or constructor for which arguments are being setup @@ -208,7 +208,7 @@ public abstract class SpelNodeImpl implements SpelNode, Opcodes { String[] paramDescriptors = null; boolean isVarargs = false; if (member instanceof Constructor) { - Constructor> ctor = (Constructor>)member; + Constructor> ctor = (Constructor>) member; paramDescriptors = CodeFlow.toDescriptors(ctor.getParameterTypes()); isVarargs = ctor.isVarArgs(); } diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/support/ReflectiveMethodExecutor.java b/spring-expression/src/main/java/org/springframework/expression/spel/support/ReflectiveMethodExecutor.java index a7f1a18451b823750488d00d34474bbf0e663cf9..b125535ce6e8bdc80c0f5809276f86f6b997d455 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/support/ReflectiveMethodExecutor.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/support/ReflectiveMethodExecutor.java @@ -59,6 +59,7 @@ public class ReflectiveMethodExecutor implements MethodExecutor { } } + public Method getMethod() { return this.method; } diff --git a/spring-jms/src/test/java/org/springframework/jms/core/JmsMessagingTemplateTests.java b/spring-jms/src/test/java/org/springframework/jms/core/JmsMessagingTemplateTests.java index c1097c0ab17560dd1ee42f46ca23e1ec89b09f23..21c0a0c06195694db48a369acfeedcc380466e32 100644 --- a/spring-jms/src/test/java/org/springframework/jms/core/JmsMessagingTemplateTests.java +++ b/spring-jms/src/test/java/org/springframework/jms/core/JmsMessagingTemplateTests.java @@ -56,7 +56,7 @@ import static org.mockito.BDDMockito.*; /** * Tests for {@link JmsMessagingTemplate}. - * + * * @author Stephane Nicoll */ public class JmsMessagingTemplateTests { diff --git a/spring-messaging/src/main/java/org/springframework/messaging/converter/ContentTypeResolver.java b/spring-messaging/src/main/java/org/springframework/messaging/converter/ContentTypeResolver.java index e75df74e5500ee1ecfdc36926f5939b2f18d8692..27676005702bf8c28095f3f9b9f6da250f3af5d0 100644 --- a/spring-messaging/src/main/java/org/springframework/messaging/converter/ContentTypeResolver.java +++ b/spring-messaging/src/main/java/org/springframework/messaging/converter/ContentTypeResolver.java @@ -34,8 +34,7 @@ public interface ContentTypeResolver { * Determine the {@link MimeType} of a message from the given MessageHeaders. * @param headers the headers to use for the resolution * @return the resolved {@code MimeType}, or {@code null} if none found - * @throws org.springframework.util.InvalidMimeTypeException if the content type - * is a String that cannot be parsed + * @throws InvalidMimeTypeException if the content type is a String that cannot be parsed * @throws IllegalArgumentException if there is a content type but its type is unknown */ @Nullable diff --git a/spring-messaging/src/main/java/org/springframework/messaging/handler/invocation/HandlerMethodReturnValueHandler.java b/spring-messaging/src/main/java/org/springframework/messaging/handler/invocation/HandlerMethodReturnValueHandler.java index fb11125c743f14f933c61ef9615b69468ea78b92..cf71cacdb752a06a6a61b99c9566e290351c0ebe 100644 --- a/spring-messaging/src/main/java/org/springframework/messaging/handler/invocation/HandlerMethodReturnValueHandler.java +++ b/spring-messaging/src/main/java/org/springframework/messaging/handler/invocation/HandlerMethodReturnValueHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2013 the original author or authors. + * Copyright 2002-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-messaging/src/main/java/org/springframework/messaging/simp/config/ChannelRegistration.java b/spring-messaging/src/main/java/org/springframework/messaging/simp/config/ChannelRegistration.java index 7cb9f095cd271cf808bfac20bfe975e071af80bd..2b6de1d36aab80b621ada18d4b942dfa24a92647 100644 --- a/spring-messaging/src/main/java/org/springframework/messaging/simp/config/ChannelRegistration.java +++ b/spring-messaging/src/main/java/org/springframework/messaging/simp/config/ChannelRegistration.java @@ -70,11 +70,15 @@ public class ChannelRegistration { } /** + * Configure interceptors for the message channel. * @deprecated as of 4.3.12, in favor of {@link #interceptors(ChannelInterceptor...)} */ @Deprecated - public ChannelRegistration setInterceptors(ChannelInterceptor... interceptors) { - return interceptors(interceptors); + public ChannelRegistration setInterceptors(@Nullable ChannelInterceptor... interceptors) { + if (interceptors != null) { + this.interceptors.addAll(Arrays.asList(interceptors)); + } + return this; } diff --git a/spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompSession.java b/spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompSession.java index 8a2a26c239550fa96d83b3ab68e6c04e25df41ca..9e854c8652762de6aa571415459764a69db1ac43 100644 --- a/spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompSession.java +++ b/spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompSession.java @@ -148,6 +148,7 @@ public interface StompSession { /** * Return the headers used on the SUBSCRIBE frame. + * @since 5.0 */ StompHeaders getSubscriptionHeaders(); @@ -160,6 +161,7 @@ public interface StompSession { * Alternative to {@link #unsubscribe()} with additional custom headers * to send to the server. *
Note: There is no need to set the subscription id. + * @since 5.0 */ void unsubscribe(@Nullable StompHeaders stompHeaders); } diff --git a/spring-messaging/src/main/java/org/springframework/messaging/simp/user/UserDestinationResult.java b/spring-messaging/src/main/java/org/springframework/messaging/simp/user/UserDestinationResult.java index 0e1680d1520087a0536a020cc973d2a101f85932..19e6cb4f5b8966e2ec9216ddd27a994e67052022 100644 --- a/spring-messaging/src/main/java/org/springframework/messaging/simp/user/UserDestinationResult.java +++ b/spring-messaging/src/main/java/org/springframework/messaging/simp/user/UserDestinationResult.java @@ -102,4 +102,5 @@ public class UserDestinationResult { return "UserDestinationResult [source=" + this.sourceDestination + ", target=" + this.targetDestinations + ", subscribeDestination=" + this.subscribeDestination + ", user=" + this.user + "]"; } + } diff --git a/spring-oxm/spring-oxm.gradle b/spring-oxm/spring-oxm.gradle index afa076025988182cf6b2ed20dde2939118ec3ae3..63948e4afc8a392bc3584263da8a64136c2a7bcc 100644 --- a/spring-oxm/spring-oxm.gradle +++ b/spring-oxm/spring-oxm.gradle @@ -2,8 +2,8 @@ description = "Spring Object/XML Marshalling" configurations { castor - xjc jibx + xjc } dependencies { diff --git a/spring-test/src/main/java/org/springframework/test/context/transaction/TransactionContext.java b/spring-test/src/main/java/org/springframework/test/context/transaction/TransactionContext.java index 8dba93e8b9af30e8ee089b012899900cc6c5dd40..5b41da14fb35361c9f1dd3169384a6c5e348c530 100644 --- a/spring-test/src/main/java/org/springframework/test/context/transaction/TransactionContext.java +++ b/spring-test/src/main/java/org/springframework/test/context/transaction/TransactionContext.java @@ -96,13 +96,15 @@ class TransactionContext { void startTransaction() { Assert.state(this.transactionStatus == null, "Cannot start a new transaction without ending the existing transaction first."); + this.flaggedForRollback = this.defaultRollback; this.transactionStatus = this.transactionManager.getTransaction(this.transactionDefinition); ++this.transactionsStarted; + if (logger.isInfoEnabled()) { logger.info(String.format( - "Began transaction (%s) for test context %s; transaction manager [%s]; rollback [%s]", - this.transactionsStarted, this.testContext, this.transactionManager, flaggedForRollback)); + "Began transaction (%s) for test context %s; transaction manager [%s]; rollback [%s]", + this.transactionsStarted, this.testContext, this.transactionManager, flaggedForRollback)); } } @@ -113,14 +115,14 @@ class TransactionContext { void endTransaction() { if (logger.isTraceEnabled()) { logger.trace(String.format( - "Ending transaction for test context %s; transaction status [%s]; rollback [%s]", this.testContext, - this.transactionStatus, flaggedForRollback)); + "Ending transaction for test context %s; transaction status [%s]; rollback [%s]", + this.testContext, this.transactionStatus, this.flaggedForRollback)); } Assert.state(this.transactionStatus != null, () -> String.format( "Failed to end transaction for test context %s: transaction does not exist.", this.testContext)); try { - if (flaggedForRollback) { + if (this.flaggedForRollback) { this.transactionManager.rollback(this.transactionStatus); } else { @@ -132,8 +134,8 @@ class TransactionContext { } if (logger.isInfoEnabled()) { - logger.info(String.format("%s transaction for test context %s.", (flaggedForRollback ? "Rolled back" - : "Committed"), this.testContext)); + logger.info(String.format("%s transaction for test context %s.", + (this.flaggedForRollback ? "Rolled back" : "Committed"), this.testContext)); } } diff --git a/spring-web/src/main/java/org/springframework/http/ResponseEntity.java b/spring-web/src/main/java/org/springframework/http/ResponseEntity.java index 81d91cff08bbcf5a68ee8cd486429b03274e8545..aac6acb9c574878314ef1b1aaf686d58678a63ad 100644 --- a/spring-web/src/main/java/org/springframework/http/ResponseEntity.java +++ b/spring-web/src/main/java/org/springframework/http/ResponseEntity.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -51,6 +51,7 @@ import org.springframework.util.ObjectUtils; * return new ResponseEntity<String>("Hello World", responseHeaders, HttpStatus.CREATED); * } * + * * Or, by using a builder accessible via static methods: *
* @RequestMapping("/handle") diff --git a/spring-web/src/main/java/org/springframework/http/client/InterceptingAsyncClientHttpRequest.java b/spring-web/src/main/java/org/springframework/http/client/InterceptingAsyncClientHttpRequest.java index a45d4165b3e29bcfd3f190b010b0eeb04055f52a..125533d6f73db4314ca6822c5cc4099d8c356c87 100644 --- a/spring-web/src/main/java/org/springframework/http/client/InterceptingAsyncClientHttpRequest.java +++ b/spring-web/src/main/java/org/springframework/http/client/InterceptingAsyncClientHttpRequest.java @@ -106,12 +106,12 @@ class InterceptingAsyncClientHttpRequest extends AbstractBufferingAsyncClientHtt return interceptor.intercept(request, body, this); } else { - URI theUri = request.getURI(); + URI uri = request.getURI(); HttpMethod method = request.getMethod(); HttpHeaders headers = request.getHeaders(); Assert.state(method != null, "No standard HTTP method"); - AsyncClientHttpRequest delegate = requestFactory.createAsyncRequest(theUri, method); + AsyncClientHttpRequest delegate = requestFactory.createAsyncRequest(uri, method); delegate.getHeaders().putAll(headers); if (body.length > 0) { StreamUtils.copy(body, delegate.getBody()); diff --git a/spring-web/src/main/java/org/springframework/web/accept/ServletPathExtensionContentNegotiationStrategy.java b/spring-web/src/main/java/org/springframework/web/accept/ServletPathExtensionContentNegotiationStrategy.java index 9ccf4dbea2524fa09a62488d63a77e5f37470ac4..ce172ad302ad255d5e78b327529d46de482e6133 100644 --- a/spring-web/src/main/java/org/springframework/web/accept/ServletPathExtensionContentNegotiationStrategy.java +++ b/spring-web/src/main/java/org/springframework/web/accept/ServletPathExtensionContentNegotiationStrategy.java @@ -90,7 +90,7 @@ public class ServletPathExtensionContentNegotiationStrategy extends PathExtensio * {@link PathExtensionContentNegotiationStrategy#getMediaTypeForResource} * with the ability to also look up through the ServletContext. * @param resource the resource to look up - * @return the MediaType for the extension or {@code null}. + * @return the MediaType for the extension, or {@code null} if none found * @since 4.3 */ @Override diff --git a/spring-web/src/main/java/org/springframework/web/context/request/ServletWebRequest.java b/spring-web/src/main/java/org/springframework/web/context/request/ServletWebRequest.java index 0161000aac0e9649a204414ef1e778dbb58b99f4..9d2bcdde7bde3f81b050cc384f6cea76e08cf63e 100644 --- a/spring-web/src/main/java/org/springframework/web/context/request/ServletWebRequest.java +++ b/spring-web/src/main/java/org/springframework/web/context/request/ServletWebRequest.java @@ -289,11 +289,11 @@ public class ServletWebRequest extends ServletRequestAttributes implements Nativ etag = padEtagIfNecessary(etag); while (ifNoneMatch.hasMoreElements()) { String clientETags = ifNoneMatch.nextElement(); - Matcher eTagMatcher = ETAG_HEADER_VALUE_PATTERN.matcher(clientETags); + Matcher etagMatcher = ETAG_HEADER_VALUE_PATTERN.matcher(clientETags); // Compare weak/strong ETags as per https://tools.ietf.org/html/rfc7232#section-2.3 - while (eTagMatcher.find()) { - if (StringUtils.hasLength(eTagMatcher.group()) && - etag.replaceFirst("^W/", "").equals(eTagMatcher.group(3))) { + while (etagMatcher.find()) { + if (StringUtils.hasLength(etagMatcher.group()) && + etag.replaceFirst("^W/", "").equals(etagMatcher.group(3))) { this.notModified = true; break; } diff --git a/spring-web/src/main/java/org/springframework/web/filter/DelegatingFilterProxy.java b/spring-web/src/main/java/org/springframework/web/filter/DelegatingFilterProxy.java index d476c70fb5428a9e250ed329c26549ecefe0ffb8..5d23ec1235490b1d63c2ba4ba5057debbc565e7b 100644 --- a/spring-web/src/main/java/org/springframework/web/filter/DelegatingFilterProxy.java +++ b/spring-web/src/main/java/org/springframework/web/filter/DelegatingFilterProxy.java @@ -162,7 +162,7 @@ public class DelegatingFilterProxy extends GenericFilterBean { * @see #setEnvironment(org.springframework.core.env.Environment) */ public DelegatingFilterProxy(String targetBeanName, @Nullable WebApplicationContext wac) { - Assert.hasText(targetBeanName, "target Filter bean name must not be null or empty"); + Assert.hasText(targetBeanName, "Target Filter bean name must not be null or empty"); this.setTargetBeanName(targetBeanName); this.webApplicationContext = wac; if (wac != null) { diff --git a/spring-web/src/main/java/org/springframework/web/method/annotation/SessionAttributesHandler.java b/spring-web/src/main/java/org/springframework/web/method/annotation/SessionAttributesHandler.java index 500ba2c93efbc8c75ca3d28039c5141704e67f3d..96c5323c39da5b7dbaa203bf9cf9b21acf3e0033 100644 --- a/spring-web/src/main/java/org/springframework/web/method/annotation/SessionAttributesHandler.java +++ b/spring-web/src/main/java/org/springframework/web/method/annotation/SessionAttributesHandler.java @@ -44,6 +44,7 @@ import org.springframework.web.context.request.WebRequest; * {@link SessionStatus#setComplete()}. * * @author Rossen Stoyanchev + * @author Juergen Hoeller * @since 3.1 */ public class SessionAttributesHandler { @@ -154,7 +155,7 @@ public class SessionAttributesHandler { * A pass-through call to the underlying {@link SessionAttributeStore}. * @param request the current request * @param attributeName the name of the attribute of interest - * @return the attribute value or {@code null} + * @return the attribute value, or {@code null} if none */ @Nullable Object retrieveAttribute(WebRequest request, String attributeName) { diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/MvcNamespaceUtils.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/MvcNamespaceUtils.java index 41d28381304ec05454b4781f98e91567c4f5eb13..3222253e33d2e44dddf8198900557fd3efe759b7 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/MvcNamespaceUtils.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/MvcNamespaceUtils.java @@ -189,7 +189,7 @@ abstract class MvcNamespaceUtils { /** * Find the {@code ContentNegotiationManager} bean created by or registered * with the {@code annotation-driven} element. - * @return a bean definition, bean reference, or null. + * @return a bean definition, bean reference, or {@code null} */ @Nullable public static Object getContentNegotiationManager(ParserContext context) { diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/ViewControllerBeanDefinitionParser.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/ViewControllerBeanDefinitionParser.java index 5dd22c7d768e5953e4601bb4e8fbc74ecbf2b014..5c275706159c6f2b38250396d0236bf406985e0a 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/ViewControllerBeanDefinitionParser.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/ViewControllerBeanDefinitionParser.java @@ -37,9 +37,9 @@ import org.springframework.web.servlet.view.RedirectView; * {@link org.springframework.beans.factory.xml.BeanDefinitionParser} that * parses the following MVC namespace elements: *
All elements result in the registration of a
@@ -56,7 +56,7 @@ import org.springframework.web.servlet.view.RedirectView;
class ViewControllerBeanDefinitionParser implements BeanDefinitionParser {
private static final String HANDLER_MAPPING_BEAN_NAME =
- "org.springframework.web.servlet.config.viewControllerHandlerMapping";
+ "org.springframework.web.servlet.config.viewControllerHandlerMapping";
@Override
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/ViewResolversBeanDefinitionParser.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/ViewResolversBeanDefinitionParser.java
index 4e2ab4bbf0ebbdeddb9970ec264ac247c2dfcbd2..d5009b9e942c460d811d9f9d5b3ddd7aa04849dc 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/ViewResolversBeanDefinitionParser.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/ViewResolversBeanDefinitionParser.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2016 the original author or authors.
+ * Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/InterceptorRegistration.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/InterceptorRegistration.java
index b11e76e36a7dc03bd9198ba1a580476a9d42e6da..23109bdf03a3d1fbebb28fe448ed5241245a6d65 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/InterceptorRegistration.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/InterceptorRegistration.java
@@ -42,11 +42,11 @@ public class InterceptorRegistration {
private final List A FreeMarker Configuration object may be used to set FreeMarker
* properties and shared objects, and allows to retrieve templates.
diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/HttpEntityMethodProcessorMockTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/HttpEntityMethodProcessorMockTests.java
index 417b3f11aa28b3bde07941fb0298178f854df9cc..aa78493f46c4a43541539e1330f767142035202f 100644
--- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/HttpEntityMethodProcessorMockTests.java
+++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/HttpEntityMethodProcessorMockTests.java
@@ -115,7 +115,6 @@ public class HttpEntityMethodProcessorMockTests {
@Before
@SuppressWarnings("unchecked")
public void setup() throws Exception {
-
stringHttpMessageConverter = mock(HttpMessageConverter.class);
given(stringHttpMessageConverter.getSupportedMediaTypes()).willReturn(Collections.singletonList(MediaType.TEXT_PLAIN));
resourceMessageConverter = mock(HttpMessageConverter.class);
diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/WebMvcStompWebSocketEndpointRegistration.java b/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/WebMvcStompWebSocketEndpointRegistration.java
index ff5b0e7d6810f3ecc2541a516c73c937c59fd345..ec87c3044ea35516a6bf81bf5a73b0d689a394d6 100644
--- a/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/WebMvcStompWebSocketEndpointRegistration.java
+++ b/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/WebMvcStompWebSocketEndpointRegistration.java
@@ -110,8 +110,7 @@ public class WebMvcStompWebSocketEndpointRegistration implements StompWebSocketE
this.registration.setTransportHandlerOverrides(handler);
}
if (!this.allowedOrigins.isEmpty()) {
- this.registration.setAllowedOrigins(
- this.allowedOrigins.toArray(new String[this.allowedOrigins.size()]));
+ this.registration.setAllowedOrigins(this.allowedOrigins.toArray(new String[this.allowedOrigins.size()]));
}
return this.registration;
}
diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/server/standard/ServletServerContainerFactoryBean.java b/spring-websocket/src/main/java/org/springframework/web/socket/server/standard/ServletServerContainerFactoryBean.java
index 25fcf7043172c25c07c3b70038114a3a634e3494..00f75c6f2d1f65bd919c9deb0651f24cce3954b3 100644
--- a/spring-websocket/src/main/java/org/springframework/web/socket/server/standard/ServletServerContainerFactoryBean.java
+++ b/spring-websocket/src/main/java/org/springframework/web/socket/server/standard/ServletServerContainerFactoryBean.java
@@ -66,7 +66,7 @@ public class ServletServerContainerFactoryBean
private ServerContainer serverContainer;
- public void setAsyncSendTimeout(long timeoutInMillis) {
+ public void setAsyncSendTimeout(Long timeoutInMillis) {
this.asyncSendTimeout = timeoutInMillis;
}
@@ -75,7 +75,7 @@ public class ServletServerContainerFactoryBean
return this.asyncSendTimeout;
}
- public void setMaxSessionIdleTimeout(long timeoutInMillis) {
+ public void setMaxSessionIdleTimeout(Long timeoutInMillis) {
this.maxSessionIdleTimeout = timeoutInMillis;
}
@@ -84,7 +84,7 @@ public class ServletServerContainerFactoryBean
return this.maxSessionIdleTimeout;
}
- public void setMaxTextMessageBufferSize(int bufferSize) {
+ public void setMaxTextMessageBufferSize(Integer bufferSize) {
this.maxTextMessageBufferSize = bufferSize;
}
@@ -93,7 +93,7 @@ public class ServletServerContainerFactoryBean
return this.maxTextMessageBufferSize;
}
- public void setMaxBinaryMessageBufferSize(int bufferSize) {
+ public void setMaxBinaryMessageBufferSize(Integer bufferSize) {
this.maxBinaryMessageBufferSize = bufferSize;
}
diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/DefaultTransportRequest.java b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/DefaultTransportRequest.java
index ff0ffb6ca489169d93c2c4dc3930c7adbe4553ce..317d8ab9fc2dd7b98f13bfa23f6d67508ace92b2 100644
--- a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/DefaultTransportRequest.java
+++ b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/DefaultTransportRequest.java
@@ -226,9 +226,7 @@ class DefaultTransportRequest implements TransportRequest {
fallbackRequest.connect(this.handler, this.future);
}
else {
- if (logger.isErrorEnabled()) {
- logger.error("No more fallback transports after " + DefaultTransportRequest.this, ex);
- }
+ logger.error("No more fallback transports after " + DefaultTransportRequest.this, ex);
if (ex != null) {
this.future.setException(ex);
}
diff --git a/src/docs/asciidoc/core/core-beans.adoc b/src/docs/asciidoc/core/core-beans.adoc
index d4dc591642d90cf70c0862a453a9628a7bc1e3b1..e20b9c03accf19e8c7bb7d3063d0121616757b88 100644
--- a/src/docs/asciidoc/core/core-beans.adoc
+++ b/src/docs/asciidoc/core/core-beans.adoc
@@ -7951,7 +7951,7 @@ Alternatively for XML configuration use the `context:load-time-weaver` element:
Once configured for the `ApplicationContext`. Any bean within that `ApplicationContext`
may implement `LoadTimeWeaverAware`, thereby receiving a reference to the load-time
weaver instance. This is particularly useful in combination with
-<