Commit Graph

87 Commits

Author SHA1 Message Date
Johnny Lim 44e652f99e Remove duplicate words
Closes gh-1039
2016-04-19 08:24:21 +02:00
Juergen Hoeller ed14ae60e5 Consistent deprecation of outdated MVC infrastructure classes
Issue: SPR-14128
2016-04-07 11:37:34 +02:00
Juergen Hoeller 517ebd1d3e Consistent formatting 2016-03-24 19:22:50 +01:00
Juergen Hoeller d124a13eb4 Consistent use of empty enumerations 2016-03-11 15:07:59 +01:00
Juergen Hoeller 8495fcf109 Avoid accessing the session if no session attributes need to be updated
Issue: SPR-13950
2016-02-18 17:33:39 +01:00
Juergen Hoeller 2e6eb614b5 Avoid scoped destruction callbacks in case of no post-processor actually applying
Issue: SPR-13744
2015-12-18 17:14:57 +01:00
Sam Brannen 5b3edcd9f9 Spring Cleaning in December
- Delete unused imports
- Delete unused code
- Clean up warnings
2015-12-17 20:27:33 +01:00
Juergen Hoeller 9e03e0e73d Polishing 2015-12-15 11:53:40 +01:00
Juergen Hoeller ce20268597 Consistent warn logging without stacktrace in Portlet HandlerExceptionResolver
Issue: SPR-13611
2015-11-02 14:19:58 +01:00
Sam Brannen d5ee787e1e Migrate JUnit 3 tests to JUnit 4
This commit migrates all remaining tests from JUnit 3 to JUnit 4, with
the exception of Spring's legacy JUnit 3.8 based testing framework that
is still in use in the spring-orm module.

Issue: SPR-13514
2015-09-27 21:17:51 +02:00
Sam Brannen 725292081e Introduce 'value' alias for 'attribute' in @AliasFor
SPR-11512 introduced support for annotation attribute aliases via
@AliasFor, requiring the explicit declaration of the 'attribute'
attribute. However, for aliases within an annotation, this explicit
declaration is unnecessary.

This commit improves the readability of alias pairs declared within an
annotation by introducing a 'value' attribute in @AliasFor that is an
alias for the existing 'attribute' attribute. This allows annotations
such as @ContextConfiguration from the spring-test module to declare
aliases as follows.

public @interface ContextConfiguration {

     @AliasFor("locations")
     String[] value() default {};

     @AliasFor("value")
     String[] locations() default {};

    // ...
}

Issue: SPR-13289
2015-07-29 15:27:06 +02:00
Juergen Hoeller edd6e76b9f Polishing 2015-07-21 22:58:34 +02:00
Juergen Hoeller dc1f921f5c Split between basic MethodParameter and SynthesizingMethodParameter
This split avoids a package tangle (between core and core.annotation) and also allows for selective use of raw annotation exposure versus synthesized annotations, with the latter primarily applicable to web and message handler processing at this point.

Issue: SPR-13153
2015-06-30 00:02:02 +02:00
Sam Brannen 6c530b7bfb Delete trailing whitespace in XML files 2015-06-19 17:14:10 +02:00
Sam Brannen 485790dc0e Introduce alias for 'value' attribute in @RenderMapping
Issue: SPR-11393
2015-05-31 21:24:32 +02:00
Sam Brannen 0d6b01b694 Introduce alias for 'value' attribute in @ActionMapping
Issue: SPR-11393
2015-05-31 21:08:26 +02:00
Juergen Hoeller b4095c3e1d Class identity comparisons wherever possible
Issue: SPR-12926
2015-05-20 14:34:16 +02:00
Juergen Hoeller f926f6cb3e Polishing 2015-03-31 17:32:39 +02:00
Markus Malkusch 953608ec49 Improve ETag & Last-Modifed support in WebRequest
This change improves the following use cases with
`WebRequest.checkNotModified(String etag)` and
`WebRequest.checkNotModified(long lastModifiedTimeStamp)`:

1) Allow weak comparisons for ETags

