Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

first support for meta-annotations for the integration tests #201

Closed
wants to merge 174 commits into from
@giovannidalloglio

related to issue: https://jira.springsource.org/browse/SPR-7827

prior this commit, there was no support for meta-annotations in the Spring Intergation tests, now the @ContextConfiguration annotation is searched also in meta-annotations.

Eg: you can write:

@ContextConfiguration([...]) // config for HSQLDB environment
public @interface InRamEnvironment
@ContextConfiguration([...]) // config for common-core part
public @interface CommonCoreIntegrationTest
@CommonCoreIntegrationTest
@InRamEnvironment
public class OneBatchTest {

[...] // actual test methods
}
@giovannidalloglio

PS I have signed and agree to the terms of the SpringSource Individual Contributor License Agreement.

@sbrannen sbrannen was assigned
@giovannidalloglio

WARNING!!!

I just discovered that I forgot an important thing: the inheritance of the AC configuration files in integration tests!

At the moment I "put together" all @ContextConfiguration in a single list, but I miss the necessary tests to understand how to behave in case the flags inheritLocations and inheritInitializers.

I suspect (very much) that my pull request should be extended.
I'll think about these days, and I hope to deal with them.

I apologize for this momentary oversight.

philwebb and others added some commits
@philwebb philwebb Add test dependencies sources for testCompile
Update the TestSourceSetDependenciesPlugin to consider testCompile
configurations.
d52f883
@philwebb philwebb Polish test sourceSet dependencies
Remove all direct sourceSets.test.output dependencies and instead rely
on the 'test-source-set-dependencies' plugin.

This commit also updates the api JavaDoc task to ensure that
dependencies are not resolved too early.
16a3a8b
@cbeams cbeams Merge branch 'share-test-classes' into cleanup-3.2.x
* share-test-classes:
  Polish test sourceSet dependencies
  Add test dependencies sources for testCompile
bd1db73
@philwebb philwebb Replace test beans with test objects
Refactor spring-core tests to replace test beans from
'org.springframework.beans' with lighter test objects in
'org.springframework.tests.sample.objects'.
2a30fa0
@philwebb philwebb Remove duplicate test classes
Prior to this commit many test utility classes and sample beans were
duplicated across projects. This was previously necessary due to the
fact that dependent test sources were not shared during a gradle
build. Since the introduction of the 'test-source-set-dependencies'
gradle plugin this is no longer the case.

This commit attempts to remove as much duplicate code as possible,
co-locating test utilities and beans in the most suitable project.
For example, test beans are now located in the 'spring-beans'
project.

Some of the duplicated code had started to drift apart when
modifications made in one project where not ported to others. All
changes have now been consolidated and when necessary existing tests
have been refactored to account for the differences.

Conflicts:
	spring-beans/src/test/java/org/springframework/beans/factory/ConcurrentBeanFactoryTests.java
	spring-beans/src/test/java/org/springframework/beans/factory/support/BeanFactoryGenericsTests.java
	spring-beans/src/test/java/org/springframework/beans/support/PagedListHolderTests.java
42b5d6d
@cbeams cbeams Update Apache license headers for affected sources d1e6dbe
@cbeams cbeams Merge branch 'cleanup-test-duplicates' into cleanup-3.2.x
* cleanup-test-duplicates:
  Update Apache license headers for affected sources
  Remove duplicate test classes
  Replace test beans with test objects

Conflicts:
	spring-beans/src/test/java/org/springframework/beans/factory/ConcurrentBeanFactoryTests.java
	spring-beans/src/test/java/org/springframework/beans/support/PagedListHolderTests.java
b836e14
@cbeams cbeams Merge branch 'cleanup-3.2.x' into SPR-9431
Catch up to latest changes on cleanup-3.2.x in order to avoid conflicts
when adding additional commits fixing compiler warnings.
0351787
@cbeams cbeams Fix warnings due to unused import statements
Issue: SPR-9431
51b3076
@cbeams cbeams Remove duplicate test resources
The files deleted in this commit existed in identical form in two places
within a given module; typically in src/test/java and
src/test/resources. The version within src/test/resources has been
favored in all cases.

This change was prompted by associated Eclipse warnings, which have now
been quelled.

Issue: SPR-9431
15e9fe6
@cbeams cbeams Fix several miscellaneous compiler/Eclipse warnings
 - Suppress an (intentional) AspectJ warning
 - Remove unused imports
 - Suppress a [hiding] warning
 - Fix a generics warning related to extension of final types

Issue: SPR-9431
662a02b
@cbeams cbeams Move namespace tests to root integration module
Prior to this change, spring-beans contained its own META-INF containing
spring.handlers and spring.schemas files in src/main/resources; it also
had files of the same name within src/test/resources/META-INF, causing
'duplicate resource' warnings and confusion in general.

This commit moves the com.foo test package, it's associated namespace
parsing tests and test versions of META-INF files to the root project
and it's src/test integration testing folder.

Issue: SPR-9431
4272901
@cbeams cbeams Update Apache license headers for moved files
Issue: SPR-9431
6762316
@cbeams cbeams Eliminate AJ @Async warning in test case
Prior to this commit, ClassWithAsyncAnnotation#return5 forced an
unsuppressable warning in Eclipse, making it virtually impossible to
get to a zero-warnings state in the codebase.

