Permalink
Commits on Aug 28, 2012
  1. Merge pull request #125 from jeffbrown/beanbuilder

    GRAILS-4995 - Improve the handling of List and Map ctor args
    cbeams committed Aug 28, 2012
Commits on Aug 27, 2012
  1. fix test

    Copying in changes from grails/grails-core@54e2f72
    jeffbrown committed Aug 27, 2012
Commits on Aug 9, 2012
Commits on Aug 8, 2012
  1. Upgrade to Gradle 1.1 GA

    Issue: SPR-9660
    cbeams committed Aug 8, 2012
Commits on Aug 5, 2012
  1. Polish GenericTypeResolver

     - renamed resolveParameterizedReturnType() to
       resolveReturnTypeForGenericMethod()
     - fleshed out Javadoc for resolveReturnType() and
       resolveReturnTypeForGenericMethod() regarding declaration of formal
       type variables
     - improved wording in log statements and naming of local variables
       within resolveReturnTypeForGenericMethod()
    
    Issue: SPR-9493
    sbrannen committed Aug 5, 2012
Commits on Aug 3, 2012
  1. Merge pull request #113 from aclement/SPR-9613

    * SPR-9613:
      Support case-insensitive null literals in SpEL
    sbrannen committed Aug 3, 2012
  2. Support case-insensitive null literals in SpEL

    Prior to this commit null literals in SpEL expressions had to be
    specified as "null" (i.e., all lowercase).
    
    With this commit null literals in SpEL expressions are interpreted in a
    case-insensitive manner, analogous to the current support for boolean
    literals.
    
    Issue: SPR-9613
    aclement committed with sbrannen Aug 3, 2012
  3. Refactor Servlet 3 async support

    As a result of the refactoring, the AsyncContext dispatch mechanism is
    used much more centrally. Effectively every asynchronously processed
    request involves one initial (container) thread, a second thread to
    produce the handler return value asynchronously, and a third thread
    as a result of a dispatch back to the container to resume processing
    of the asynchronous resuilt.
    
    Other updates include the addition of a MockAsyncContext and support
    of related request method in the test packages of spring-web and
    spring-webmvc. Also an upgrade of a Jetty test dependency required
    to make tests pass.
    
    Issue: SPR-9433
    rstoyanchev committed Jul 24, 2012
  4. Merge pull request #112 from aclement/SPR-9612

    * SPR-9612:
      Modify SpEL Tokenizer to support methods on numbers
    sbrannen committed Aug 3, 2012
  5. Modify SpEL Tokenizer to support methods on numbers

    When attempting to parse an Integer literal expression such as
    42.toString(), SpEL currently throws a SpelParseException with a message
    similar to: "EL1041E:(pos 3): After parsing a valid expression, there is
    still more data in the expression: 'toString'". The problem here is that
    '3.' is currently considered a valid number (including the dot).
    However, SpEL succeeds at parsing an equivalent expression for a Double
    literal such as 3.14.isInfinite().
    
    To address this issue, the SpEL Tokenizer no longer consumes the
    trailing '.' on an integer as part of the integer. So '3.foo()' will now
    be parsed as '3' '.' 'foo()' and not '3.' 'foo()' -- which was what
    prevented parsing of method invocations on integers. To keep the change
    simple, the parser will no longer handle real numbers of the form
    '3.e4'. From now on they must include the extra 0 (i.e., '3.0e4').
    
    Issue: SPR-9612
    aclement committed with sbrannen Aug 3, 2012
  6. Introduce new methods in tx base test classes

    Recently new utility methods were added to JdbcTestUtils, and a
    JdbcTemplate was introduced in abstract transactional base classes in
    the TestContext framework. This presents an easy opportunity to make
    these new utility methods available as convenience methods in the base
    test classes.
    
    This commit introduces new countRowsInTableWhere() and dropTables()
    convenience methods in the abstract transactional base classes in the
    TestContext framework. These new methods internally delegate to methods
    of the same names in JdbcTestUtils.
    
    Issue: SPR-9665
    sbrannen committed Aug 3, 2012
  7. Provide JdbcTemplate in tx base classes in the TCF

    Since Spring 2.5, the abstract transactional base classes in the
    TestContext framework have defined and delegated to a protected
    SimpleJdbcTemplate instance variable; however, SimpleJdbcTemplate has
    deprecated since Spring 3.1. Consequently, subclasses of
    AbstractTransactionalJUnit4SpringContextTests and
    AbstractTransactionalTestNGSpringContextTests that use this instance
    variable suffer from seemingly unnecessary deprecation warnings.
    
    This commit addresses this issue by introducing a protected JdbcTemplate
    instance variable in abstract transactional base classes to replace the
    use of the existing SimpleJdbcTemplate. Furthermore, the existing
    simpleJdbcTemplate instance variable has been deprecated, and utility
    methods in the affected base classes now delegate to JdbcTestUtils
    instead of the now deprecated SimpleJdbcTestUtils.
    
    Issue: SPR-8990
    sbrannen committed Aug 3, 2012
  8. Merge pull request #90 from ianbrandt/SPR-9235

    * SPR-9235:
      Deprecate SimpleJdbcTestUtils in favor of JdbcTestUtils
    sbrannen committed Aug 3, 2012
  9. Deprecate SimpleJdbcTestUtils in favor of JdbcTestUtils

    Several static utility methods in SimpleJdbcTestUtils accept an instance
    of SimpleJdbcTemplate as an argument; however, SimpleJdbcTemplate has
    been deprecated since Spring 3.1 in favor of simply using JdbcTemplate
    which now also supports Java 5 language constructs such as var-args.
    Consequently, use of such methods from SimpleJdbcTestUtils results in
    deprecation warnings without an equivalent API to migrate to.
    
    This commit addresses this issue by migrating all existing methods in
    SimpleJdbcTestUtils to JdbcTestUtils. The migrated methods now accept an
    instance of JdbcTemplate as an argument, thereby avoiding the
    deprecation warnings but maintaining semantic compatibility with the
    functionality previous available in SimpleJdbcTestUtils.
    
    In addition, this commit also introduces two new methods:
    
     - countRowsInTableWhere(): counts the rows in a given table, using
       a provided `WHERE` clause
     - dropTables(): drops the tables with the specified names
    
    Issue: SPR-9235
    ianbrandt committed with sbrannen Jun 9, 2012
