Commit Graph

20358 Commits

Author SHA1 Message Date
Qimiao Chen acae174f8f
Fix javadoc in DependencyDescriptor
Closes gh-24551
2020-02-19 11:04:25 +01:00
Sviatoslav Hryb 2ad4602ca0
Correct Ant-style Patterns example in documentation
Closes gh-24552
2020-02-19 10:51:16 +01:00
Rossen Stoyanchev 68b980f849 Remove producible request attribute before mapping
The attribute was previously removed only before exception resolution
in the DispatcherServlet in order to allow error rendering to make an
independent choice on content negotation.

However, Boot rendering happens later in an ERROR dispatch which could
also be a nested dispatch on some servers. So the attribute must also
generally be removed prior to mapping.

We also move the methods where this is done to the base
RequestMappingInfoHandlerMapping class which also deals with the
produces condition and where the producible attribute is added in the
first place.

Closes gh-24466
2020-02-18 21:50:38 +00:00
Rossen Stoyanchev 87f866b688 Update DigestUtils Javadoc with regards to InputStream
Closes gh-24534
2020-02-18 19:56:25 +00:00
Hyunjin Choi 37ba57a921
Polish some test classes by using predefined constants
Closes gh-24532
2020-02-18 12:24:10 +01:00
Rossen Stoyanchev fb6ee01281 Consistently call setComplete before WS upgrade
Even thought Tomcat and Jetty, which commit the response more lazily,
were not impacted by this issue, it still makes sense for them to
complete the WebFlux response (and pre-commit actions) at the same time
as for other servers for consistent behavior.

See gh-24475
2020-02-18 09:44:04 +00:00
Rossen Stoyanchev df1145b797 Correct documentation error in section on BeanWrapper
Closes gh-24510
2020-02-18 09:44:04 +00:00
Brian Clozel 9036cc6899 Remove unnecessary dependency on spring-orm
Prior to this commit, spring-aspects would consider spring-orm as a
module providing aspects, which is not the case (anymore).
This commit removes that dependency as a result.

Fixes gh-24491
2020-02-17 20:54:58 +01:00
ZhangT 6add7b4dec
Polishing
Closes gh-24543
2020-02-17 17:33:39 +01:00
Sviatoslav Hryb 9e7ab4d308
Correct formatting of MessageSource example in documentation
Closes gh-24531
2020-02-17 15:25:17 +01:00
Brian Clozel 13f23dc32b Mark response as complete before WebSocket upgrade
Prior to this commit, some WebSocket `RequestUpgradeStrategy` reactive
implementations would prevent the application from writing HTTP headers
and cookies to the response.

For Reactor Netty and Undertow, handling the upgrade and starting the
WebSocket communication marks the response status and headers as sent
and the application cannot update HTTP response headers after that.

This commit ensures that the `RequestUpgradeStrategy` implementations
mark the responses as "complete", so that headers are written before we
delegate to the server implementation.

Fixes gh-24475
2020-02-13 21:42:31 +01:00
Juergen Hoeller 4cbc61abfc Upgrade to Tomcat 9.0.31, Apache HttpClient 4.5.11, Mockito 3.2.4, HtmlUnit 2.37 2020-02-13 16:14:49 +01:00
Sam Brannen 05301d24c1 Upgrade to JUnit Jupiter 5.6
Closes gh-24299
2020-02-13 15:44:58 +01:00
Sam Brannen d481b81b7e Fix copy-n-paste error in custom_java_home.gradle script
See gh-24474
2020-02-12 23:08:42 +01:00
Juergen Hoeller a4179b4795 Polishing 2020-02-12 18:32:32 +01:00
Andy Wilkinson d0d8c6e749
Use Gradle Enterprise Conventions Plugin to configure build scans
Closes gh-24512
2020-02-12 18:14:33 +01:00
Juergen Hoeller 9f6572a095 Add missing final declaration for static field 2020-02-12 16:49:19 +01:00
Juergen Hoeller d1c7083e77 Consistent ROLE_INFRASTRUCTURE declarations for configuration classes
Closes gh-24509
2020-02-12 16:49:02 +01:00
Juergen Hoeller e0319b1f79 Raise log level for exceptions from EntityManager close call
Closes gh-24501
2020-02-12 16:48:42 +01:00
Juergen Hoeller b889700548 Differentiate MismatchedInputException versus ValueInstantiationException
Closes gh-24455
2020-02-12 16:48:32 +01:00
Sam Brannen a9d9b76d09 Support SpEL compilation of interface methods again
Spring Framework 5.1.8 introduced a regression for the compilation of
SpEL expressions referencing a method declared in an interface. An
attempt to compile such an expression resulted in a
SpelEvaluationException caused by an IncompatibleClassChangeError.

