Commit Graph

6087 Commits

Author SHA1 Message Date
Phillip Webb 57d68b070e Expose Gradle buildSrc for IDE support
Create 'spring-build-src' Gradle module that exposes the buildSrc
folder as an IDE project.
2013-01-01 14:53:42 -08:00
Phillip Webb 6626a38730 Fix [deprecation] compiler warnings
Fix deprecation compiler warnings by refactoring code or applying
@SuppressWarnings("deprecation") annotations. JUnit tests of
internally deprecated classes are now themselves marked as
@Deprecated.

Numerous EasyMock deprecation warnings will remain until the
migration to mockito can be completed.
2013-01-01 13:42:15 -08:00
Phillip Webb 9364043a64 Upgrade to xmlunit version 1.3 2013-01-01 13:26:49 -08:00
Phillip Webb 938c24bb9e Improve 'build' folder ignores
Update .gitignore to only ignore 'build' folders in the project roots
rather than throughout the source tree.
2013-01-01 13:24:05 -08:00
Chris Beams 38f84fa03e Merge branch 'SPR-10115' into 3.2.x
* SPR-10115:
  Fix regression in static setter method support
2012-12-31 14:50:38 +01:00
Chris Beams 7a19fd5750 Fix regression in static setter method support
The intention of ExtendedBeanInfo, introduced with SPR-8079 in
v3.1.0.M2, was to support dependency injection against non-void
returning write methods. However, it also inadvertently introduced
support for injection against static setter methods.

When use of ExtendedBeanInfo was made optional with SPR-9723 in
v3.2.0.M2, ExtendedBeanInfo continued to support static write methods,
but its new BeanInfoFactory-based approach to testing whether or not
a given bean class contains candidate write methods was written in a
fashion exclusive of static methods, and this thereby introduced a
regression - a regression in an otherwise undocumented and unintended
feature, but a regression nevertheless.

The reporting of SPR-10115 proves that at least one user has come to
depend on this behavior allowing injection against static write
methods, and so this commit fixes the regression by ensuring that the
candidacy test includes standard and non-void setter methods having a
static modifier.

Issue: SPR-10115, SPR-9723, SPR-8079
2012-12-31 14:16:38 +01:00
Chris Beams 0ed9cb2302 Merge pull request #206 from daveboden/SPR-10122
* SPR-10122:
  Fix SpEL JavaBean compliance for setters
2012-12-31 11:52:18 +01:00
Chris Beams d91a419fdc Fix SpEL JavaBean compliance for setters
Prior to this change, SpEL was capable of handling getter methods for
property names having a lowercase first letter and uppercase second
letter such as:

    public String getiD() { ... }

However, setters with the same naming arrangement were not supported,
e.g.:

    public void setiD() { ... }

This commit ensures that setters and getters are treated by SpEL equally
in this regard, such that "iD"-style property names may be used anywhere
within SpEL expressions.

Issue: SPR-10122, SPR-9123
2012-12-31 11:40:53 +01:00
Chris Beams 55a05744f7 Merge branch 'SPR-9984' into 3.2.x
* SPR-9984:
  Add aop target source test to TestGroup.PERFORMANCE
2012-12-29 01:05:46 +01:00
Chris Beams 90d1886cbd Add aop target source test to TestGroup.PERFORMANCE
Issue: SPR-9984
2012-12-29 01:04:57 +01:00
Chris Beams 1220611f4a Merge branch 'SPR-9984' into 3.2.x
* SPR-9984:
  Add quartz scheduling test to TestGroup.PERFORMANCE
2012-12-29 00:24:20 +01:00
Chris Beams c005757775 Add quartz scheduling test to TestGroup.PERFORMANCE
Issue: SPR-9984
2012-12-29 00:23:52 +01:00
Chris Beams b83e2617ce Merge pull request #208 from tommack/typo-fix
# By Tom Mack
* typo-fix:
  Remove extra URL prefix in the MVC chapter
2012-12-28 23:18:59 +01:00
Tom Mack 005ee7385f Remove extra URL prefix in the MVC chapter
A link in the MVC chapter of the reference manual contained an extra
"http://" URL prefix.

This commit removes the extra "http://" URL prefix.
2012-12-28 23:18:18 +01:00
Sam Brannen 11d975bfef Polish contributor guidelines 2012-12-28 23:17:52 +01:00
Chris Beams 7736dc3122 Merge branch 'cleanup-3.2.x' into 3.2.x
* cleanup-3.2.x: (21 commits)
  Update Apache license headers for affected sources
  Ignore performance-sensitive tests by default
  Introduce 'spring-build-junit' subproject
  Replace EasyMock with Mockito in test sources
  Add @Override annotations to test sources
  Update test source and target JDK compatibility
  Update -Xlint compiler warning output
  Fix various compiler warnings in spring-context
  Fix "unnecessary @SuppressWarnings" warnings
  Fix [rawtypes] compiler warnings
  Fix [dep-ann] warnings with @Deprecated
  Fix [cast] compiler warnings
  Fix [serial] compiler warnings
  Fix [varargs] compiler warnings
  Fix warnings due to unused import statements
  Replace <code> with {@code} throughout Javadoc
  Fix various Javadoc warnings
  Replace space indentation with tabs
  Remove trailing whitespace in source files
  Various updates to support IDEA
  ...
