Commit Graph

9747 Commits

Author SHA1 Message Date
Sam Brannen e97712b95b Update copyright headers in IdGenerators 2015-01-23 21:12:45 +01:00
Rossen Stoyanchev 52b8f34468 Add JdkIdGenerator and use it in SockJS client
Issue: SPR-12658
2015-01-22 21:27:36 -05:00
Rossen Stoyanchev 0bfa124a1e Remove ISE in ResourceUrlProvider
Issue: SPR-12630
2015-01-22 17:08:20 -05:00
Stephane Nicoll 3f6f6d5f70 Merge pull request #722 from mgooty/master
* pull722:
  Fix method documentation typo
2015-01-22 19:23:23 +01:00
mgooty 9b24cc5035 Fix method documentation typo
Issue: SPR-12639
2015-01-22 19:22:57 +01:00
Juergen Hoeller 8ec0da083a Upgrade to Groovy 2.4 2015-01-22 19:16:08 +01:00
Juergen Hoeller 1cd4433621 Polishing 2015-01-22 18:44:07 +01:00
Juergen Hoeller 0479ca68fe ScheduledAnnotationBeanPostProcessor registers tasks in ContextRefreshedEvent phase (again)
Issue: SPR-12641
2015-01-22 18:42:30 +01:00
Brian Clozel a4fe49e6ff Update Jetty version to 9.2.7.v20150116 2015-01-22 10:19:16 +01:00
Rossen Stoyanchev d68fde57cd Support HandlerMethod arg in @ExceptionHandler methods
Issue: SPR-12605
2015-01-21 17:54:40 -05:00
Brian Clozel 2bf6b41bcc Initialize ResourceUrlProvider only once
Prior to this change, the ResourceUrlProvider would listen to
ContextRefreshedEvents and autodetect resource handlers each time. This
can cause issues when multiple contexts are involved and the last one
has no resource handler, thus clearing the previously detected ones.

This commit disables resource handlers auto-detection once some have
been detected with a refreshed context.

Issue: SPR-12592
2015-01-21 11:35:43 +01:00
Juergen Hoeller 49e31c302b Allow schedulerWithHsqlDataSource to pass through reducing it to the trigger table check
Issue: SPR-12618
2015-01-21 11:11:07 +01:00
Rossen Stoyanchev f949b2d3c3 Remove logging statement in ResponseBodyAdviceChain
Issue: SPR-12616
2015-01-20 17:22:51 -05:00
Rossen Stoyanchev 497944f0dd Fix minor test issues
Issue: SPR-12615
2015-01-20 17:14:20 -05:00
Brian Clozel bb78c76b8c Allow relative paths within resource location path
Prior to this change, location paths used for resource handling would
not allow "non-cleaned, relative paths" such as
`file://home/user/static/../static/`. When checking if the resolved
resource's path starts with the location path, a mismatch would happen
when comparing for example:

* the location `file://home/user/static/../static/`
* and the resource `file://home/user/static/resource.txt`

This commit cleans the location path before comparing it to the resource
path.

Issue: SPR-12624
2015-01-20 17:46:05 +01:00
Juergen Hoeller 4141bf35b4 Latest dependency updates (Jackson 2.5, Hibernate 4.3.8, Netty 4.0.25) 2015-01-20 16:02:20 +01:00
Juergen Hoeller d34402d3ba OperatorMatches caches compiled patterns
Issue: SPR-12610
2015-01-20 16:02:11 +01:00
Juergen Hoeller 11bf3b3524 AbstractBeanDefinitionParser allows for skipping evaluation of XML "name" attribute
Issue: SPR-12643
2015-01-20 16:02:01 +01:00
Juergen Hoeller d4dac250a8 AbstractRequestLoggingFilter allows for dedicated shouldLog check in CommonsRequestLoggingFilter
Issue: SPR-12609
2015-01-20 16:01:53 +01:00
Juergen Hoeller 0ddf8dde12 AnnotationUtils explicitly handles null parameters
Issue: SPR-12604
2015-01-20 16:01:44 +01:00
Brian Clozel 028c0e8b80 Allow protocol relative URLs in CssLink Transformer
This commit allows the use of "protcol relative URLs" (i.e. URLs without
scheme, starting with `//`), often used to serve resources automatically
from https or http with third party domains.

This syntax is allowed by RFC 3986.

Issue: SPR-12632
2015-01-20 15:53:10 +01:00
Sebastien Deleuze bf7a9754d5 Avoid using Java 8 ZoneId class
Issue: SPR-12594
2015-01-20 15:24:55 +01:00
Sebastien Deleuze b89e62e5f6 Support specifying Jackson TimeZone and Locale
Issue: SPR-12594
2015-01-20 14:57:14 +01:00
Stephane Nicoll 4a2b6a1322 Merge pull request #721 from MaciejZiarko/java-doc-fix
* java-doc-fix:
  Fix Javadoc examples