The 'solution' here is simply to comment out the method and it's
associated test case. The 'declare warnings' functionality around
@Async is well-understood and has long been stable.

Also, the entire AnnotationAsyncExecutionAspectTests class has been
added to TestGroup#PERFORMANCE (SPR-9984), as opposed to just
asyncMethodGetsRoutedAsynchronously as it was previously, the
rationale being that all tests are actually timing dependent.

Issue: SPR-9431, SPR-9984
cf68cc5
@cbeams cbeams Merge branch 'SPR-9431' into cleanup-3.2.x
* SPR-9431:
  Eliminate AJ @Async warning in test case
  Update Apache license headers for moved files
  Move namespace tests to root integration module
  Fix several miscellaneous compiler/Eclipse warnings
  Remove duplicate test resources
  Fix warnings due to unused import statements
3a61e99
@cbeams cbeams Merge branch 'cleanup-3.2.x' into 3.2.x
* cleanup-3.2.x:
  Eliminate AJ @Async warning in test case
  Update Apache license headers for moved files
  Move namespace tests to root integration module
  Fix several miscellaneous compiler/Eclipse warnings
  Remove duplicate test resources
  Fix warnings due to unused import statements
  Update Apache license headers for affected sources
  Remove duplicate test classes
  Replace test beans with test objects
  Polish test sourceSet dependencies
  Add test dependencies sources for testCompile
895feda
@philwebb philwebb Merge branch 'cleanup-3.2.x' into SPR-10126
* cleanup-3.2.x: (37 commits)
  Eliminate AJ @Async warning in test case
  Update Apache license headers for moved files
  Move namespace tests to root integration module
  Fix several miscellaneous compiler/Eclipse warnings
  Remove duplicate test resources
  Fix warnings due to unused import statements
  Update Apache license headers for affected sources
  Remove duplicate test classes
  Replace test beans with test objects
  Polish test sourceSet dependencies
  Add test dependencies sources for testCompile
  Use unmodified 'version' when not on a topic branch
  Enable execution of TestNG tests in spring-test
  Polish support for topic branch-specific versions
  Segregate add'l long-running and performance tests
  Eliminate EBR dependencies and repository config
  Skip creation of IDEA metadata for spring-aspects
  Fix Eclipse compilation error in Gradle plugin
  Polish build.gradle
  Recursively add test dependencies
  ...
b78a8a4
@sslavic sslavic Mark all IsFastEnough tests as performance tests
This patch marks remaining/missed tests as ones belonging to
performance tests group.

Issue: SPR-9984
4c0a306
@cbeams cbeams Merge pull request #212 from sslavic/SPR-9984
# By Stevo Slavic
* sslavic/SPR-9984:
  Mark all IsFastEnough tests as performance tests
29dd91b
@cbeams cbeams Merge branch 'SPR-9984' into cleanup-3.2.x
* SPR-9984:
  Mark all IsFastEnough tests as performance tests
ad1fda5
Glyn Normington Detect split packages at build time
Split packages are a well-known anti-pattern for OSGi and a blocker for
Eclipse Virgo (which prevents split packages being accessed via its
Import-Library construct).

Split packages are also unhelpful with a traditional linear classpath
as a split package name does not uniquely identify the Spring framework
JAR from which it came, thus complicating problem diagnosis and
maintenance.

Juergen Hoeller supports this position in the following comment in
SPR-9990:

>FWIW, I generally find split packages a bad practice, even without
>OSGi in the mix. For the Spring Framework codebase, I consider a
>split-package arrangement a design accident that we want to detect
>in any case - and that we're willing to fix if it happened.
>
>I'm actually equally concerned about the source perspective: After
>all, we want a package to be comprehensible from a single glance
>at the project, not requiring the developer to jump into several
>source modules to understand the overall layout of a package.

Split packages have crept into Spring framework twice in recent months
- see SPR-9811 and SPR-9988. Currently, they are only detected once
the Spring framework has been converted to OSGi bundles and these
bundles have been tested with Eclipse Virgo.

This commit adds a build-time check for split packages to the Spring
framework build.

Issue: SPR-9990

Conflicts:

	build.gradle
00a86c3
@rwinch rwinch Example SplitPackageDetectorPlugin a27a3be
Glyn Normington Rework split package detection code
Allow packages to be split across projects which will be merged into a
single JAR file.

Make split package detection a dependency of the 'check' task. This
is idiomatic gradle as well as allowing the 'test' task (another
dependency of 'check') to be executed without split packages being
detected.

Omit the project spring-instructment-tomcat from the check on the basis
of SPR-10150.

Issues: SPR-9990, SPR-10150

Conflicts:

	build.gradle
2df08bd
@cbeams

@philwebb, this change causes ./gradlew clean api to fail, because spring-core's asmRepackJar and cglibRepackJar tasks are not executed, meaning that these JARs are not available on the classpath when javadoc is trying to resolve symbols.

Your comment states that "This commit also updates the api JavaDoc task to ensure that dependencies are not resolved too early." — what was the actual problem here? Why was it "bad" to have deps resolving early?

In any case, can you see about fixing this up? I'd prefer not to go the route of having api depend on (cglib|asm)RepackJar tasks — this means that api has to know "too much", IMO.

Thanks!

Owner

Commit f92f58d has fixed this