Commits on Aug 2, 2012
Commits on Jul 28, 2012
  1. Merge pull request #111 from sbrannen/SPR-9492

    Introduce MockEnvironment in the spring-test module
    sbrannen committed Jul 28, 2012
  2. Introduce MockEnvironment in the spring-test module

    For legacy reasons, a MockEnvironment implementation already exists in multiple places within Spring's test suite; however, it is not available to the general public.
    
    This commit promotes MockEnvironment to a first-class citizen in the spring-test module, alongside the existing MockPropertySource.
    
    In addition, the following house cleaning has been performed.
    
     - deleted MockPropertySource from the spring-expression module
     - deleted MockEnvironment from the "spring" integration testing module
     - updated test copies of MockPropertySource and MockEnvironment
     - documented MockEnvironment and MockPropertySource in the testing
       chapter of the reference manual
    
    Issue: SPR-9492
    sbrannen committed Jul 28, 2012
Commits on Jul 27, 2012
  1. Support TransactionManagementConfigurer in the TCF

    Currently the Spring TestContext Framework looks up a
    PlatformTransactionManager bean named "transactionManager". The exact
    name of the bean can be overridden via @TransactionConfiguration or
    @Transactional; however, the bean will always be looked up 'by name'.
    
    The TransactionManagementConfigurer interface that was introduced in
    Spring 3.1 provides a programmatic approach to specifying the
    PlatformTransactionManager bean to be used for annotation-driven
    transaction management, and that bean is not required to be named
    "transactionManager". However, as of Spring 3.1.2, using the
    TransactionManagementConfigurer on a @Configuration class has no effect
    on how the TestContext framework looks up the transaction manager.
    Consequently, if an explicit name or qualifier has not been specified,
    the bean must be named "transactionManager" in order for a transactional
    integration test to work.
    
    This commit addresses this issue by refactoring the
    TransactionalTestExecutionListener so that it looks up and delegates to
    a single TransactionManagementConfigurer as part of the algorithm for
    determining the transaction manager.
    
    Issue: SPR-9604
    sbrannen committed Jul 27, 2012
  2. Support single, unqualified tx manager in the TCF

    TransactionalTestExecutionListener currently requires that the
    PlatformTransactionManager bean be named "transactionManager" by
    default. Otherwise, the bean name can only be overridden via the
    transactionManager attribute of @TransactionConfiguration or the value
    attribute of @Transactional.
    
    However, if there is only a single PlatformTransactionManager in the
    test's ApplicationContext, then the requirement to specify the exact
    name of that bean (or to name it exactly "transactionManager") is often
    superfluous.
    
    This commit addresses this issue by refactoring the
    TransactionalTestExecutionListener so that it is comparable to the
    algorithm for determining the transaction manager used in
    TransactionAspectSupport for "production" code. Specifically, the TTEL
    now uses the following algorithm to retrieve the transaction manager.
    
     - look up by type and qualifier from @Transactional
     - else, look up by type and explicit name from
       @TransactionConfiguration
     - else, look up single bean by type
     - else, look up by type and default name from @TransactionConfiguration
    
    Issue: SPR-9645
    sbrannen committed Jul 27, 2012