2015-01-17 13:50:27 +01:00
Maciej Ziarko 81c750fb1c Fix Javadoc examples 2015-01-17 13:48:50 +01:00
Brian Clozel 3da9d92bf5 Fix context-relative default value in XML parsing
This commit fixes the default value for the contextRelative attribute of
a RedirectView, when this view is registered via a
RedirectViewController in XML. The value is set to true.

Note that the default value for this is correctly documented in
spring-mvc-4.1.xsd. Also, the documentation and implementation for its
javadoc counterpart also enforces true as a default value.

Issue: SPR-12607
2015-01-16 16:13:02 +01:00
Rossen Stoyanchev ab629a0e26 Deprecate writePrelude in AbstractHttpSockJsSession
A logical follow-up on commit 43d937, this change also removes (or
rather deprecates for now) writePrelude that is only of concern to
streaming SockJS session implementations.

Issue: SPR-12427
2015-01-13 10:26:59 -05:00
Rossen Stoyanchev 43d93712f1 Remove isStreaming flag from AbstractHttpSockJsSession
This change removes the need for the isStreaming field from the base
class AbstractHttpSockJsSession. This field was used to account for
differences between polling vs streaming SockJS sessions without having
to expose to sub-classes private fields that are otherwise protected
from concurrent access by the base class. The change manages to delegate
to sub-classes without providing direct access to protected fields.

Issue: SPR-12427
2015-01-12 14:48:09 -05:00
Sam Brannen 7a6dfe3765 Make MBeanServer integration tests more robust
This commit overhauls several of the tests that interact with an
MBeanServer with the goal of increasing the reliability of these tests.

 - MBeanClientInterceptorTests now uses JUnit "assumptions" instead of
   preemptively returning from test methods, thus allowing such methods
   to be properly marked as "ignored" instead of "passed".

 - MBeanClientInterceptorTests now uses JUnit's support for expected
   exceptions where appropriate.

 - MBeanClientInterceptorTests and RemoteMBeanClientInterceptorTests now
   use Spring's SocketUtils to find an available TCP port when starting
   an MBeanServer instead of aborting the tests when the default JMX
   port is not available.

Issue: SPR-12601
2015-01-12 12:19:11 +01:00
Sam Brannen 08f3a79821 Fix broken test in EnableSchedulingTests
Commit 65d163e changed the textual message of an exception thrown by
ScheduledAnnotationBeanPostProcessor.afterSingletonsInstantiated(), and
this in turn caused the withAmbiguousTaskSchedulers_andSingleTask()
method in EnableSchedulingTests to start failing (albeit only during
'Performance' builds).

This commit updates the assertion to match the current implementation of
ScheduledAnnotationBeanPostProcessor.
2015-01-10 22:30:06 +01:00
Sam Brannen d5fb829ade Polish failed assertion messages in QuartzSupportTests 2015-01-10 22:28:00 +01:00
Sam Brannen 276712dcd1 Enable reuse of DefaultActiveProfilesResolver
In order to allow DefaultActiveProfilesResolver to be reused (e.g., via
extension or delegation), the check which asserts that the 'resolver'
attribute of @ActiveProfiles is not set to a customer resolver class
has been removed.

Issue: SPR-12611
2015-01-10 20:36:48 +01:00
Sam Brannen cf7a7932f3 Polish TimedSpringRunnerTests 2015-01-10 17:52:41 +01:00
Sam Brannen b81c522ee1 Handle exceptions properly in SpringJUnit4ClassRunner
JUnit 4.9 introduced a regression in BlockJUnit4ClassRunner.runChild()
such that exceptions thrown from methodBlock() cause the current test
execution to abort immediately. As a result, the failing test method is
unrooted, and subsequent test methods are never invoked. Furthermore,
RunListeners registered with JUnit are not properly notified.

In conjunction with SPR-11908, SpringJUnit4ClassRunner was updated to
use the aforementioned changes to BlockJUnit4ClassRunner.runChild().
Consequently, SpringJUnit4ClassRunner now suffers from the same
regression.

This commit addresses this issue by ensuring that any exceptions thrown
during the invocation of methodBlock() are properly wrapped in a JUnit
Fail Statement.

Issue: SPR-12613
2015-01-10 17:51:51 +01:00
Sam Brannen f5201e3ca0 Remove link to forums in README 2015-01-09 23:14:56 +01:00
Sam Brannen dbbd1dacef Update Eclipse formatter settings for Java source code
- Copyright end date is now dynamic, based on the current year.

 - Added missing spaces in front of web link to ASL 2.0 license file.

 - Changed @since tag to 4.2.
