Commit Graph

18400 Commits

Author SHA1 Message Date
Rossen Stoyanchev d707d382b4 Merge branch '5.1.x' 2019-04-09 22:38:15 -04:00
Rossen Stoyanchev 28e206a946 Apply doOnDiscard for streaming mode
Use of Flux.just is problematic in that if the Flux is cancelled before
demand, the item may never be read, nor freed. Flux#just does not
even delegate cancellation signals.

Closes gh-22731
2019-04-09 22:30:26 -04:00
Rossen Stoyanchev b11e7feff6 Polish during review of DataBuffer handling 2019-04-09 22:19:05 -04:00
Sebastien Deleuze 849a848f23 Polishing 2019-04-10 00:32:20 +02:00
Sebastien Deleuze 66c95dc241 Clear spring-core-coroutines artifacts 2019-04-09 23:54:22 +02:00
Sebastien Deleuze ff1f368751 Improve Kotlin documentation 2019-04-09 23:54:22 +02:00
Rossen Stoyanchev bd956ed75a DataBuffer fixes in Protobuf codecs
Closes gh-22731
2019-04-09 17:00:26 -04:00
Brian Clozel cd69a4a03b Support DestinationVariable on RSocket handlers
Prior to this commit, the pattern destination variables were not set in
the message headers prior to calling the handler. In this case, the
`DestinationVariableMethodArgumentResolver` could not get the
destination variables from the message headers and resolve those as
handler arguments.

This commit mutates the message headers if the message destination
contains patterns.

Fixes gh-22776
2019-04-09 22:56:08 +02:00
Rossen Stoyanchev a0826a20c3 CorsInterceptor at the front of the chain
Closes gh-22459
2019-04-09 15:43:43 -04:00
Rossen Stoyanchev d1f888a7a9 Empty path mapping behaves consistently
An empty path mapping in an @RequestMapping now consistently matches to
empty paths regardless of whether there are both type and method level,
annotations, or method-level only.

Closes gh-22543
2019-04-09 15:03:43 -04:00
Rossen Stoyanchev f839c1f9cd Remove warning about empty @RequestMapping path
See gh-22543
2019-04-09 15:03:43 -04:00
Sam Brannen 5b17bb2e14 Polish Javadoc for @Scheduled 2019-04-09 19:12:06 +02:00
P. Ottlinger 85597f29f2 Improve @Scheduled Javadoc regarding cron element order
Closes gh-22777
2019-04-09 19:03:30 +02:00
Juergen Hoeller eb971690d2 Merge branch '5.1.x' 2019-04-09 18:09:20 +02:00
Juergen Hoeller 2835424f9d Jackson2Tokenizer creates fully configured DeserializationContext
Closes gh-22510
2019-04-09 17:59:10 +02:00
stsypanov 604361ee1f Use concatenation instead of torn StringBuilder::append chain 2019-04-09 13:23:22 +02:00
Sebastien Deleuze cd0b517abf Improve Kotlin documentation 2019-04-09 12:28:00 +02:00
Sam Brannen 80ad60e91b Fix Javadoc for @Value 2019-04-09 11:30:59 +02:00
Sam Brannen 85f05023c6 Pull WebFlux getMappingPathPatterns() implementation up in the hierarchy
This commit moves the WebFlux getMappingPathPatterns() implementation
from RequestMappingHandlerMapping to
RequestMappingInfoHandlerMapping so that subclasses of the latter no
longer need to re-implement the method.