Per rfc7232 section-2.3, ETags can be strong or weak;
this change allows comparing weak forms `W/"etagvalue"` but does
not make a difference between strong and weak comparisons.

2) Allow multiple ETags in client requests

HTTP clients can send multiple ETags values in a single header such as:
`If-None-Match: "firstvalue", "secondvalue"`
This change makes sure each value is compared to the one provided by
the application side.

3) Extended support for ETag values

This change adds padding `"` to the ETag value provided by
the application, if not already done:
`etagvalue` => `"etagvalue"`

It also supports wildcard values `*` that can be sent by HTTP clients.

4) Sending validation headers for 304 responses

As defined in https://tools.ietf.org/html/rfc7232#section-4.1
`304 Not Modified` reponses must generate `Etag` and `Last-Modified`
HTTP headers, as they would have for a `200 OK` response.

5) Providing a new method to validate both Etag & Last-Modified

Also, this change adds a new method
`WebRequest.checkNotModified(String etag, long lastModifiedTimeStamp)`
in order to support validation of both `If-None-Match` and
`Last-Modified` headers sent by HTTP clients, if both values are
supported by the application code.

Even though this approach is recommended by the HTTP rfc (setting both
Etag and Last-Modified headers in the response), this requires more
application logic and may not apply to all resources produced by the
application.

Issue: SPR-11324
2015-03-23 17:36:06 +01:00
Juergen Hoeller bc6a98c144 Polishing (in particular updating javadoc references to Apache Commons) 2015-03-13 18:19:10 +01:00
Juergen Hoeller 13659d645b Consistent support for @Order annotation as alternative to Ordered interface
Issue: SPR-12806
2015-03-13 18:18:33 +01:00
Stephane Nicoll babbf6e871 Harmonize resources location
Issue: SPR-12766
2015-02-28 10:32:40 +01:00
Juergen Hoeller 6b3023c2aa HandlerExecutionChain prevents re-adding the interceptors array to the list (and declares varargs now)
Issue: SPR-12566
2014-12-23 18:27:49 +01:00
Juergen Hoeller 1146d5ba1d Polishing 2014-10-29 22:44:59 +01:00
Juergen Hoeller 8325b10080 Consistent formatting of license headers, package javadocs, and import declarations 2014-10-21 01:44:07 +02:00
Juergen Hoeller 69998e3d50 Remove outdated references to ContextLoaderServlet
Issue: SPR-7725
(cherry picked from commit b45d08f)
2014-10-01 01:02:56 +02:00
Juergen Hoeller b73c531527 PropertySource implementations perform conversion to String arrays via StringUtils (getting rid of EMPTY_NAMES_ARRAY) 2014-08-21 22:46:33 +02:00
Juergen Hoeller ad475ffadf Consistent vararg declarations for String array setters 2014-08-08 17:17:09 +02:00
Juergen Hoeller 2d892da641 FrameworkPortlet exposes local PortletRequestAttributes in case of pre-bound ServletRequestAttributes as well
Issue: SPR-11295
2014-06-24 21:20:57 +02:00
Juergen Hoeller 8fb0f5c7d1 FrameworkPortlet properly initializes StandardPortletEnvironment's property sources
Issue: SPR-11816
2014-06-05 15:09:02 +02:00
Juergen Hoeller ea88bc2c81 Servlet/PortletResponse supported as a resolvable dependency now (in particular for web controllers)
This feature required support for response exposure on Servlet/PortletRequestAttributes, instead of just in the Servlet/PortletWebRequest subclasses.

Issue: SPR-11795
2014-05-16 18:06:29 +02:00
Philippe Marschall 5ae1c8a242 Clean up spring-webmvc-portlet tests warnings
Clean up compiler warnings in the tests of spring-webmvc-portlet. This
commit adds type parameters to all the types (mostly `List` and `Map`).

After this commit the only warnings in spring-web left are the
subclasses of `MyCommandProvidingFormController`.
2014-04-22 07:29:48 +02:00
Stephane Nicoll 4cd818b9e4 Harmonize log configuration
Prior to this commit, the codebase was using a mix of log4j.xml
and log4j.properties for test-related logging configuration. This
can be an issue as log4j takes the xml variant first when looking
for a default bootstrap configuration.