philwebb and others added some commits
@philwebb philwebb Gradle 'api' task depends on 'jar' tasks
Update the gradle 'api' task to depend on the 'jar' task of all
subprojects. This intern ensures that the 'asmRepackJar' and
'cglibRepackJar' tasks run which is critical for JavaDoc
generation.
f92f58d
@rstoyanchev rstoyanchev Support "X-Forwarded-Host" in UriComponentsBuilder
ServletUriComponentsBuilder now supports setting the host to the
value held in the X-Forwarded-Host [0] header used in reverse
proxy scenarios.

[0] http://tools.ietf.org/html/draft-ietf-appsawg-http-forwarded-10

Issue: SPR-10110
153508a
@philwebb philwebb Merge branch 'cleanup-3.2.x' into 3.2.x
* cleanup-3.2.x:
  Gradle 'api' task depends on 'jar' tasks
  Mark all IsFastEnough tests as performance tests
15c0971
@rstoyanchev rstoyanchev Add support for placeholders in @RequestMapping
@RequestMapping annotations now support ${...} placeholders.

Issue: SPR-9935
7bc9667
@cbeams cbeams Add 3.1 migration section to reference docs
Address error raised when using component-scan against the unqualified
"org" base package.

Issue: SPR-9843
b8f223c
@cbeams cbeams Merge branch 'SPR-9843' into 3.2.x
* SPR-9843:
  Add 3.1 migration section to reference docs
4611d15
@acogoluegnes acogoluegnes Add support for HTTP OPTIONS in Spring MVC Test
Issue: SPR-10093
a56d8f2
@rstoyanchev rstoyanchev Fix issue in BufferedImageHttpMessageConverter
This change ensures BufferedImageHttpMessageConverter writes when
"*/*" is requested.

Issue: SPR-7763
2391277
@rstoyanchev rstoyanchev Add decoding matrix variable values
Issue: SPR-10140
87109b3
@rstoyanchev rstoyanchev Update mvc chapter on annotations and proxies
Issue: SPR-10132
2ac4a8c
@rstoyanchev rstoyanchev Remove closing tag in form tag's extra hidden fields
The fields returned from a RequestDataValueProcessor are now
written as hidden fields without a closing tag.

Before:
<input type="hidden" name="xxx" value="yyy"></input>

After:
<input type="hidden" name="xxx" value="yyy" />

Issue: SPR-10103
c7d0054
@rstoyanchev rstoyanchev Merge pull request #205 from acogoluegnes/SPR-10093
* tmp:
  Add support for HTTP OPTIONS in Spring MVC Test
0760594
@cbeams cbeams Update license header for recently modified files
Issue: SPR-7763, SPR-10140, SPR-10132, SPR-10093, SPR-10103
0829cbf
@rstoyanchev rstoyanchev Update info on RestTemplate related to 401 status code
Issue: SPR-9367
24ffa5a
@rstoyanchev rstoyanchev Add option to always append 'must-revalidate'
Issue: SPR-9248
68d4a70
@rstoyanchev rstoyanchev Add option to not trim path segments in AntPathMatch
Issue: SPR-8687
f185c3a
@rstoyanchev rstoyanchev Add protected method to AbstractHandlerMethodMapping 2f6e45f
@philwebb philwebb Replace EasyMock with Mockito in spring-orm
Issue: SPR-10126
ee1ddc9
@philwebb philwebb Merge branch 'SPR-10126' into cleanup-3.2.x
* SPR-10126:
  Replace EasyMock with Mockito in spring-orm
1386479
@philwebb philwebb Merge branch 'cleanup-3.2.x' into 3.2.x
* cleanup-3.2.x:
  Replace EasyMock with Mockito in spring-orm
0b612d6
@sbrannen sbrannen Ensure JUnit & TestNG tests run in spring-test
Prior to this commit, the Gradle build configuration only executed
TestNG-based tests and effectively disabled all JUnit-based tests in the
spring-test module. Furthermore, TestNG-based tests were not properly
reported in Bamboo CI builds.

This commit ensures that both JUnit and TestNG tests are executed in the
Gradle build by defining a new testNG task within the spring-test
configuration. The test task now depends on the new testNG task.
Furthermore, the testNG task makes use of Gradle 1.3's support for
generating test reports for TestNG tests alongside reports for JUnit
tests. The net effect is that all tests are executed and reportedly
properly in Bamboo builds on the CI server.

- Enabled both JUnit and TestNG tests for the spring-test module.
- Corrected bugs in FailingBeforeAndAfterMethodsTests introduced in
  commit 3d1b386.
- Deleted the now obsolete SPR-9398.txt file.

