Sam Brannen

Set Gradle Daemon JVM args compatible with JDK 9

This commit adds the following to gradle.properties in order to execute

the Gradle daemon on JDK 9, since Gradle's DaemonParameters

automatically sets the MaxPermSize JVM argument, which is no longer

supported on JDK 9.

org.gradle.jvmargs=-XX:MaxMetaspaceSize=1024m -Xmx1024m

Issue: SPR-12549

Simplify Groovy ContextLoaders in the TCF

This commit simplifies the implementations of loadBeanDefinitions() in

GenericGroovyXmlContextLoader and GenericGroovyXmlWebContextLoader.

Due to the recent bug fix for GroovyBeanDefinitionReader regarding full

support for XML config files, these Groovy context loaders can now

simply use a GroovyBeanDefinitionReader instead of a

GroovyBeanDefinitionReader plus an XmlBeanDefinitionReader.

Issue: SPR-12769

Fully support XML config in GroovyBeanDefinitionReader

Prior to this commit, the GroovyBeanDefinitionReader claimed (via its

Javadoc) that it fully supported XML configuration files in addition to

its Groovy DSL; however, this was unfortunately inaccurate since XML

validation was disabled by default which led to certain features of XML

configuration not working. For example, it was impossible to define a

<qualifier> in an XML config file without specifying the 'type'

attribute (which has a default value defined in the spring-beans XSD).

This commit fixes this issue by ensuring that bean definitions in XML

resources are loaded with a "standard" XmlBeanDefinitionReader that is

created with default settings (i.e., with XML validation enabled). With

regard to backwards compatibility, bean definitions defined using the

Groovy DSL are still loaded with an XmlBeanDefinitionReader that has

XML validation disabled by default which is necessary for proper

parsing of the Groovy DSL.

Issue: SPR-12769

(cherry picked from commit 7edc7c2c8f3e98a9c61d4c9520489d132c00e0a0)

Fully support XML config in GroovyBeanDefinitionReader

Prior to this commit, the GroovyBeanDefinitionReader claimed (via its

Javadoc) that it fully supported XML configuration files in addition to

its Groovy DSL; however, this was unfortunately inaccurate since XML

validation was disabled by default which led to certain features of XML

configuration not working. For example, it was impossible to define a

<qualifier> in an XML config file without specifying the 'type'

attribute (which has a default value defined in the spring-beans XSD).

This commit fixes this issue by ensuring that bean definitions in XML

resources are loaded with a "standard" XmlBeanDefinitionReader that is

created with default settings (i.e., with XML validation enabled). With

regard to backwards compatibility, bean definitions defined using the

Groovy DSL are still loaded with an XmlBeanDefinitionReader that has

XML validation disabled by default which is necessary for proper

parsing of the Groovy DSL.

Issue: SPR-12769

Polish Javadoc for GroovyBeanDefinitionReader

Polish Javadoc for GroovyBeanDefinitionReader

Support XML config fully in web integration tests

Prior to this commit, it was impossible to use all features of XML

configuration (e.g., the <qualifier> tag) in web-based integration

tests (loaded using @WebAppConfiguration, @ContextConfiguration, etc.)

if the Groovy library was on the classpath. The reason is that the

GroovyBeanDefinitionReader used internally by

GenericGroovyXmlWebContextLoader disables XML validation for its

internal XmlBeanDefinitionReader, and this prevents some XML

configuration features from working properly. For example, the default

value for the 'type' attribute (defined in the spring-beans XSD) of the

<qualifier> tag gets ignored, resulting in an exception when the

application context is loaded.

This commit addresses this issue by refactoring the implementation of

loadBeanDefinitions() in GenericGroovyXmlWebContextLoader to use an

XmlBeanDefinitionReader or GroovyBeanDefinitionReader depending on the

file extension of the resource location from which bean definitions

should be loaded. This aligns the functionality of

GenericGroovyXmlWebContextLoader with the existing functionality of

GenericGroovyXmlContextLoader.

Issue: SPR-12768

(cherry picked from commit 2ba1151b7fa3fcd3b0c964fc377ce57671eabb8b)

Support XML config fully in web integration tests

Prior to this commit, it was impossible to use all features of XML

configuration (e.g., the <qualifier> tag) in web-based integration

tests (loaded using @WebAppConfiguration, @ContextConfiguration, etc.)

if the Groovy library was on the classpath. The reason is that the

GroovyBeanDefinitionReader used internally by

GenericGroovyXmlWebContextLoader disables XML validation for its

internal XmlBeanDefinitionReader, and this prevents some XML

configuration features from working properly. For example, the default

value for the 'type' attribute (defined in the spring-beans XSD) of the

<qualifier> tag gets ignored, resulting in an exception when the

application context is loaded.

This commit addresses this issue by refactoring the implementation of

loadBeanDefinitions() in GenericGroovyXmlWebContextLoader to use an

XmlBeanDefinitionReader or GroovyBeanDefinitionReader depending on the

file extension of the resource location from which bean definitions

should be loaded. This aligns the functionality of

GenericGroovyXmlWebContextLoader with the existing functionality of

GenericGroovyXmlContextLoader.

Issue: SPR-12768