See gh-22543
2019-04-09 10:58:04 +02:00
Juergen Hoeller dc14ea86eb Fix regression for nested AnnotationAttributes.annotationType() result
See gh-22738
2019-04-09 09:40:53 +02:00
Rossen Stoyanchev 0a03d8e248 Upgrade to RSocket 0.12.1-RC3 and update tests
1) Tests use a timeout to avoid hanging issues
2) Some tests adjusted to work around potential rsocket-java issue
https://github.com/rsocket/rsocket-java/issues/613
2019-04-08 23:52:04 -04:00
Juergen Hoeller c8609b83b6 Merge branch '5.1.x' 2019-04-08 20:19:03 +02:00
Juergen Hoeller 1cd1e936c2 Upgrade to Checkstyle 8.19, Mockito 2.26, Undertow 2.0.20 2019-04-08 19:59:24 +02:00
Juergen Hoeller 4ec9aff01d Polishing 2019-04-08 19:59:06 +02:00
Juergen Hoeller d1303affc8 Avoid expensive Stream API usage in HttpRange
See gh-22742
2019-04-08 19:42:21 +02:00
ladislav-bozek 4d17eb4f0e Fix typo in JavaDoc for UrlPathHelper.setUrlDecode()
Closes gh22768
2019-04-08 17:37:59 +02:00
Sam Brannen b115789fd3 Polishing 2019-04-08 17:28:44 +02:00
Sam Brannen 9a93615ec4 Configure Kotlin plugin support for Eclipse in Gradle build
This commit configures the Kotlin plugin for Eclipse in the
spring-core-coroutines Gradle project so that users no longer have to
manually "Configure Kotlin / Add Kotlin Nature" within the Eclipse IDE
after importing projects.

This change is currently limited to the spring-core-coroutines project
since it is the only project in which Java code depends on compiled
Kotlin code; however, this change may later be applied to additional
projects if desirable.
2019-04-08 17:20:24 +02:00
Sam Brannen bd414df944 Remove JMXMP from TestGroup
Due to the changes in a7425c81c0, we no
longer need to execute tests using the JMXMP protocol in PERFORMANCE
builds.

This commit removes the JMXMP constant from the TestGroup enum and
updates affected tests, thereby effectively including such tests in
the standard build from now on.

See gh-22757
2019-04-08 17:05:16 +02:00
Juergen Hoeller fd8fa301a6 Consistent non-exposure of inherited annotations in AnnotationMetadata
Closes gh-22766
2019-04-08 15:59:06 +02:00
Sebastien Deleuze 2e7ed915cd Merge branch '5.1.x' 2019-04-08 15:46:47 +02:00
Sebastien Deleuze a089027e7d Fix a regression in Jackson builder module registration
This commit brings back the support for registration of multiple
Jackson modules with a null typeId.

Closes gh-22740
2019-04-08 15:37:10 +02:00
Juergen Hoeller 43cb1af26a Polishing 2019-04-08 15:33:26 +02:00
Juergen Hoeller a1efe3cfe5 Avoid MessageFormat processing for default Bean Validation messages
Closes gh-22761
2019-04-08 15:33:04 +02:00
Juergen Hoeller fc9ce7cd99 Skip plain Java annotations in SourceClass.getAnnotations() upfront
Includes direct reflective introspection of annotations when possible.

Closes gh-22750
2019-04-08 15:32:52 +02:00
Sam Brannen cf5d0e6aa9 Introduce publishEvent() convenience method in TestContext
This commit introduces a publishEvent() method in the TestContext API
as a convenience for publishing an ApplicationEvent to the test's
ApplicationContext but only if the ApplicationContext is currently
available and with lazy creation of the ApplicationEvent.

For example, the beforeTestClass() method in
EventPublishingTestExecutionListener is now implemented as follows.

  public void beforeTestClass(TestContext testContext) {
      testContext.publishEvent(BeforeTestClassEvent::new);
  }

Closes gh-22765
2019-04-08 15:14:39 +02:00
Sam Brannen a7425c81c0 Add dependency on opendmk_jmxremote_optional_jar for performance builds
Although the jmxremote_optional JAR has been added to the build agents
on the Bamboo CI server for the latest JDK 8 installation, that
solution is brittle since it has to be manually installed in every new
JDK installation. In addition, this approach will not work with JDK 9+
since the "Extension Mechanism" has been removed beginning with JDK 9.