2012-12-28 23:16:54 +01:00
Chris Beams 8472a2b2ab Update Apache license headers for affected sources 2012-12-28 23:09:31 +01:00
Chris Beams e7155616a5 Merge branch 'SPR-9984' into cleanup-3.2.x
* SPR-9984:
  Ignore performance-sensitive tests by default
  Introduce 'spring-build-junit' subproject
2012-12-28 23:08:56 +01:00
Phillip Webb 60032e0012 Ignore performance-sensitive tests by default
Make use of the new JUnit functionality introduced in the previous
commit to 'Assume' that perfomance- and timing-sensitive tests should
run only when TestGroup.PERFORMANCE is selected, i.e. when
-PtestGroups="performance" has been provided at the Gradle command line.

The net effect is that these tests are now ignored by default, which
will result in far fewer false-negative CI build failures due to
resource contention and other external factors that cause slowdowns.

We will set up a dedicated performance CI build to run these tests on
an isolated machine, etc.

Issue: SPR-9984
2012-12-28 23:08:37 +01:00
Phillip Webb b083bbdec7 Introduce 'spring-build-junit' subproject
Introduce new 'spring-build-junit' subproject containing shared
JUnit utilities and classes to be used by other test cases. This
project is for internal use within the framework, and therefore
creates no artifacts to be published to any repository.

The initial code includes support for JUnit Assumptions that can
be used to determine when a test should run. Tests can be skipped
based on the running JDK version, logging level or based on specific
'groups' that have activated via a Gradle property.

It is intended that sources within the spring-build-junit project be
folded into spring-core/src/test/java, pending some Gradle work that
will facilitate sharing test output across subprojects; therefore this
commit should be seen as a temporary solution.

Issue: SPR-9984
2012-12-28 23:08:37 +01:00
Chris Beams 330457be95 Merge branch 'SPR-10126' into cleanup-3.2.x
* SPR-10126:
  Replace EasyMock with Mockito in test sources
2012-12-28 23:07:27 +01:00
Phillip Webb d66c733ef4 Replace EasyMock with Mockito in test sources
Issue: SPR-10126
2012-12-28 23:07:04 +01:00
Chris Beams cbf6991d47 Merge branch 'SPR-10129' into cleanup-3.2.x
* SPR-10129:
  Add @Override annotations to test sources
  Update test source and target JDK compatibility
2012-12-28 23:06:22 +01:00
Chris Beams 4c8cd7b0bd Add @Override annotations to test sources
Issue: SPR-10129
2012-12-28 23:05:44 +01:00
Chris Beams 6f0c7eb8c1 Update test source and target JDK compatibility
"test" source and target compatibility has been upgraded to 1.7 except
where noted, allowing us to use 1.7 language features such as
diamond-style (<>) generics declarations, automatic resource management
and multi-catch. More importantly, we will be able to upgrade to 1.8
once it is available in order to make use of lambda expressions, etc in
our test cases.

IDE configurations must be relaxed to allow 1.7 across the board, as
neither Eclipse nor IDEA are clever enough to allow for different
language levels across production and test resources. See [1] for a
feature request on that front.

spring-oxm is a special case here, and has been pinned at 1.6
compatibility even for its test sources in order to avoid a class
verification error that JibX throws when encountering 1.7-level
bytecode [2].

Likewise with spring-orm, toplink encounters a similar class
verification error, so has been pinned to 1.6 for the time being.
When we remove the (already deprecated since 3.2) Toplink support
we can restore compatibility to 1.7.

[1]: http://youtrack.jetbrains.com/issue/IDEA-97814
[2]: http://jira.codehaus.org/browse/JIBX-465

Issue: SPR-10129
2012-12-28 23:04:44 +01:00
Chris Beams aa824641ab Merge branch 'SPR-9431' into cleanup-3.2.x
* SPR-9431:
  Update -Xlint compiler warning output
  Fix various compiler warnings in spring-context
  Fix "unnecessary @SuppressWarnings" warnings
  Fix [rawtypes] compiler warnings
  Fix [dep-ann] warnings with @Deprecated
  Fix [cast] compiler warnings
  Fix [serial] compiler warnings
  Fix [varargs] compiler warnings
  Fix warnings due to unused import statements
2012-12-28 22:56:04 +01:00
Phillip Webb 3ac45547cf Update -Xlint compiler warning output
Enable output for the compiler warnings that have been eliminated so
far. 'rawtypes', 'deprecation', and 'unchecked' remain suppressed until
these warnings can be fully eliminated as well.
2012-12-28 22:53:48 +01:00
Chris Beams 40357be72b Fix various compiler warnings in spring-context
All warning types other than [deprecation] and [unchecked] are now
fixed in spring-context/src/test
2012-12-28 22:50:46 +01:00
Chris Beams 4c7cafbde6 Fix "unnecessary @SuppressWarnings" warnings 2012-12-28 22:50:46 +01:00
Chris Beams 8d2e125e7b Fix [rawtypes] compiler warnings
- Suppress rawtypes warnings for src/main
 - Enable rawtypes warnings for src/test