Delete unused import in AsyncTests

Include charset in EncodedResource.equals()

Prior to this commit, the implementation of equals() in EncodedResource

was based solely on the resource and encoding. Thus, if a Charset were

specified instead of an encoding, invocations of equals() would not

work as expected.

This commit addresses this issue by including the charset in the

implementation of equals() and introducing corresponding tests in a new

EncodedResourceTests class. Furthermore, this commit makes

EncodedResource immutable and updates all Javadoc to reflect support

for the encoding and charset properties.

Issue: SPR-12767

Include charset in EncodedResource.equals()

Prior to this commit, the implementation of equals() in EncodedResource

was based solely on the resource and encoding. Thus, if a Charset were

specified instead of an encoding, invocations of equals() would not

work as expected.

This commit addresses this issue by including the charset in the

implementation of equals() and introducing corresponding tests in a new

EncodedResourceTests class. Furthermore, this commit makes

EncodedResource immutable and updates all Javadoc to reflect support

for the encoding and charset properties.

Issue: SPR-12767

(cherry picked from commit 93c70b7440783e9b047a52ee3ff9dec5d45300a6)

Include charset in EncodedResource.equals()

Prior to this commit, the implementation of equals() in EncodedResource

was based solely on the resource and encoding. Thus, if a Charset were

specified instead of an encoding, invocations of equals() would not

work as expected.

This commit addresses this issue by including the charset in the

implementation of equals() and introducing corresponding tests in a new

EncodedResourceTests class. Furthermore, this commit makes

EncodedResource immutable and updates all Javadoc to reflect support

for the encoding and charset properties.

Issue: SPR-12767

(cherry picked from commit 93c70b7440783e9b047a52ee3ff9dec5d45300a6)

Polish Javadoc for ScriptStatementFailedException constructor

Issue: SPR-12752

Polish Javadoc for ScriptStatementFailedException.buildErrorMessage()

Issue: SPR-12752

Update Eclipse JDT settings for Java 8

  • classes now compiled with `-parameters`
  • formatting for lambda expressions
  • formatting for type annotations
    • -0
    • +5
    /src/eclipse/org.eclipse.jdt.core.prefs

Polish Javadoc for ResourcePropertySource

Introduce buildErrorMessage() utility in ScriptStatementFailedException

To eliminate code duplication, ScriptStatementFailedException and

ScriptUtils now delegate to a new buildErrorMessage() utility method.

Issue: SPR-12752

Implement description consistently across Resources

This commit ensures Resources have consistent, non-empty, meaningful

implementations for getDescription(), thus ensuring that calls to

toString() (e.g., in log statements) no longer return an empty String.

This commit also polishes the Javadoc for various Resource

implementations.

Refer to statement numbers in ScriptStatementFailedException

ScriptStatementFailedException now properly refers to statement numbers

instead of line numbers.

Issue: SPR-12752

Refer to statement numbers in ScriptStatementFailedException

ScriptStatementFailedException now properly refers to statement numbers

instead of line numbers.

Issue: SPR-12752

(cherry picked from commit 291b3de72bcf290f07ce901c422e7f5031163e99)

Polish StreamConverter(Tests)

Polish ScheduledTaskRegistrar(Tests)

@NumberFormat & @DateTimeFormat are now @Documented

Polish Javadoc & imports for BeanDefinitionDocumentReaders

Return exception from convertJmsInvokerAccessException()

The convertJmsInvokerAccessException() method in

JmsInvokerClientInterceptor now correctly returns the converted

exception instead of throwing it.

Polish Javadoc for JmsInvokerClientInterceptor

Polish reference manual regarding WebSocket

  • fixed typos
  • improved grammar and punctuation
  • fixed class names

(cherry picked from commit c7a456c0bfd4edfca7ac7f854c5b0009b659d45c)

Polish reference manual regarding WebSocket

  • fixed typos
  • improved grammar and punctuation
  • fixed class names

Make TestPropertySourceUtils more robust

  • Added assertions for pre-conditions on method arguments for all

    public utility methods.

  • Introduced additional tests in TestPropertySourceUtilsTests to verify

    the new pre-conditions.

  • Introduced INLINED_PROPERTIES_PROPERTY_SOURCE_NAME constant for the

    name of the MapPropertySource created from inlined properties; the

    name therefore no longer contains the inlined properties, but the

    original values of the inlined properties can now be logged at debug

    level.

  • Simplified tests in InlinedPropertiesTestPropertySourceTests.

Issue: SPR-12721

(cherry picked from commit 42af33034d84327340e4bd53ec3f6c5bba626069)

Make TestPropertySourceUtils more robust

  • Added assertions for pre-conditions on method arguments for all

    public utility methods.

  • Introduced additional tests in TestPropertySourceUtilsTests to verify

    the new pre-conditions.

  • Introduced INLINED_PROPERTIES_PROPERTY_SOURCE_NAME constant for the

    name of the MapPropertySource created from inlined properties; the

    name therefore no longer contains the inlined properties, but the

    original values of the inlined properties can now be logged at debug

    level.

  • Simplified tests in InlinedPropertiesTestPropertySourceTests.

Issue: SPR-12721