Commit Graph

71 Commits

Author SHA1 Message Date
Rob Winch 9468548116 Add @Override to remaining source files
Issue: SPR-10130
2013-05-13 17:04:56 -05:00
Juergen Hoeller ad886503f1 Revised ReflectiveMethodResolver to properly handle any kind of List returned from a MethodFilter
Issue: SPR-10392
2013-05-07 21:56:17 +02:00
Juergen Hoeller 2a44228b98 Consistent use of <pre class="code">
Issue: SPR-8108
2013-05-07 21:31:26 +02:00
Juergen Hoeller 5ff2653d92 Added "getName()" accessor to MethodReference
Issue: SPR-10422
2013-04-30 22:37:34 +02:00
Juergen Hoeller 9c09a0a037 Consistent Map/Set ordering
Use LinkedHashMaps/Sets wherever exposed to users, and code tests defensively in terms of expected Map/Set ordering. Otherwise, there'll be runtime order differences between JDK 7 and JDK 8 due to internal HashMap/Set implementation differences.

Issue: SPR-9639
2013-04-23 13:53:09 +02:00
Phillip Webb 761bd9fd56 Merge branch '3.2.x'
* 3.2.x:
  Update javadoc external links
  JdbcTemplate etc
  Removed unnecessary default value of LifecycleGroup.lifecycleBeans
  Introduced public ArgumentPreparedStatementSetter and ArgumentTypePreparedStatementSetter classes
  Defensively uses JDBC 3.0 getParameterType call for Oracle driver compatibility
  Preparations for 3.2.3
  Fixed ReflectiveMethodResolver to avoid potential UnsupportedOperationException on sort
  Fixed Jaxb2Marshaller's partial unmarshalling feature to consistently apply to all sources
  Update copyright year in reference documentation

Conflicts:
	build.gradle
	gradle.properties
	spring-context/src/main/java/org/springframework/context/support/DefaultLifecycleProcessor.java
	spring-jdbc/src/main/java/org/springframework/jdbc/core/ArgumentPreparedStatementSetter.java
	spring-jdbc/src/main/java/org/springframework/jdbc/core/ArgumentTypePreparedStatementSetter.java
2013-04-13 09:39:09 -07:00
Juergen Hoeller aeef000c46 Fixed ReflectiveMethodResolver to avoid potential UnsupportedOperationException on sort
Issue: SPR-10392
2013-03-19 10:57:23 +01:00
Chris Beams ce4be3b46b Merge branch '3.2.x' into master
Conflicts:
	gradle.properties
	spring-beans/src/main/java/org/springframework/beans/factory/support/StaticListableBeanFactory.java
	spring-context-support/src/main/java/org/springframework/cache/ehcache/EhCacheManagerFactoryBean.java
	spring-core/src/main/java/org/springframework/core/convert/support/StringToEnumConverterFactory.java
	spring-core/src/main/java/org/springframework/core/env/ReadOnlySystemAttributesMap.java
	spring-jdbc/src/main/java/org/springframework/jdbc/datasource/LazyConnectionDataSourceProxy.java
	spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/AbstractLobHandler.java
	spring-web/src/main/java/org/springframework/http/client/BufferingClientHttpRequestWrapper.java
	spring-web/src/main/java/org/springframework/http/client/SimpleBufferingClientHttpRequest.java
	spring-web/src/main/java/org/springframework/http/converter/BufferedImageHttpMessageConverter.java
	spring-web/src/main/java/org/springframework/http/converter/FormHttpMessageConverter.java
2013-03-04 15:41:15 +01:00
Phillip Webb 18df9fed92 Fixed minor typo
Issue: SPR-10210
2013-02-28 15:37:10 -08:00
Phillip Webb 82bd06f255 Protect against missing SpEL selection expression
Update InternalSpelExpressionParser to ensure that SPeL selections
('$[...]', '^[...]', '?[...]') always include a nested expression.

Issue: SPR-10328
2013-02-25 14:28:18 -08:00
Phillip Webb 0b6101478e Use bridge methods in ReflectiveMethodResolver
Fix failing test