This commit fixes this regression by adding explicit support in
ReflectivePropertyAccessor.OptimalPropertyAccessor.generateCode() for
methods declared in interfaces.

Closes gh-24357
2020-02-12 15:33:01 +01:00
Sam Brannen de7bed2ab2 Simplify custom_java_home.gradle script
Setting `options.fork = true` causes the classpath in the forked
compiler process to include Class-Path entries from MANIFEST.MF files
in JARs in the classpath, which results in warnings about missing
classpath entries.

This commit removes the `options.fork = true` declaration and further
simplifies the script.

See gh-24474
2020-02-12 14:30:29 +01:00
Sam Brannen 9dbd411f81 Suppress warnings in Gradle build 2020-02-12 11:04:07 +01:00
Sam Brannen 5d4f1d9e09 Extract ValueExtractor functional interface
See gh-24375
2020-02-12 10:49:36 +01:00
Sam Brannen 974cacac31 Support nested annotations in ASM-based processing again
Spring Framework 5.0 introduced a regression in ASM-based annotation
processing. Specifically, nested annotations were no longer supported,
and component scanning resulted in an exception if a candidate
component was annotated with an annotation that contained nested
annotations.

This commit fixes this regression by introducing special handling in
AnnotationTypeMapping that supports extracting values from objects of
type TypeMappedAnnotation when necessary.

Closes gh-24375
2020-02-12 10:36:54 +01:00
Rossen Stoyanchev 9277b47040 Polishing: remove use of cast where avoidable 2020-02-11 16:51:35 +00:00
Rossen Stoyanchev d552105516 Eliminate windowUntil from StringDecoder
This is a follow-up on the earlier commit
28a95e89f3 eliminating windowUntil
entirely which generates a BubblingException wrapper. This also keeps
the chain a little simpler.

See gh-24355
2020-02-11 16:49:21 +00:00
Rossen Stoyanchev e35d3b8bb5 Update advice on RestTemplate
Closes gh-24503
2020-02-11 14:02:50 +00:00
Rossen Stoyanchev 0a974511bd Expose awaitTerminationMillis presion
Closes gh-24496
2020-02-11 14:02:50 +00:00
Rossen Stoyanchev 28a95e89f3 Upgrade to Dysprosium SR5 snapshots
See gh-24355
2020-02-11 12:52:04 +00:00
Rossen Stoyanchev 7d1d989535 Minor polishing in ConcurrentReferenceHashMap
Closes gh-24494
2020-02-11 10:49:28 +00:00
Rossen Stoyanchev e4a530efac Minor refactoring in CommonsLogWriter
Closes gh-24495
2020-02-11 10:40:24 +00:00
Juergen Hoeller d521d37f14 Upgrade to Hibernate ORM 5.4.11 and Groovy 3.0 final 2020-02-10 18:10:41 +01:00
Rossen Stoyanchev 009dfbfafc MockRestServiceServer clears failed requests map
Closes gh-24486
2020-02-10 15:01:47 +00:00
Rossen Stoyanchev df706f4c7c Restore use of Flux-based encode method in HTTP
Closes gh-24441
2020-02-07 21:44:44 +00:00
Arjen Poutsma a03a116f6b Force TokenBuffer to use BigDecimal if elementtype
This commit makes the Jackson2Tokenizer enable
TokenBuffer.forceUseOfBigDecimal if the element type given to the
Decoder is BigDecimal. Previous to this commit, values would be
converted to floats.