In practice, some modules declaring the properties variant were
taking the xml variant configuration from another module.

The general structure of the configuration has also been
harmonized to provide a standard console output as well as an
easy way to enable trace logs for the current module.
2014-03-20 09:43:29 -07:00
Juergen Hoeller 09e2e5897d Removed outdated hibernate3 references across the codebase
Issue: SPR-9028
2014-02-06 22:15:59 +01:00
Juergen Hoeller 42db41e007 Polishing 2014-01-23 20:59:53 +01:00
Juergen Hoeller a5f9b29292 Polishing 2014-01-15 22:53:46 +01:00
Juergen Hoeller 9c157ea073 DispatcherPortlet never uses a resource forward on Liferay
Issue: SPR-10791
2013-12-11 16:41:11 +01:00
Phillip Webb a31ac882c5 Fix various javadoc warnings 2013-11-26 13:25:37 -08:00
Phillip Webb 59002f2456 Fix remaining compiler warnings
Fix remaining Java compiler warnings, mainly around missing
generics or deprecated code.

Also add the `-Werror` compiler option to ensure that any future
warnings will fail the build.

Issue: SPR-11064
2013-11-25 12:52:42 -08:00
Phillip Webb b0ff834ee3 Multicaster support for events with null source
Update `AbstractApplicationEventMulticaster` to support `EventObjects`
with a null source (which can happen if they have been serialized).

Issue: SPR-10945
2013-10-21 11:59:46 -07:00
Juergen Hoeller 1420b970a7 Introduced DefaultParameterNameDiscoverer which checks JDK 8's standard reflection first and then falls back to ASM-based debug symbol analysis
Also, StandardReflectionParameterNameDiscoverer calls "Parameter.isNamePresent()" now to return null (and pass on to the next discoverer) if no JDK 8 parameters are available. Note that this requires OpenJDK 8 b100 or higher to compile now.

Issue: SPR-10532
2013-08-08 15:52:43 +02:00
Juergen Hoeller cd3d0c35c3 Replaced Map synchronization with ConcurrentHashMap to avoid session access deadlocks
Issue: SPR-10436
2013-05-16 14:33:14 +02:00
Rob Winch 9468548116 Add @Override to remaining source files
Issue: SPR-10130
2013-05-13 17:04:56 -05:00
Juergen Hoeller 2a44228b98 Consistent use of <pre class="code">
Issue: SPR-8108
2013-05-07 21:31:26 +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
Juergen Hoeller f19f55a59b Removed Spring MVC command/form controller class hierarchy 2013-03-19 16:06:37 +01:00
Phillip Webb 4e1cab28df Merge branch '3.2.x'
* 3.2.x: (28 commits)
  Hide 'doc' changes from jdiff reports
  Document @Bean 'lite' mode vs @Configuration
  Final preparations for 3.2.2
  Remove Tiles 3 configuration method
  Polishing
  Extracted buildRequestAttributes template method from FrameworkServlet
  Added "beforeExistingAdvisors" flag to AbstractAdvisingBeanPostProcessor
  Minor refinements along the way of researching static CGLIB callbacks
  Compare Kind references before checking log levels
  Polish Javadoc in RequestAttributes
  Fix copy-n-paste errors in NativeWebRequest
  Fix issue with restoring included attributes
  Add additional test for daylight savings glitch
  Document context hierarchy support in the TCF
  Fix test for daylight savings glitch
  Make the methodParameter field of HandlerMethod final
  Disable AsyncTests in spring-test-mvc
  Reformat the testing chapter
  Document context hierarchy support in the TCF
  Document context hierarchy support in the TCF
  ...
2013-03-13 14:01:46 -07:00
Phillip Webb 05765d7520 Replace EasyMock with Mockito
Issue: SPR-10126
2013-03-06 11:06:15 -08: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
Chris Beams 51b307681a Fix warnings due to unused import statements
Issue: SPR-9431
2013-01-04 11:04:54 +01:00