Issue: SPR-10210
2013-02-10 17:17:23 -08:00
Phillip Webb 634284e1fd Use bridge methods in ReflectiveMethodResolver
Update ReflectiveMethodResolver to consider bridge methods.

Issue: SPR-10210
2013-02-10 16:27:28 -08:00
Phillip Webb 1cc58e0a99 Limit auto grow collection size when using SpEL
Provide an additional constructor on SpelParserConfiguration that can
be used to limit the maximum size that a collection will auto grow when
being accessed via a SpEL expression.

This constraint is particularly useful when SpEL is used with data
binding as it prevents a malicious user from crafting a request that
causes OutOfMemory exceptions.

Issue: SPR-10229
2013-02-06 10:42:46 -08:00
Phillip Webb f464a45ba4 Polish formatting
Minor formatting polish across that codebase. Primarily fixing
whitespace issues.
2013-02-04 10:35:25 -08:00
Phillip Webb aac6b913d6 Merge branch 'cleanup-3.2.x' into 3.2.x
* cleanup-3.2.x:
  Fix unnecessary @SupressWarnings annotations
  Fix Javadoc warnings
  Fix unused local variable warnings
  Fix unused type compiler warnings
  Fix 'is already an instance of type' warnings
2013-01-31 12:52:51 -08:00
Juergen Hoeller 7d798acd35 Added getOriginalValue() accessor to (Real)Literal
Issue: SPR-10248
2013-01-31 17:50:37 +01:00
Phillip Webb 065b1c0e46 Fix unused local variable warnings 2013-01-25 14:35:19 -08:00
Juergen Hoeller abbe1db106 Polishing along with backport 2013-01-15 16:52:09 +01:00
Phillip Webb ad91fa63fa 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
2013-01-14 15:49:38 -08:00
Phillip Webb bff36fb145 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
2013-01-14 14:07:26 -08:00
Phillip Webb e4c1361c60 Remove accidentally committed interface @Override 2013-01-11 15:25:12 -08:00
Phillip Webb e8fcde09ab Polish author and copyright year 2013-01-11 15:12:59 -08:00
Phillip Webb fce7adc400 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
2013-01-11 15:07:06 -08:00
Chris Beams 961dbdb68a Merge branch '3.2.x' into master
* 3.2.x:
  Exclude spring-build-src from maven publish
  Move spring-build-junit into spring-core
  Relocate MergePlugin package
  Develop a gradle plugin to add test dependencies
  Expose Gradle buildSrc for IDE support
  Fix [deprecation] compiler warnings
  Upgrade to xmlunit version 1.3
  Improve 'build' folder ignores
  Fix regression in static setter method support
  Fix SpEL JavaBean compliance for setters

Conflicts:
	spring-beans/src/test/java/org/springframework/beans/ExtendedBeanInfoTests.java