2015-01-08 18:39:03 +01:00
Sam Brannen fc38d3bf06 Set source and target to JDK 1.8 for Eclipse projects 2015-01-08 18:33:33 +01:00
Sam Brannen e9e5149001 Fix cleanEclipseJdtUi task in the Gradle build 2015-01-08 18:32:12 +01:00
Sam Brannen c50df0c420 Polish MessageBodyClientHttpResponseWrapper
Added missing copyright clause and fixed @since version.
2015-01-08 18:02:00 +01:00
Brian Clozel b6675b6167 Revisit empty body response support in HTTP client
Prior to this commit, HTTP responses without body (response status 204
or 304, Content-Length: 0) were handled properly by RestTemplates. But
some other cases were not properly managed, throwing exceptions for
valid HTTP responses.

This commit better handles HTTP responses, using a response wrapper that
can tell if a response:

* has no message body (HTTP status 1XX, 204, 304 or Content-Length:0)
* has an empty message body

This covers rfc7230 Section 3.3.3.

Issue: SPR-8016
2015-01-08 17:34:39 +01:00
Craig Andrews 213a3fd779 Performance improvements in ShallowEtagHeaderFilter
Prior to this change, the ShallowEtagHeaderFilter would use a
ResizableByteArrayOutputStream to internally write data and calculate
the ETag. While that implementation is faster than the regular
ByteArrayOutputStream (since it has a better strategy for growing the
internal buffer), a lot of buffer copying/writing still happens.

This change adds a new FastByteArrayOutputStream implementation that
internally uses a LinkedList<Byte[]> to store the content. So when
writing bytes to that OutputStream implementation, new byte[] are
added to the list when the previous ones are full. This saves most
of the instantiating/copying operations.

Note that new methods were added in DigestUtils to allow usage of
Streams instead of byte[], which is more efficient in our case.

Fixes #653

Issue: SPR-12081
2015-01-08 16:08:09 +01:00
Sam Brannen 40cd1be14c Update Javadoc for AnnotationUtils.findAnnotation()
This commit updates the Javadoc for findAnnotation() to reflect recent
changes to the algorithm it implements.
2015-01-07 21:08:00 +01:00
Stephane Nicoll 34afe215fd Merge pull request #717 from johnktims/patch-1
* patch-1:
  Fix typo
2015-01-07 09:51:44 +01:00
John 46b094bfc4 Fix typo 2015-01-07 00:28:51 -05:00
Rossen Stoyanchev f59fc83f30 Remove STOMP relay integration test
The test was verifying that when a DISCONNECT frame is sent to the
broker, there will be no further messages on the clientOutboundChannel.

This is generally true, however in some cases when the broker receives
a DISCONNECT it may close its connection fast enough (before we do) in
which case we send an ERROR message downstream to ensure the WebSocket
side is cleaned up. Either way the downstream should be idempotent
with regards to cleaning up sessions.
2015-01-06 09:52:06 -05:00
Rossen Stoyanchev 8a47c181f7 Assign Jetty SockJS tests to "performance" test group
This change designates Jetty SockJS integration tests to run as part of
the "performance", but not the main "publication", CI build due to
recurring low-level failures suspected to be Jetty issues, e.g.
"java.io.IOException: Cannot append to finished buffer" or
"java.io.IOException: Out of order Continuation frame encountered".

The tests will still run at once a day with the performance build but
should not fail the main build with false negatives. Also note that
an Undertow variant of the exact same tests, which hasn't been failing,
will continue to run as part of the main build.
2015-01-06 09:43:54 -05:00
Stephane Nicoll bce145c06e Merged HttpClient defaults with local customizations
Update HttpComponents wrapper to merge local customizations with the
default of the current HttpClient instead of overriding everything.

This is available as from HttpComponents 4.4. that exposes the default
request config from the  client via the Configurable interface. If the
client does not implement such interface, the previous behaviour is
applied

Issue: SPR-12583
2015-01-05 14:28:47 +01:00
Stephane Nicoll 3662ad4f94 Upgrade to gradle 2.2.1
Issue: SPR-11934
2015-01-05 10:09:45 +01:00
Sam Brannen 4a49a6535d Document type safety limitations of the CollectionFactory API
Issue: SPR-12596
2015-01-04 22:48:15 +01:00
Sam Brannen 60cee7f526 Polish ExtendedBeanInfoTests regarding JDK 8u40 compatibility
This commit simplifies the test for greater clarify and swaps the
'expected' and 'actual' arguments passed to assertEquals().

Issue: SPR-12582
2015-01-02 16:02:04 +01:00