Closes gh-24479
2020-02-07 14:16:21 +01:00
Andy Wilkinson 02e90a8645
Upgrade to Spring Asciidoctor Extensions 0.4.0.RELEASE
0.4.0 provides built-in support for remembering a user's selections
using local storage. This replaces the custom switch language
JavaScript.

The selection is stored using a key derived from the
options that were available. Concretely, when the options are Java or
Kotlin, the local storage key is java-kotlin. Similarly, if the
choices were Java, Kotlin, and XML, the key would be java-kotlin-xml.

Given local storage's domain and protocol scoping, the nature of the
key that's used for storage will allow a user's selections to be
applied across all documentation hosted on https://docs.spring.io that
offer the same options.

Closes gh-24481
2020-02-07 12:16:02 +01:00
Sam Brannen c640d28a82 Polishing 2020-02-07 11:30:23 +01:00
Sam Brannen 51fa98a1b2 Apply compiler conventions to test fixtures 2020-02-07 11:04:03 +01:00
Arjen Poutsma 45555f77a6 Honour ObjectMapper feature in Jackson2Tokenizer
After this commit, Jackson2Tokenizer honours ObjectMapper's
DeserializationFeature.USE_BIG_DECIMAL_FOR_FLOATS feature when creating
TokenBuffers.

Closes gh-24479
2020-02-07 10:45:00 +01:00
Sam Brannen c648425822 Ignore warnings for missing classpath elements with custom JAVA_HOME
Prior to this commit, the "-Werror" was removed as a command-line
argument in order not to fail the build for missing classpath elements.

This commit reinstates "-Werror" and removes "-Xlink:path" in order to
explicitly ignore warnings for missing classpath elements when executing
the build with a custom JAVA_HOME.

See gh-24474
2020-02-07 10:23:07 +01:00
Michael Simons 711fafc924
Improve assertion message in PersistenceExceptionTranslationInterceptor
Closes gh-24484
2020-02-06 15:41:33 +01:00
Sam Brannen ce2c0e4c79 Credit @marcphilipp and @snicoll
See gh-24474
2020-02-06 15:32:51 +01:00
Sam Brannen 8f02e1088d Support alternate JDK versions in Gradle build
This commit adds support for the following two JVM system properties
that control the Gradle build for alternative JDKs (i.e., a JDK other
than the one used to launch the Gradle process).

- customJavaHome: absolute path to the alternate JDK installation to
  use to compile Java code and execute tests. Setting this system
  property causes Groovy 3.0 RC3 to be used instead of 2.5.x. This
  system property is also used in spring-oxm.gradle to determine
  whether JiBX is supported.

- customJavaSourceVersion: Java version supplied to the `--release`
  command line flag to control the Java source and target compatibility
  version. Supported versions include 9 or higher. Do not set this
  system property if Java 8 should be used.

Examples:

./gradlew -DcustomJavaHome=/opt/java/jdk-14 test

./gradlew --no-build-cache -DcustomJavaHome=/opt/java/jdk-14 test

./gradlew -DcustomJavaHome=/opt/java/jdk-14 -DcustomJavaSourceVersion=14 test

See gh-24474
2020-02-06 15:24:19 +01:00
Juergen Hoeller b23049bd27 Polishing 2020-02-06 12:59:55 +01:00
Juergen Hoeller 669a689a50 Prevent unnecessary refresh for InjectionMetadata.EMPTY
Closes gh-24485
2020-02-06 12:44:05 +01:00
Stephane Nicoll 10d008e3db Upgrade to RSocket 1.0.0-RC6
Closes gh-24482
2020-02-06 08:56:18 +01:00
Rossen Stoyanchev ba5fc21ab4 Option to pair AnnotationIntrospector instances
Closes gh-22830
2020-02-05 20:49:07 +00:00
Rossen Stoyanchev 9aea10179b Insert StringMessageConverter for SSE
Closes gh-24465
2020-02-05 20:49:07 +00:00
Juergen Hoeller 65c8a10fb0 Upgrade to EclipseLink 2.7.6 and JiBX 1.3.3 2020-02-05 18:21:03 +01:00