2013-01-02 10:36:57 +01:00
Chris Beams 70eaf02b7f Revert "Merge branch 'SPR-10130' into cleanup-master"
This reverts commit 45fa50821a, reversing
changes made to a312d900f8.
2013-01-02 10:33:59 +01:00
Phillip Webb 65fb26f847 Move spring-build-junit into spring-core
Move code from spring-build-junit into spring-core/src/test along with
several other test utility classes. This commit removes the temporary
spring-build-junit project introduced in commit
b083bbdec7.
2013-01-01 19:49:45 -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
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 b2a048b6f3 Update Apache license headers for affected sources 2012-12-28 23:57:33 +01:00
Chris Beams 3b40ce76bf Add @Override annotations to main sources
Issue: SPR-10130
2012-12-28 23:53:24 +01:00
Chris Beams 8472a2b2ab Update Apache license headers for affected sources 2012-12-28 23:09:31 +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
Chris Beams 4c8cd7b0bd Add @Override annotations to test sources
Issue: SPR-10129
2012-12-28 23:05:44 +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 731d5be644 Fix warnings due to unused import statements 2012-12-28 22:40:49 +01:00
Chris Beams 9540d2c81b Replace <code> with {@code} throughout Javadoc
Issue: SPR-10128
2012-12-28 22:36:02 +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
Juergen Hoeller 431c7ff31f SpEL correctly handles "is" accessors with Boolean return type
Issue: SPR-10091
2012-12-13 10:15:19 +01:00
Juergen Hoeller e080af8d85 SpEL indexer uses direct access to specific List elements instead of iterating over the Collection
Issue: SPR-10035
2012-12-13 00:36:20 +01:00
Juergen Hoeller b9df7d68d9 Consistent fine-tuning of synchronized and concurrent data structures
In particular, avoiding synchronized Sets and Maps wherever possible (preferring a ConcurrentHashMap even instead of a synchronized Set) and specifying appropriate ConcurrentHashMap initial capacities (even if we end up choosing 16).
2012-12-12 23:46:26 +01:00
Juergen Hoeller 6e8117c627 Polishing along with backports to 3.1.4 2012-12-12 23:39:23 +01:00
Chris Beams f26534700a Eliminate all Javadoc warnings
- Support external Javadoc links using Gradle's javadoc.options.links

 - Fix all other Javadoc warnings, such as typos, references to
   non-existent (or no longer existent) types and members, etc,
   including changes related to the Quartz 2.0 upgrade (SPR-8275) and
   adding the HTTP PATCH method (SPR-7985).

 - Suppress all output for project-level `javadoc` tasks in order to
   hide false-negative warnings about cross-module @see and @link
   references (e.g. spring-core having a @see reference to spring-web).
   Use the `--info` (-i) flag to gradle at any time to see project-level
   javadoc warnings without running the entire `api` task. e.g.
   `gradle :spring-core:javadoc -i`

 - Favor root project level `api` task for detection of legitimate
   Javadoc warnings. There are now zero Javadoc warnings across the
   entirety of spring-framework. Goal: keep it that way.

 - Remove all @link and @see references to types and members that exist
   only in Servlet <= 2.5 and Hibernate <= 4.0, favoring 3.0+ and 4.0+
   respectively. This is necessary because only one version of each of
   these dependencies can be present on the global `api` javadoc task's
   classpath. To that end, the `api` task classpath has now been
   customized to ensure that the Servlet 3 API and Hibernate Core 4 jars
   have precedence.

 - SPR-8896 replaced our dependency on aspectjrt with a dependency on
   aspectjweaver, which is fine from a POM point of view, but causes
   a spurious warning to be emitted from the ant iajc task that it
   "cannot find aspectjrt on the classpath" - even though aspectjweaver
   is perfectly sufficient. In the name of keeping the console quiet, a
   new `rt` configuration has been added, and aspectjrt added as a
   dependency to it. In turn, configurations.rt.asPath is appended to
   the iajc classpath during both compileJava and compileTestJava for
   spring-aspects.

Issue: SPR-10078, SPR-8275, SPR-7985, SPR-8896
2012-12-12 12:55:10 +01:00
Oliver Becker 759c9b35cd Call ConversionService for null SpEL values
Update SpEL boolean operators to always call the ConversionService
for null values. Primarily to allow null values to be treated as
false by overriding GenericConversionService.convertNullSource().

Issue: SPR-9445
2012-11-21 22:53:29 -08:00
Phillip Webb d9bd2e19a2 Polish whitespace 2012-11-21 22:52:11 -08:00
Phillip Webb 107fafbcc5 Do not consider bridge methods in SpEL properties
Modify ReflectivePropertyAccessor so that it no longer considers
bridge methods when finding getters or setters. This should help
to prevent subtle errors that can occur when particular JDK
implementations happen to return bridge methods before non-bridge
methods when calling Class.getMethods()

Issue: SPR-9994
2012-11-15 17:22:45 -08:00
Phillip Webb edce2e7bca Allow SpEL reserved words in type package names
Expand the kinds of tokens considered when parsing qualified type names.
This allows previously reserved words (for example 'mod') to be used as
part of a package name.

Issue: SPR-9862
2012-10-30 13:38:37 +01:00
Phillip Webb 138957b148 Test SpEL unconditional argument conversion
Issue: SPR-9566
2012-10-30 09:14:18 +01:00
Chris Beams 59fb67e38d Update SpEL test to reflect native float support
Issue: SPR-9486
2012-10-24 14:27:42 +02:00