https://docs.oracle.com/javase/10/migrate/toc.htm#JSMIG-GUID-2C896CA8-927C-4381-A737-B1D81D964B7B

This commit addresses this issue by adding the following dependency to
spring-context.

// Substitute for "javax.management:jmxremote_optional:1.0.1_04" which
// is not available on Maven Central
testRuntime("org.glassfish.external:opendmk_jmxremote_optional_jar:1.0-b01-ea")

With this change, the Spring PERFORMANCE builds now execute on JDK 8,
9, and 11.

See gh-22757
2019-04-08 13:22:30 +02:00
Sam Brannen 8f5d2d65a1 Upgrade to JUnit Jupiter 5.4.2
See gh-22308
2019-04-07 22:05:33 +02:00
Sam Brannen 353e092bf6 Register EventPublishingTestExecutionListener by default (round 2)
This commit registers the EventPublishingTestExecutionListener as a
default TestExecutionListener with an order of 10,000. This registers
the EventPublishingTestExecutionListener as the last listener provided
by the Spring Framework.

With EventPublishingTestExecutionListener registered with an order of
10,000, it is effectively wrapped by all other Spring listeners,
including support for @DirtiesContext and test-managed transactions.

Furthermore, this commit revises the implementation of
EventPublishingTestExecutionListener to take advantage of the new
TestContext#hasApplicationContext() support which allows the
EventPublishingTestExecutionListener to publish events only if the
test's ApplicationContext is currently available. This avoids
undesirable side-effects such as eager loading of the
ApplicationContext before it is needed or re-loading of the
ApplicationContext after it has been intentionally closed.

Closes gh-18490
2019-04-06 16:39:26 +02:00
Sam Brannen c3d0459a4e Add support to query if ApplicationContext is available in the TCF
This commit introduces support in the Spring TestContext Framework
(TCF) to query whether the test's ApplicationContext is available.

Specifically, this commit introduces the following two `default`
methods along with corresponding implementations in DefaultTestContext
and DefaultCacheAwareContextLoaderDelegate.

- `boolean hasApplicationContext()` in the TestContext API

- `boolean isContextLoaded(MergedContextConfiguration)` in the
  CacheAwareContextLoaderDelegate API

Closes gh-22756
2019-04-06 16:00:33 +02:00
Sam Brannen ab1b8dee58 Ensure XmlEventDecoder compiles on JDK 9 and 11 2019-04-06 16:00:33 +02:00
Sam Brannen 55b764bac3 Remove unused import
See gh-22543
2019-04-06 12:14:46 +02:00
Sam Brannen 164ee2a4e1 Polishing
See gh-22543
2019-04-06 11:25:44 +02:00
Sam Brannen 021909dac2 Merge branch '5.1.x' 2019-04-06 11:22:15 +02:00
Sam Brannen a1668ad1c2 Fix Javadoc for PathPattern 2019-04-06 11:21:39 +02:00
Sam Brannen 510c0c5ef7 Return Set<PathPattern> from AbstractHandlerMethodMapping.getMappingPathPatterns
This commit revises the signature of getMappingPathPatterns() in
AbstractHandlerMethodMapping to return a set of PathPatterns instead of
a set of Strings.

See gh-22543
2019-04-06 11:18:25 +02:00
Tadaya Tsuyukubo dacda5859a Fix broken asciidoc heading 2019-04-06 11:02:45 +02:00
Rossen Stoyanchev 02da8486a3 Merge branch '5.1.x' 2019-04-05 21:53:55 -04:00
Rossen Stoyanchev 57558a481a DataBuffer fixes in View implementations
Closes gh-22754
2019-04-05 21:42:12 -04:00
Rossen Stoyanchev 6cabb79f0f Decode resourcePath for classpath locations
Closes gh-22272
2019-04-05 16:23:33 -04:00