Commit Graph

6838 Commits

Author SHA1 Message Date
Rossen Stoyanchev
6407caac8f Merge remote-tracking branch 'origin/master' 2013-07-11 09:20:16 -04:00
Sam Brannen
a5c3c12627 Merge pull request #314 from bijukunjummen/master
* SPR-10650:
  Fix typo in ModelAndViewMethodReturnValueHandler
2013-07-11 01:33:42 +02:00
Biju Kunjummen
83ea0fb9e0 Fix typo in ModelAndViewMethodReturnValueHandler
This commit fixes a typo in the class-level Javadoc for
ModelAndViewMethodReturnValueHandler.

Issue: SPR-10650
2013-07-11 01:33:02 +02:00
Sam Brannen
907e286e77 Fix typos in HandlerAdapter 2013-07-06 15:31:12 -04:00
Rossen Stoyanchev
2a559028ad Upgrade spring-websocket to Jetty 9.0.4 2013-07-04 09:51:53 -04:00
Phillip Webb
c0e1225591 Merge branch 'SPR-10694'
* SPR-10694:
  ConversionService JSR-356 Encoder/Decoder adapters
  Add ConversionService support for ByteBuffers
2013-07-01 13:13:41 -07:00
Phillip Webb
8d6fd1ed63 ConversionService JSR-356 Encoder/Decoder adapters
Develop support class allowing JSR-356 Encoder and Decoder interfaces
to delegate to Spring's ConversionService.

Issue: SPR-10694
2013-07-01 13:12:52 -07:00
Phillip Webb
9dba73dfc9 Add ConversionService support for ByteBuffers
Add ByteBufferConverter that is registered by default with the
DefaultConversionService. Allows conversion from/to a ByteBuffer and
byte[] or to any type that can be converted via a byte[].

Issue: SPR-10712
2013-07-01 13:12:52 -07:00
Phillip Webb
638ba3fa97 Revert inadvertent change to DefaultDocumentLoader
Revert changes to DefaultDocumentLoader accidentally committed in
60532cbd1e.
2013-07-01 07:08:17 -07:00
Phillip Webb
3157b68e4a Polish MethodReference
Polish MethodReference code formatting and remove duplicate code.
2013-06-28 16:24:14 -07:00
Phillip Webb
bf4563e204 Include target types in MethodReference cache
Update the cached MethodExecutor in MethodReference to include the
target type. Prevents the incorrect use of the cache when the
SpEL expression refers to a different target object.

Issue: SPR-10657
2013-06-28 15:14:57 -07:00
Phillip Webb
60532cbd1e Polish spring-websocket code
Minor polish to formatting and assertion messages.
2013-06-27 09:58:58 -07:00
Phillip Webb
2d018e5019 Polish @RequestMapping Javadoc
Issue: SPR-10587
2013-06-26 11:15:54 -07:00
Phillip Webb
38c2f253ed 'Rename' HttpHeaders.getIfNotModifiedSince()
Effectively rename HttpHeaders.getIfNotModifiedSince() to
getIfModifiedSince() by adding a new method and deprecating the
old one.

Issue: SPR-10600
2013-06-26 10:44:35 -07:00
Phillip Webb
6a3a361376 Include specific SQL statements in batch exception
Refine the SQL statements contained in exceptions thrown from batch
updates based on BatchUpdateException.getUpdateCounts().

Issue: SPR-10677
2013-06-25 23:14:49 -07:00
Phillip Webb
5ee6bb9b9b Fix SQL syntax error in jdbcTemplate update docs
Update the reference guide jdbcTemplate update example to include the
column name.

Issue: SPR-10625
2013-06-25 22:20:41 -07:00
Phillip Webb
2abec6fd90 Include all SQL statements in batch fail exception
Ensure any exception from calls to batchUpdate, on databases that
support batch operations, contains all the SQL statements. Prior to this
commit only the last SQL statement would be returned with the exception.

Issue: SPR-10677
2013-06-25 14:50:24 -07:00
Phillip Webb
84249740b8 Merge pull request #305 from beamerblvd/SPR-10644
# By Nick Williams
* SPR-10644:
  Improving method validation support for BV 1.1
2013-06-24 13:22:35 -07:00
Nick Williams
7b2c74b05c Improving method validation support for BV 1.1
Update MethodValidationPostProcessor.setValidator(...) to use
LocalValidatorFactoryBean.getValidator() when possible.

This is required because LocalValidatorFactoryBean does not directly
implement the forExecutables() method introduced in bean validation v1.1.

Issue: SPR-10644
2013-06-24 13:21:03 -07:00
Phillip Webb
f9b12b8362 Include argument types in MethodReference cache
Update the cached MethodExecutor in MethodReference to include the
method argument types. Prevents the incorrect use of the cache when the
SpEL expression refers to a class that has overloaded methods.