This commit attempts to to resolve all rawtypes problems across tests as
aggressively as possible, i.e. without regard for binary compatibility,
whereas main sources must be treated much more cautiously with an eye
toward compatibility.
2012-12-28 22:50:46 +01:00
Chris Beams 4d97ff2479 Fix [dep-ann] warnings with @Deprecated 2012-12-28 22:50:45 +01:00
Phillip Webb 6c14eaad61 Fix [cast] compiler warnings 2012-12-28 22:41:06 +01:00
Phillip Webb b0986049a3 Fix [serial] compiler warnings
Fix serialization warnings by applying @SuppressWarnings("serial")
when appropriate.

In certain cases and for unknown reasons, a correctly-placed
@SuppressWarnings("serial") annotation will fix the warning at the
javac level (i.e. the Gradle command-line), but will produce an
"unnecessary @SuppressWarnings" warning within Eclipse. In these
cases, a private static final serialVersionUID field has been added
with the default value of 1L.
2012-12-28 22:41:06 +01:00
Phillip Webb 7f0aa5cfb2 Fix [varargs] compiler warnings
Remove unnecessary 'null' argument from calls to vararg supported
methods and fix cast in ValidationUtils.invokeValidator().
2012-12-28 22:40:49 +01:00
Phillip Webb 731d5be644 Fix warnings due to unused import statements 2012-12-28 22:40:49 +01:00
Chris Beams fe039030a0 Merge branch 'SPR-10128' into cleanup-3.2.x
* SPR-10128:
  Replace <code> with {@code} throughout Javadoc
  Fix various Javadoc warnings
2012-12-28 22:36:32 +01:00
Chris Beams 9540d2c81b Replace <code> with {@code} throughout Javadoc
Issue: SPR-10128
2012-12-28 22:36:02 +01:00
Chris Beams 8597ec25ec Fix various Javadoc warnings
Issue: SPR-10128
2012-12-28 22:36:02 +01:00
Chris Beams 84e2be4412 Merge branch 'SPR-10127' into cleanup-3.2.x
* SPR-10127:
  Replace space indentation with tabs
  Remove trailing whitespace in source files
2012-12-28 20:53:32 +01:00
Phillip Webb 2cf45bad86 Replace space indentation with tabs
Issue: SPR-10127
2012-12-28 20:49:56 +01:00
Phillip Webb 1762157ad1 Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
    xargs perl -p -i -e "s/[ \t]*$//g" {} \;

Issue: SPR-10127
2012-12-28 20:49:45 +01:00
Chris Beams 44a474a014 Various updates to support IDEA
Remove the 'final' modifier from SingletonBeanFactoryLocatorTests
to work around the "cannot extend final class" error issued when
running all tests. The error was due to confusion with IDEA between
the two variants of SingletonBeanFactoryLocatorTests across
spring-context and spring-beans.

Rename one of the GroovyMessenger classes to GroovyMessenger2.
Previously there were multiple Groovy classes named
'GroovyMessenger', causing a compilation error in certain IDE
arrangements.

Update import-into-idea.md documentation

Add various IDEA artifacts to .gitignore
 - ignore derby.log wherever it is written
 - ignore IDEA's test-output directory
 - ignore IDEA's Atlassian connector config file
2012-12-28 19:50:04 +01:00
Chris Beams e78a1dcdd1 Merge branch 'SPR-10124' into cleanup-3.2.x
* SPR-10124:
  Support snapshot versions qualified by branch name
2012-12-28 19:47:58 +01:00
Chris Beams 426b099965 Support snapshot versions qualified by branch name 2012-12-28 13:15:21 +01:00
Chris Beams 0758e72465 Update contributor guidelines regarding 3.2.x branch 2012-12-28 10:26:29 +01:00
Chris Beams 3724b90a8f Add spring-oxm-1.5.xsd
Issue: SPR-10121
2012-12-26 09:31:00 +01:00
Phillip Webb 1abb7f66a7 Fix GenericConversionService search algorithm
Previously the algorithm used by GenericConversionService to find
converters incorrectly searched for interfaces working up from the
base class. This caused particular problems with custom List
converters as as the Collection interface would be considered before
the List interface giving CollectionToObjectConverter precedence
over the custom converter.

The updated algorithm restores the class search order to behave in the
same way as Spring 3.1.

Issue: SPR-10116
Backport-Issue: SPR-10117
Backport-Commit: aa914497dc
2012-12-22 11:53:00 -08:00
Juergen Hoeller a30ee0164a Initial preparations for 3.2.1 2012-12-20 17:35:31 +01:00
Juergen Hoeller c242abada1 Fixed QualifierAnnotationAutowireCandidateResolver's detection of custom qualifier annotations
Issue: SPR-10107
2012-12-20 17:35:02 +01:00
Juergen Hoeller 047db8cdf8 Fixed AbstractAutoProxyCreator to accept null bean names again
Issue: SPR-10108
2012-12-20 17:33:26 +01:00