Issue: SPR-9398
4ae9cf7
@jhoeller jhoeller Marked LocalCacheProviderProxy as deprecated (following Hibernate 3.3…
….'s CacheProvider deprecation)
10dceb1
@jhoeller jhoeller MessageSourceResourceBundle overrides JDK 1.6 containsKey method, avo…
…iding NPE in getKeys

Issue: SPR-10136
3a9ca4a
@jhoeller jhoeller AbstractAdvisingBeanPostProcessor caches per bean target class, worki…
…ng for null bean names as well

Issue: SPR-10144
97ae403
@jhoeller jhoeller MimeMessageHelper encodes attachment filename if not ASCII compliant
Issue: SPR-9258
f8a7cf9
@jhoeller jhoeller FreeMarkerConfigurationFactory properly supports TemplateLoaders when…
… recreating Configurations

Issue: SPR-9389
5e8e901
@jhoeller jhoeller SpringContextResourceAdapter implements equals/hashCode according to …
…the JCA 1.5 contract

Issue: SPR-9162
f6d7518
@jhoeller jhoeller Added dedicated sort method to AnnotationAwareOrderComparator
Issue: SPR-9625
dae4485
@jhoeller jhoeller AnnotationAwareOrderComparator is able to sort Class objects as well
Issue: SPR-10152
e806c4e
@jhoeller jhoeller AnnotationAwareOrderComparator etc ea823fd
@sbrannen sbrannen Polish Javadoc in CookieValue and RequestHeader 2427391
@rwinch rwinch Use explicit JDK versions in aspects.gradle
Previously aspects.gradle used the Gradle conventions for the source
and target compatibility. This means that unless the conventions were
updated the current JDK would be used for both source and target
compatibilty. Since an update to build.gradle changed to configure the
compileJava and compileTestJava tasks explicitly spring-aspects has
been compiled with JDK 7 compatibility.

This commit explicitly uses the source and target compatibility from
spring-core to ensure that aspects.gradle is kept up to date.

Issue: SPR-10161
91da138
@sbrannen sbrannen Update Javadoc for MockMvc
Deleted reference to the obsolete configureWarRootDir() method from the
stand-alone spring-test-mvc project.
18bf860
@philwebb philwebb Exclude stax test dependency
Exclude transitive stax 1.0 dependency to prevent compile time
eclipse errors.
a0e5394
@philwebb philwebb Exclude eclipse WTP generated artifacts c425d22
@cbeams cbeams Replace space indentation with tabs
Issue: SPR-9990
b8f408e
@cbeams cbeams Refactor detect-split-packages Gradle plugin
 - Use conventional plugin naming, i.e. "detect-split-packages" instead
   of applying plugin based on fully-qualified class name

 - Rename "diagnose" => "detect" consistently throughout plugin, task
   and method names and generally refactor naming throughout to follow
   "detect split packages" phrasing

 - Add Javadoc to DetectSplitPackagesPlugin

 - Improve error reporting when split packages are detected

   Upon detecting one or more split packages, `detectSplitPackages` now
   fails idiomatically, throwing a GradleException to signal task failure
   (as opposed to the previous approach of using an assert assertion), and
   the output reads as follows:

       $ gradle detectSplitPackages
       [...]
       :buildSrc:build UP-TO-DATE
       :detectSplitPackages FAILED

       FAILURE: Build failed with an exception.

       * What went wrong:
       Execution failed for task ':detectSplitPackages'.
       > The following split package(s) have been detected:
          - org.springframework.beans (split across spring-beans and spring-orm)
          - org.springframework.core.env (split across spring-context and spring-core)

 - DetectSplitPackagesTask now automatically attaches itself to `check`
   task lifecycle if the enclosing project contains a `check` task

 - DetectSplitPackagesTask adds itself to the 'Verification' task group,
   ensuring that it shows up correctly in `gradle tasks` task listings

 - packagesToScan now defaults to all subprojects; users may then
   customize this by removing individual subprojects from the collection

Issue: SPR-9990
654c07d
@cbeams cbeams Merge pull request #214 from glyn/SPR-9990
# By Chris Beams (2) and others
* SPR-9990:
  Refactor detect-split-packages Gradle plugin
  Replace space indentation with tabs
  Rework split package detection code
  Example SplitPackageDetectorPlugin
  Detect split packages at build time
54d2846
@cbeams cbeams Polish changes from pull request #205
 - Replace space intendation with tabs
 - Remove leading tabs on otherwise empty lines
 - Remove illegal {@link ...} syntax in Javadoc @see reference

Issue: SPR-10093
7413779
@cbeams cbeams Merge branch 'SPR-10093' into 3.2.x
* SPR-10093:
  Polish changes from pull request #205
bfdc191
@philwebb philwebb Polish DetectSplitPackagesPlugin
Polish DetectSplitPackagesPlugin to favor double-quoted strings.
c1fe3c0
@sbrannen sbrannen Improve speed of spring-test build
- Now excluding *TestSuite classes from the JUnit test task.
- Renamed SpringJUnit4SuiteTests to SpringJUnit4TestSuite so that it is
  no longer executed in the build.
- Reduced sleep time in various timing related tests.
5b147bf
@philwebb philwebb Generate eclipse project settings from gradle
Update gradle to generate the following project specific eclipse
settings:

- Java formatting
- Cleanup options
- Warning settings
- Code template with copyright header
- WTP module meta-data

In addition this commit changes the eclipse project .classpath file
to output test and main classes to different folders. This is required
to prevent eclipse WTP from packaging test classes into /WEB-INF/lib
jar files.

Issue: SPR-9518
2db7a12
@philwebb philwebb Merge branch 'SPR-9518' into 3.2.x
* SPR-9518:
  Generate eclipse project settings from gradle
68970b7
@jhoeller jhoeller JDBC parameter binding uses JDBC 3.0 ParameterMetaData (if available)…
… for type determination

Forward-ported from 3.1.2, with minor modifications for defensiveness against the JDBC driver.

Issue: SPR-10084
f0a1ff2
@rstoyanchev rstoyanchev Support multiple Validators in DataBinder
DataBinder now allows registering additional Validator instances.
This may be useful when adding a Spring Validator to a globally
registered JSR-303 LocalValidatorFactoryBean.

Issue: SPR-9436
54c873b
@philwebb philwebb Upgrade to prop-deps gradle plugin 0.0.3 5ddc313
@philwebb philwebb Consider bridge methods in SpEL properties
Revert ReflectivePropertyAccessor changes from 107fafb and instead
consider all methods when resolving properties. Methods are now
sorted such that non-bridge methods are considered before bridge
methods.

Issue: SPR-10162
fce7adc
@philwebb philwebb Polish author and copyright year e8fcde0
@philwebb philwebb Remove accidentally committed interface @Override e4c1361
@cbeams

Thanks, @sbrannen. Just noted that the copyright headers haven't been updated to 2013. Also, a minor point, but the the test methods named "OneSecond" aren't exactly accurate anymore now that the timeouts have been reduced from 1000ms to 20ms.

Owner

Good catch! I'll fix that ASAP.

sbrannen and others added some commits
@sbrannen sbrannen Fix copyright year & method names in spring-test
This commit fixes the copyright year for changes made in commit
5b147bf. In addition, method names
have been changed to reflect the semantic changes made in that same
commit.
8a37521
@sbrannen sbrannen Minor changes to AnnotationUtils
- Polished Javadoc for isAnnotationDeclaredLocally() and
  isAnnotationInherited().
- Removed unnecessary call to Arrays.asList() in
  isAnnotationDeclaredLocally().
8694a0a
@philwebb philwebb Allow 'gradle eclipse' without 'cleanEclipse'
Allow eclipse projects to be regenerated without first requiring the
'gradle cleanEclipse' task to be executed.
f57c24c
@philwebb philwebb Fix eclipse .settings generation
Fix issues where gradle would not regenerate .settings files due to
the task being considered UP-TO-DATE.
8bb6714
@philwebb philwebb Tweak eclipse warning settings
Hide raw-type, generic and resource leak warnings.
d40bd8b
@philwebb philwebb Improve exceptions for multi-operand expressions
Fix SpEL expression parser and tokenizer to provide better exceptions
when dealing with operations that expect two operands. For example,
prior to this commit the expression '/foo' would throw a NPE due
to missing operands to the left of '/'.

Issue: SPR-10146
bff36fb
@philwebb philwebb SpEL support for static finals on interfaces
Update ReflectivePropertyAccessor to search for fields on super classes
and implemented interfaces.

Although the javadoc Class.getFields() implies that all public fields
of class should be returned SpelReproTests demonstrates that this is
not always the case.

Issue: SPR-10125
ad91fa6
@rstoyanchev rstoyanchev Prepend context/servlet path to FormTag action
The Form tag now fills in the context and servlet path if not present
in the specified action.

Issue: SPR-8684
ad025b5
@rstoyanchev rstoyanchev Update Validation chapter
The Validation chapter now includes information on combining JSR-303
Bean Validation with additional Spring Validator's that don't require
the use of annotations.

Issue: SPR-9437
a16bad0
@rstoyanchev rstoyanchev Use MessageSource to resolve @ResponseStatus.reason
The reason attribute of @ResponseStatus can now be a code resolvable
through the ApplicationContext's MessageSource.

Issue: SPR-6044
9dc7b5f
@rstoyanchev rstoyanchev Add contentTypeCompatibleWith option to Spring MVC Test
An expectation such as content().contentType(MediaType.TEXT_PLAIN)
fails if the actual media type contains a charset or another parameter.
A new method allows comparing the media type and subtype only via
content().contentTypeCompatibleWith(MediaType.TEXT_PLAIN).

Issue: SPR-10165
b2d6596
@sbrannen sbrannen Fix broken test in ContentAssertionTests 33ee0ea
@sbrannen sbrannen Update copyright year, author tags, and Javadoc f3e5f8b
@jhoeller jhoeller AbstractCacheManager accepts no caches defined, allowing for EHCache …
…default cache setup

Issue: SPR-7955
a321178
@jhoeller jhoeller Polishing along with backport abbe1db
@jhoeller jhoeller Reintroduced "mode" and "proxy-target-class" attributes in spring-tas…
…k-3.1/3.2.xsd

Issue: SPR-10177
450dbb2
@jhoeller jhoeller Polishing 2cd23a7
@jhoeller jhoeller Further fixes for 3.2.1 e44b4b8
@rwinch rwinch Restore *.aj whitespace
The removal of whitespace to the *.aj files made in 1762157 cause
NoSuchMethodError for code compiled against previous versions of
spring-aspects due to a bug in AspectJ (see SPR-10178 for details).

This commit reverts all the whitespace changes made in 1762157 which
resolves the NoSuchMethodErrors.

Issue: SPR-10178
6888a6f
@cbeams cbeams Handle non-void write methods deterministically
This change resolves a specific issue with processing
java.math.BigDecimal via ExtendedBeanInfo. BigDecimal has a particular
constellation of #setScale methods that, prior to this change, had the
potential to cause ExtendedBeanInfo to throw an IntrospectionException
depending on the order in which the methods were processed.

Because JDK 7 no longer returns deterministic results from
Class#getDeclaredMethods, it became a genuine possibility - indeed a
statistical certainty that the 'wrong' setScale method handling order
happens sooner or later. Typically one could observe this failure once
out of every four test runs.

This commit introduces deterministic method ordering of all discovered
non-void returning write methods in such a way that solves the problem
for BigDecimal as well as for any other class having a similar method
arrangement.

Also:

 - Remove unnecessary cast

 - Pass no method information to PropertyDescriptor superclasses when
   invoking super(...). This ensures that any 'type mismatch'
   IntrospectionExceptions are handled locally in ExtendedBeanInfo and
   its Simple* PropertyDescriptor variants where we have full control.

Issue: SPR-10111, SPR-9702
Backport-Commit: aa3e0be (forward-ported via cherry-pick from 3.1.x)
26d5ef9
@cbeams cbeams Polish build.gradle 1944550
@cbeams cbeams Remove .aj sources from spring-aspects jar
Issue: SPR-10179
e659dea
@jhoeller jhoeller CachedIntrospectionResults.clearClassLoader(null) removes cached clas…
…ses for the system class loader

Issue: SPR-9189
6a5744e
@jhoeller jhoeller spring-jms-3.2.xsd allows for SpEL expressions in prefetch and receiv…
…e-timeout attributes

Issue: SPR-9553
d55877c
@jhoeller jhoeller Removed reference to AttributesJmxAttributeSource
Issue: SPR-8916
8a12b9e
@jhoeller jhoeller Fixed ConnectionSpecConnectionFactoryAdapter explanation
Issue: SPR-9466
cd2183f
@jhoeller jhoeller Fixed reference to "fallbackToNoOpCache" flag
Issue: SPR-9064
13cf1fc
@jhoeller jhoeller Added hint towards not using orm.hibernate3 classes with Hibernate 4
Issue: SPR-9365
be606f4
@jhoeller jhoeller AbstractDriverBasedDataSource does not rely on Properties chaining an…
…ymore

 Issue: SPR-9461
20c4ba4
@jhoeller jhoeller SpringBeanAutowiringInterceptor eagerly releases BeanFactory if post-…
…construction fails

Issue: SPR-10013
721fa9d
@jhoeller jhoeller MBeanExporter does not log warnings for manually unregistered MBeans
Issue: SPR-9451
3dd8175
@jhoeller jhoeller LocalVariableTableParameterNameDiscoverer works for bridge methods as…
… well

Issue: SPR-9429
ed952cc
@jhoeller jhoeller BridgeMethodResolver properly handles bridge methods in interfaces
Issue: SPR-9330
8c9383d
@jhoeller jhoeller ContextLoader properly detects pre-refreshed WebApplicationContext
Issue: SPR-9996
701c5f1
@jhoeller jhoeller Added "exposeAccessContext" flag JndiRmiClientInterceptor/ProxyFactor…
…yBean (for WebLogic)

Issue: SPR-9428
cca255b
@jhoeller jhoeller EhCacheManagerFactoryBean applies cacheManagerName ahead of creation …
…(for EHCache 2.5 compatibility)

Issue: SPR-9171
944e1c9
@jhoeller jhoeller Further preparations for 3.2.1 87968e5
@jhoeller jhoeller AbstractDriverBasedDataSource does not rely on Properties chaining an…
…ymore

Issue: SPR-9461
5d9ad5b
@cbeams cbeams Fix typo in reference documentation
Issue: SPR-10171
24cc333
@cbeams cbeams Fix broken Castor URLs in ref docs and mapping XML
Issue: SPR-10189
d40c8cf
@cbeams cbeams Add TimedSpringRunnerTests to performance test group
Issue: SPR-9984
fc6377c
@cbeams cbeams Merge branch 'SPR-9984' into 3.2.x
* SPR-9984:
  Add TimedSpringRunnerTests to performance test group
c97f26d
@cbeams cbeams Ensure -PtestGroups is passed through to unit tests
Issue: SPR-9984
4dc3fce
@cbeams cbeams Merge branch 'SPR-9984' into 3.2.x
* SPR-9984:
  Ensure -PtestGroups is passed through to unit tests
06017e7
@cbeams cbeams Attempt to repro ReflectionUtils performance issue
Issue: SPR-10197
cb8dc73
@cbeams cbeams Merge branch 'SPR-10197' into 3.2.x
* SPR-10197:
  Attempt to repro ReflectionUtils performance issue
3c1536a
@rstoyanchev rstoyanchev Fix ClassCastException in TilesConfigurer
Issue: SPR-10195
8e1685c
@rstoyanchev rstoyanchev Fix exception message about producible media types
Issue: SPR-10175
e4fcad9
@philwebb philwebb Support Date to String in JodaTimeConverters
Update JodaTimeConverters in include support for Date to String
conversion.

The JodaTimeFormattingTests and DateFormattingTests have been extended
to ensure that Date to String conversion is supported with or without
Joda.

Issue: SPR-10198
21becef
@rstoyanchev rstoyanchev Fix NPE in FormHttpMessageConverter
Issue: SPR-10187
0c56e86
@rstoyanchev rstoyanchev Add helpful error message to DispServlet initializer
Issue: SPR-10168
902a136
@rstoyanchev rstoyanchev Fix init order issue in RequestMappingHandlerMapping
Issue: SPR-10173
660458a
@cbeams cbeams Relax ConfigurableWebEnvironment signatures
ConfigurableWebEnvironment was introduced in 3.2.0.M1 with SPR-9439 in
order to break a cyclic dependency. At the same time, certain signatures
such as AbstractRefreshableWebApplicationContext#getEnviroment and
GenericWebApplicationContext#getEnvironment were updated to take
advantage of covariant return types and return this newer, more narrow
type and providing cast-free calls to ConfigurableWebEnvironment methods
where necessary. Similar changes were made to HttpServletBean in
3.2.0.M2 with SPR-9763.

Narrowing #getEnvironment signatures in this fashion required enforcing
at the #setEnvironment level that any Environment instance provided
(explicitly or via the EnvironmentAware callback) must be an instance of
ConfigurableWebEnvironment. This is a reasonable assertion in typical
web application scenarios, but as SPR-10138 demonstrates, there are
valid use cases in which one may want or need to inject a non-web
ConfigurableEnvironment variant, e.g. during automated unit/integration
testing.

On review, it was never strictly necessary to narrow #getEnvironment
signatures, although doing so did provided convenience and type safety.
In order to maintain as flexible and backward-compatible an arrangement
as possible, this commit relaxes these #getEnvironment signatures back
to their original, pre-3.2 state. Namely, they now return
ConfigurableEnvironment as opposed to ConfigurableWebEnvironment, and in
accordance, all instanceof assertions have been removed or relaxed to
ensure that injected Environment instances are of type
ConfigurableEnvironment.

These changes have been verified against David Winterfeldt's Spring by
Example spring-rest-services project, as described at SPR-10138.

Issue: SPR-10138, SPR-9763, SPR-9439
3cdb866
@cbeams cbeams Introduce "dummy" Environment implementation
For testing purposes in which an Environment implementation is required
but a ConfigurableEnvironment is not desirable.

All methods are no-ops and return null, therefore NPEs are likely.
d9a4fb4
@sbrannen sbrannen Polish Javadoc in Spring MVC async support
This commit fixes some typographical and grammatical errors in various
classes in Spring MVC's async support.
2a41de0
@cbeams cbeams Support XML properties in ResourcePropertySource
JDK 5 introduced an XML-based properties file syntax. This commit
ensures that when such files are supplied as the underlying resource
for a ResourcePropertySource instance, they are routed appropriately
to Properties#loadFromXML as opposed to Properties#load.

Issue: SPR-9896
3a626f9
@cbeams cbeams Merge branch 'SPR-9896' into 3.2.x
* SPR-9896:
  Support XML properties in ResourcePropertySource
d5cad15
@cbeams cbeams Remove additional xsd versions from reference docs
A few versioned xsd references still existed in xsd-configuration.xml;
this commit removes them, completing the work for SPR-10010

Issue: SPR-10010
d3f4528
@rstoyanchev rstoyanchev Make UriComponents Serializable
Issue: SPR-10186
40ed4e7
@rstoyanchev rstoyanchev Fix typo in reference docs
Issue: SPR-10204
692ced8
@jhoeller jhoeller MockHttpServletRequest's getParameter(Values) returns null for null p…
…arameter name

Issue: SPR-10192
c1a4f5c
@jhoeller jhoeller MockHttpServletResponse's getHeaderNames declares Collection instead …
…of Set for Servlet 3.0 compatibility

Issue: SPR-9885
5a773b7
@jhoeller jhoeller SpringValidationAdapter properly detects invalid value for JSR-303 fi…
…eld-level bean constraints

Issue: SPR-9332
8e75eee
@jhoeller jhoeller EntityManagerFactoryUtils finds default EntityManagerFactory in paren…
…t contexts as well

Also introduces consistent use of getBean(Class) for similar use cases across the framework, accepting a locally unique target bean even if further matching beans would be available in parent contexts (in contrast to BeanFactoryUtils.beanOfType's behavior).

Issue: SPR-10160
1a929f2
@jhoeller jhoeller Introduced NoUniqueBeanDefinitionException as a dedicated subclass of…
… NoSuchBeanDefinitionException

Issue: SPR-10194
8f103c2
@jhoeller jhoeller Final preparations for 3.2.1 0a09da7
@rstoyanchev rstoyanchev Support sub-types of ResponseEntity
Issue: SPR-10207
a3e190e
@jhoeller jhoeller Aligned XML scheduled-task elements with @Scheduled in terms of kicki…
…ng in after context refresh

Issue: SPR-9231
0efdd3d
@jhoeller jhoeller Introduced NoUniqueBeanDefinitionException as a dedicated subclass of…
… NoSuchBeanDefinitionException

Issue: SPR-10194
ece727b
@philwebb philwebb Filter build folder resources in eclipse
Apply eclipse project 'filter' to hide generated build artifacts from
the workspace.
3eec27a
@philwebb philwebb Polish AbstractContextLoader Javadoc
Fix unnecessary HTML escaping from {@code} Javadoc.
05ba366
@philwebb philwebb Test String to char[] conversion
Issue: SPR-9793
4d01d43
@rstoyanchev rstoyanchev Raise exception on missing request parameters
Issue: SPR-10193
3c09b07
@philwebb philwebb Allow TypeDescriptor array construction
Add a static factory method that can be used to create an array
TypeDescriptor with a specific element type. Allows array types
with generic elements to be constructed.

Issue: SPR-9792
9c032d5
@jhoeller jhoeller Added "awaitTerminationSeconds" property to ThreadPoolTaskExecutor/Th…
…readPoolTaskScheduler

Issue: SPR-5387
89db04e
@jhoeller jhoeller Polishing d5af9dc
@jhoeller jhoeller Final preparations for 3.2.1 5fb7530
@philwebb philwebb Consider primary attribute with getBean(Class)
Update DefaultListableBeanFactory.getBean(Class<?> beanClass) to
consider the 'primary' attribute of bean definitions. This makes
getBean() behave in the same way as autowiring.

Issue: SPR-7854
7e74fd2
@sbrannen sbrannen Polish Javadoc in TypeDescriptor
- fix @since version in array()
- format method-level Javadoc
- unescape HTML-escaped angle brackets with {@code} blocks
a1aba23
@sbrannen sbrannen Fix typo in ContextLifecycleScheduledTaskRegistrar 3b8aba9
@sbrannen sbrannen Update distribution README regarding paths
- Corrected path to 'docs/spring-framework-reference'
- Minor formatting changes
e4f1f68
@rstoyanchev rstoyanchev Add BS and VT char escape sequences to JavaScriptUtils
Issue: SPR-9983
9982b4c
@philwebb philwebb Allow nulls with multiple embedded value resolvers
Allow an embedded value resolver added to an AbstractBeanFactory to
return null without adversely effecting any subsequent resolvers.

Issue: SPR-8565
f3ff98d
@rstoyanchev rstoyanchev Suppress serialization warning 2ee70d6
@jhoeller jhoeller MBeanInfoAssembler impls expose actual method parameter names if poss…
…ible

Issue: SPR-9985
4dde7c4
@jhoeller jhoeller ThreadPoolExecutorFactoryBean exposes "createExecutor" method for cus…
…tom ThreadPoolExecutor subclasses

Issue: SPR-9435
a425d71
@jhoeller jhoeller Added further MySQL error code for DataIntegrityViolationException
Issue: SPR-9237
0dcc0f2
@jhoeller jhoeller DisposableBeanAdapter detects "shutdown" as a destroy method as well …
…(for EHCache CacheManager setup)

 Issue: SPR-9713
4c823a3
@jhoeller jhoeller Updated resolvePath javadoc to reflect Environment-based placeholder …
…resolution

Issue: SPR-9455
ede9d53
@jhoeller jhoeller ResourcePropertyResource accepts EncodedResource for properties files…
… with a specific encoding

Also added constructor with Charset argument to EncodedResource.

Issue: SPR-10096
049169d
@jhoeller jhoeller Removed pre-JDK-1.5 checks e5d9378
@jhoeller jhoeller Polishing 5759269
@jhoeller jhoeller Final preparations for 3.2.1 919aeb5
@philwebb philwebb Change merge.into project dependencies to provided
Change 'compile' dependencies to 'provided' for projects that are
merged into other projects. This seems to prevent '-sources' and
'-javadoc' jars from appearing on the classpath which can break
javadoc generation.
7f928e8
@jhoeller jhoeller Added note on thread safety to TypeConverter and SimpleTypeConverter …
…javadoc

 Issue: SPR-8659
d46a82b
@jhoeller jhoeller Made EncodedResource based variant public; consistently detect XML pr…
…operties across all variants

Issue: SPR-9078
078a1c5
@cbeams cbeams Avoid UnsupportedOperationEx. with active SecurityManager
Issue: SPR-9970
39c00c4
@cbeams cbeams Merge branch 'SPR-9970' into 3.2.x
* SPR-9970:
  Avoid UnsupportedOperationEx. with active SecurityManager
0a6727c
@jhoeller jhoeller Completed changelog entries for 3.2.1 8625504
@giovannidalloglio giovannidalloglio first support for meta-annotations for the integration tests
Issue: SPR-7827

prior this commit, there was no support for meta-annotations in the Spring Intergation tests, now the @ContextConfiguration annotation is searched also in meta-annotations.

Eg: you can write:
---------------
@ContextConfiguration([...]) // config for HSQLDB environment
public @interface InRamEnvironment
---------------
@ContextConfiguration([...]) // config for common-core part
public @interface CommonCoreIntegrationTest
---------------
@CommonCoreIntegrationTest
@InRamEnvironment
public class OneBatchTest {

[...] // actual test methods
12e9b14
@giovannidalloglio giovannidalloglio First documentation for meta-annotations support on spring-test 1855e3b
@giovannidalloglio

I fixed the problems, and rebased, but there are too much commits, I'm closing this pull request, and open a fresh new one.

@cbeams

new PR: #219

@KingBuzzer

Then you cannot use spring-orm and transitively depend on spring-jdbc and spring-tx for instance. This will probably break a lot of builds.

@KingBuzzer It's a bad practice to use undeclared dependencies. In Apache Maven world maven-dependency-plugin analyze goal can help one flush out this and similar bad practices.

Owner

@KingBuzzer,

Thanks for raising this. These particular projects are merged into other projects and it was not my intention to change the dependency scope in the published POMs. Unfortunately it appears that the merge dependency is taking precedence and this is indeed a bug.

See https://jira.springsource.org/browse/SPR-10218 for more details.

@ElArabeLoco

This breaks the form tag action in a portlet environment. In a portlet environment, the @action attribute must be kept as is, because it is usually generated by the portlet container via the portlet:actionURL/ tag, and that action does not necessarily start with the context root of the web application.

Owner

I think this issue may have been raised already (see comments in SPR-8684. If this is a different problem could you please open a new JIRA.

Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.