Issue: SPR-10657
2013-06-24 12:28:59 -07:00
Phillip Webb
e83bdda7d5 Polish SpEL code 2013-06-24 11:22:19 -07:00
Phillip Webb
4830ea6065 Package RmiInvocationWrapperRTD.xml in jar
Ensure RmiInvocationWrapperRTD.xml is packaged inside spring-context.jar

Issue: SPR-10649
2013-06-23 23:49:05 -07:00
Phillip Webb
eea230f2a8 Allow @CachePut 'key' SpEL to refer to #result
Allow the @CachePut 'key' SpEL to refer to the result of the method call
via a '#result' variable.

This change is particularly useful when working with JPA entities that
have generated @Id values since the ID will often not be available
until the entity has been saved.

Issue: SPR-10664
2013-06-23 09:07:16 -07:00
Phillip Webb
f75d4e13a2 Polish cache abstraction code
Polish cache abstraction code and refactor CacheAspectSupport.
2013-06-23 09:07:16 -07:00
Sam Brannen
b122ca688b Add missing @since tag to SimpleKey 2013-06-22 23:57:17 +02:00
Phillip Webb
f1a18d29ba SimpleKeyGenerator to replace DefaultKeyGenerator
Introduce new SimpleKeyGenerator class to supersede DefaultKeyGenerator.
Unlike DefaultKeyGenerator, no collisions will occur with the keys
generated by SimpleKeyGenerator as the full parameter values are
considered within the SimpleKey.equals(...) method.

The SimpleKeyGenerator is now the default class used when no explicit
generator is configured.

Issue: SPR-10237
2013-06-21 12:21:29 -07:00
Phillip Webb
c720d82596 Use 'Integer' not 'int' in queryForObject docs
Update queryForObject calls in the JDBC reference documentation to
use 'Integer.class' rather than the unsupported 'int.class'.

Issue: SPR-10651
2013-06-20 23:51:52 -07:00
Phillip Webb
8ed8ee2dfe Skip abstract beans in getBeansWithAnnotation()
Update BeanFactory.getBeansWithAnnotation() to skip any abstract
bean definitions.

Issue: SPR-10663
2013-06-20 22:48:30 -07:00
Phillip Webb
a403e8f8b8 Inject @Configuration BeanFactory before autowire
Add EnhancedConfigurationBeanPostProcessor to inject the BeanFactory
into EnhancedConfiguration classes before the
AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues method
is called.

Prior to this commit it was possible for @Autowire in a @Configuration
class to invoke an enhanced configuration class method before the
BeanFactory was injected. This is due to the fact that the
AutowiredAnnotationBeanPostProcessor was called before
AbstractAutowireCapableBeanFactory.invokeAwareMethods().

Issue: SPR-10668
2013-06-20 20:21:18 -07:00
Rossen Stoyanchev
62e23363cb Fix getters to match setters in RMHA
Issue: SPR-10519
2013-06-20 20:57:24 -04:00
Rossen Stoyanchev
c6ecaacc03 Add getResult/hasResult methods to DeferredResult
Issue: SPR-10603
2013-06-20 20:57:24 -04:00
Rossen Stoyanchev
9bc4663ead Add accept(String) method to mock request builder
Issue: SPR-10390
2013-06-20 20:57:24 -04:00
Rossen Stoyanchev
4b22558a06 Add HTTP method to RequestDataValueProcessor method
Issue: SPR-10041, SPR-10652
2013-06-20 20:57:24 -04:00
Phillip Webb
26fb880622 Add mvc: prefix to mapping samples in ref docs
Add 'mvc:' namespace prefix to 'mapping' and 'exclude-mapping' elements
in the reference documentation.

Issue: SPR-10670
2013-06-20 16:17:00 -07:00
Rossen Stoyanchev
2d8315fba0 Reverse SPR-10402 change that caused 3.2.3 regression
SPR-10402 in Spring Framework 3.2.3 treated empty request parameter
values as missing values, if the empty value was turned into a null
by a PropertyEditor or Converter. This caused the regression.

Issue: SPR-10578, SPR-10402, SPR-10584
2013-06-20 16:20:01 -04:00
Rossen Stoyanchev
5feac07738 Add getLastHandler to WebSocketHandlerDecorator 2013-06-19 09:46:21 -04:00
Rossen Stoyanchev
d20dabf1fb Fix issue with obtaining WebSocketContainer 2013-06-18 20:57:33 -04:00
Sam Brannen
d5a5a4894f Add header name to ex. msg in HeaderResultMatchers
Prior to this commit, the longValue() in HeaderResultMatchers added the
expected response header name to generated assertion failure messages;
however, both string() methods did not. This made it more difficult to
analyze the cause of failed tests.