Commits on Jul 26, 2012
  1. Support named dispatchers in MockServletContext

    Currently the getNamedDispatcher(String) method of MockServletContext
    always returns null. This poses a problem in certain testing scenarios
    since one would always expect at least a default Servlet to be present.
    This is specifically important for web application tests that involve
    the DefaultServletHttpRequestHandler which attempts to forward to the
    default Servlet after retrieving it by name. Furthermore, there is no
    way to register a named RequestDispatcher with the MockServletContext.
    
    This commit addresses these issues by introducing the following in
    MockServletContext.
    
     - a new defaultServletName property for configuring the name of the
       default Servlet, which defaults to "default"
     - named RequestDispatchers can be registered and unregistered
     - a MockRequestDispatcher is registered for the "default" Servlet
       automatically in the constructor
     - when the defaultServletName property is set to a new value the
       the current default RequestDispatcher is unregistered and replaced
       with a MockRequestDispatcher for the new defaultServletName
    
    Issue: SPR-9587
    sbrannen committed Jul 26, 2012
Commits on Jul 25, 2012
  1. Use a default for INTROSPECT_TYPE_LEVEL_MAPPING

    Usually this request attribute is set for all sub-classes of
    AbstractUrlHandlerMapping and therefore whenever
    AnnotationMethodHandlerAdapter is used. However, having a
    default value to fall back on in AnnotationMethodHandlerAdapter
    is still appropriate in general and also considering the Javadoc
    of HandlerMapping.INTROSPECT_TYPE_LEVEL_MAPPING.
    
    Issue: SPR-9629
    rstoyanchev committed Jul 25, 2012
  2. Improve tests for detection of @MVC annotations

    Issue: SPR-9601
    rstoyanchev committed Jul 25, 2012
Commits on Jul 24, 2012
  1. Fix typo in MockFilterChain

    sbrannen committed Jul 24, 2012
Commits on Jul 21, 2012
  1. Add ContentNegotiationManagerFactoryBean

    The new FactoryBean facilitates the creation of a
    ContentNegotiationManager in XML configuration.
    
    Issue: SPR-8420
    rstoyanchev committed Jul 21, 2012
  2. Add options to configure content negotiation

    The MVC Java config and the MVC namespace now support options to
    configure content negotiation. By default both support checking path
    extensions first and the "Accept" header second. For path extensions
    .json, .xml, .atom, and .rss are recognized out of the box if the
    Jackson, JAXB2, or Rome libraries are available. The ServletContext
    and the Java Activation Framework may be used as fallback options
    for path extension lookups.
    
    Issue: SPR-8420
    rstoyanchev committed Jul 21, 2012
Commits on Jul 20, 2012
  1. Add exclude patterns for mapped interceptors

    Add the ability provide exclude patterns for mapped interceptors in the
    MVC namespace and in the MVC Java config.
    
    Issue: SPR-6570
    rstoyanchev committed Jul 20, 2012
  2. Fix issue with failing test from previous commit

    Issue: SPR-9611
    rstoyanchev committed Jul 20, 2012
  3. Ensure async Callables are in sync with the call stack

    After this change each call stack level pushes and pops an async
    Callable to ensure the AsyncExecutionChain is in sync with the
    call stack. Before this change, a controller returning a "forward:"
    prefixed string caused the AsyncExecutionChain to contain a
    extra Callables that did not match the actual call stack.
    
    Issue: SPR-9611
    rstoyanchev committed Jul 20, 2012
Commits on Jul 18, 2012
  1. Create StandardServletAsyncWebRequest via reflection

    Issue: SPR-9500
    rstoyanchev committed Jul 18, 2012