Furthermore, while investigating a solution for this issue it became
apparent that longValue() throws a NullPointerException if the response
does not contain the specified header.

This commit addresses these issues as follows:

 - All methods in HeaderResultMatchers now include the response header
   name in generated assertion failure messages.

 - HeaderResultMatchers.longValue() now avoids NullPointerExceptions by
   explicitly asserting that the response contains the specified header.

 - The unit tests in HeaderAssertionTests have been expanded to test
   most foreseeable use cases.

Issue: SPR-10659
2013-06-17 17:59:24 +02:00
Sam Brannen
8ad36ef812 Delete remaining JUnit 3.8 tests in spring-test
This commit deletes the remaining JUnit 3.8 tests in the spring-test
module that were still subclassing deprecated class hierarchies.

Issue: SPR-10499
2013-06-16 20:03:21 +02:00
Sam Brannen
d25611dd40 Move MockMultHtServReqTests to correct package
This commit relocates MockMultipartHttpServletRequestTests to the
appropriate package.
2013-06-16 19:55:35 +02:00
Sam Brannen
c06157acd3 @Ignore empty test methods in RootWacEarTests hierarchy 2013-06-16 19:47:18 +02:00
Sam Brannen
432f899b29 Reduce complexity in ContextLoaderUtilsTests
This commit refactors ContextLoaderUtilsTests into
AbstractContextLoaderUtilsTests and several specialized subclasses in
order to reduce to the growing complexity of ContextLoaderUtilsTests.
2013-06-16 17:54:55 +02:00
Sam Brannen
d126620216 Remove superfluous not-null check in ContextLoaderUtils 2013-06-16 00:38:56 +02:00
Sam Brannen
4542f362eb Merge from sbrannen/SPR-10338
* SPR-10338:
  Introduce ActiveProfilesResolver in the TCF
2013-06-16 00:04:17 +02:00
Sam Brannen
044f51283b Introduce ActiveProfilesResolver in the TCF
Prior to this commit, the active bean definition profiles to use when
loading an ApplicationContext for tests could only be configured
declaratively (i.e., via hard-coded values supplied to the 'value' or
'profiles' attribute of @ActiveProfiles).

This commit makes it possible to programmatically configure active bean
definition profiles in tests via a new ActiveProfileResolver interface.
Custom resolvers can be registered via a new 'resolver' attribute
introduced in @ActiveProfiles.

Overview of changes:

 - Introduced a new ActiveProfilesResolver API.
 - Added a 'resolver' attribute to @ActiveProfiles.
 - Updated ContextLoaderUtils.resolveActiveProfiles() to support
   ActiveProfilesResolvers.
 - Documented these new features in the reference manual.
 - Added new content to the reference manual regarding the
   'inheritProfiles' attribute of @ActiveProfiles
 - Removed the use of <lineannotation> Docbook markup in the testing
   chapter of the reference manual for Java code examples in order to
   allow comments to have proper syntax highlighting in the generated
   HTML and PDF.

Issue: SPR-10338
2013-06-16 00:01:34 +02:00
Sam Brannen
d4dcf4e4ec Merge from sbrannen/SPR-8032
* SPR-8032:
  Introduce TCP & UDP server port scanning utility
2013-06-15 13:51:27 +02:00
Sam Brannen
f311bf3daf Introduce TCP & UDP server port scanning utility
Prior to this commit the Spring Framework did not provide a public means
for scanning for available server ports. However, the Spring Framework
internally used a FreePortScanner in integration tests within its own
test suite. Furthermore, Spring Integration 2.2 provides similar support
in a SocketUtils class in the spring-integration-test module.

This commit introduces SocketUtils in spring-core to replace the
FreePortScanner which was previously only used internally within
Spring's test suite. This new implementation is inspired by both Spring
Framework's FreePortScanner and Spring Integration's SocketUtils and
consequently attempts to merge the best of both previous
implementations.

Issue: SPR-8032
2013-06-15 13:46:32 +02:00
Sam Brannen
e12311e364 Polish Javadoc 2013-06-14 16:06:57 +02:00
Phillip Webb
b78dcc59fe Make ConfClassPostPro Ordered.HIGHEST_PRECEDENCE
Make ConfigurationClassPostProcessor Ordered.HIGHEST_PRECEDENCE in
case several BeanDefinitionRegistryPostProcessors are registered.

Issue: SPR-10645
2013-06-12 11:46:48 -07:00
Phillip Webb
2e2e9b8dd0 Improve support for @Conditional on @Configuration
Introduce new ConfigurationCondition interface allowing more
fine-grained control for @Conditional when used with @Configuration
beans.

Primarily added so that the evaluation of conditions that inspect bean
definitions can be deferred until all @Configuration classes have been
parsed.

Issue: SPR-10534
2013-06-12 11:45:20 -07:00