Commit Graph

21142 Commits

Author SHA1 Message Date
Rossen Stoyanchev
0e4e25d227 Updates to CORS patterns contribution
Closes gh-25016
2020-07-08 13:18:46 +03:00
Rossen Stoyanchev
1181bb1852 Rename originsPattern to originPatterns
See gh-25016
2020-07-08 13:18:46 +03:00
Ruslan Akhundov
8632118e8d CorsConfiguration now supports pattern based origins.
Closes gh-24763
2020-07-08 13:18:46 +03:00
Juergen Hoeller
a1bab14140 Upgrade to ASM 9.0 beta
Closes gh-24872
2020-07-07 16:17:58 +02:00
Sam Brannen
8e02d2706e Merge branch '5.2.x' 2020-07-07 14:18:56 +02:00
Sam Brannen
2c9e794676 Make Profiles created via Profiles.of() comparable
Prior to this commit, a Profiles instance created via Profiles.of() was
not considered equivalent to another Profiles instance created via
Profiles.of() with the exact same expressions. This makes it difficult
to mock invocations of Environment#acceptsProfiles(Profiles) -- for
example, when using a mocking library such as Mockito.

This commit makes Profiles instances created via Profiles.of()
"comparable" by implementing equals() and hashCode() in ParsedProfiles.

Note, however, that equivalence is only guaranteed if the exact same
profile expression strings are supplied to Profiles.of(). In other
words, Profiles.of("A & B", "C | D") is equivalent to
Profiles.of("A & B", "C | D") and Profiles.of("C | D", "A & B"), but
Profiles.of("X & Y") is not equivalent to Profiles.of("X&Y") or
Profiles.of("Y & X").

Closes gh-25340
2020-07-07 14:17:36 +02:00
Sam Brannen
882668c1bc Merge branch '5.2.x' 2020-07-06 16:33:01 +02:00
Sam Brannen
8734c64b75 Remove invalid import from Kotlin example 2020-07-06 16:31:33 +02:00
Sam Brannen
8be2a43d52 Rename SystemArchitecture aspect to CommonPointcuts in AOP ref doc
See gh-25357
2020-07-06 16:20:05 +02:00
Johnny Lim
364939b2a3 Remove redundant Character.toLowerCase() in BeanPropertyRowMapper
This commit removes a redundant Character.toLowerCase() invocation in
BeanPropertyRowMapper.underscoreName().

Closes gh-25361
2020-07-06 15:31:18 +02:00
Sam Brannen
33643593e2 Merge branch '5.2.x' 2020-07-06 14:51:15 +02:00
Sam Brannen
52c2ca610b Polish AOP reference documentation
- fix formatting
- fix syntax
- use consistent example package name
2020-07-06 14:50:44 +02:00
Rossen Stoyanchev
34607d96f1 PathPattern caching with HandlerMappingIntrospector
This commit evolves the solution from M1 by parsing and caching patterns with the
target HandlerMapping's PathPatternParser. This makes it unnecessary for callers to
be aware of pattern parsing.

Closes gh-25312
2020-07-06 15:31:35 +03:00
Brian Clozel
32ab596e94 Upgrade CI to JDK15ea30 2020-07-06 11:32:07 +02:00
Sam Brannen
4ae9895814 Upgrade to Gradle 6.5.1 2020-07-04 15:00:38 +02:00
Sam Brannen
362e228142 Merge branch '5.2.x' 2020-07-03 12:04:34 +02:00
Sam Brannen
35582ded0e Use System.nanoTime() for Random seed in SocketUtils
Prior to this commit, SocketUtils used System.currentTimeMillis() for
the seed for the java.util.Random instance used internally. The use of
the milliseconds value returned by currentTimeMillis() can lead to
collisions for randomly selected free ports for tests executing in
parallel on the same computer.

This commit therefore switches to System.nanoTime() for the Random seed
used in SocketUtils in an attempt to avoid such collisions for tests
executing in parallel in different JVMs on the same computer.

Closes gh-25321
2020-07-03 12:04:02 +02:00
Johnny Lim
72e92211ce Polish mutateContextPathWithoutUpdatingPathShouldFail()
Closes gh-25352
2020-07-02 16:58:32 +02:00
Sam Brannen
85a46882ce Merge branch '5.2.x' 2020-07-02 15:29:32 +02:00
Maksim
008a0a1bdd Fix interface and class names in examples in core-aop doc
Closes gh-25351
2020-07-02 15:28:05 +02:00
Arjen Poutsma
f13ab6d18c Merge branch '5.2.x' 2020-07-01 13:29:15 +02:00
Arjen Poutsma
5b94d9b00b Use UTF-8 for application/*+json
This commit makes sure that the StringHttpMessageConverter reads
input with "application/*+json" as Content-Type with the UTF-8
character set.

Closes gh-25328
2020-07-01 10:46:58 +02:00
Rossen Stoyanchev
5e1b6e3386 Merge branch '5.2.x' 2020-07-01 08:07:56 +01:00
Rossen Stoyanchev
3aaff40e2e Replace explicit use of PooledDataBuffer.release() 2020-07-01 08:07:50 +01:00
Rossen Stoyanchev
b2a4d1c5b1 Avoid re-creating connect Mono<RSocket>
Closes gh-25330
2020-07-01 08:02:03 +01:00
Sébastien Deleuze
9d37794ebc Avoid using LiveBeansView in GraalVM native images
Closes gh-25344
2020-06-30 15:52:50 +02:00
Arjen Poutsma
e251075d6c Merge branch '5.2.x' 2020-06-30 15:49:19 +02:00
Arjen Poutsma
79c339b03e Support for ASCII in Jackson codec & converter
This commit introduces support for writing JSON with an US-ASCII
character encoding in the Jackson encoder and message converter,
treating it like UTF-8.

See gh-25322
2020-06-30 15:46:54 +02:00
Arjen Poutsma
20254f02d2 Polishing 2020-06-30 11:33:12 +02:00
Arjen Poutsma
e9d9de5f99 RouterFunction honors PathPatternParser in config
This commit introduces a way to change the PathPatternParser used in
PathPredicates, by way of a ChangePathPatternParserVisitor. This
visitor is used by both WebFluxConfigurationSupport and
WebMvcConfigurationSupport to make sure the configured parser is used.

Closes gh-23236
2020-06-30 11:33:12 +02:00
Sébastien Deleuze
671d4519b2 Fix checkstyle error 2020-06-30 07:58:05 +02:00
Sébastien Deleuze
02b539c5f5 Leverage spring.ignore.xml flag to avoid XmlBeanDefinitionReader
Closes gh-25338
2020-06-30 07:38:30 +02:00
Sébastien Deleuze
06b364fefe Leverage spring.ignore.xml flag to avoid SQLStateSQLExceptionTranslator
Closes gh-25335
2020-06-30 07:34:50 +02:00
Sam Brannen
a92441186c Check for valid IPv6 host in UriComponentsBuilder.fromUriString
PR gh-358 introduced a "scheme but no host" check in the fromHttpUrl()
method in UriComponentsBuilder, but a similar check was not added to
fromUriString() at that time.

This commit introduces a "scheme but no host" check in fromUriString()
to align with the functionality in fromHttpUrl().

Note, however that the regular expressions used to match against the
hostname or IP address are inexact and still permit invalid host names
or IP addresses. True validation of the host portion of the URI is out
of scope for this commit.

Closes gh-25334
2020-06-29 18:36:21 +02:00
Sam Brannen
622ccc5767 Merge branch '5.2.x' 2020-06-27 14:34:18 +02:00
Sam Brannen
51a5517a45 Polishing 2020-06-27 14:33:44 +02:00
Sam Brannen
d599ec906a Merge branch '5.2.x' 2020-06-27 14:27:58 +02:00
Сергей Цыпанов
d08ce303f1 Extract Class.getName() from String concatenation
This commit extracts a Class.getName() invocation from String
concatenation in AbstractMonitoringInterceptor to avoid an issue
related to profile pollution.

Closes gh-25324
2020-06-27 14:24:49 +02:00
Sam Brannen
df673e65e8 Polish contribution
See gh-25300
2020-06-26 19:20:54 +02:00
May
43df06b905 Replace anonymous inner classes with lambda expressions
Closes gh-25319
2020-06-26 18:47:38 +02:00
Sam Brannen
ba5f4f5414 Merge branch '5.2.x' 2020-06-26 18:31:07 +02:00
Sam Brannen
9876ca003b Support fragments in UriComponentsBuilder.fromHttpUrl()
Prior to this commit, UriComponentsBuilder.fromHttpUrl() threw an
IllegalArgumentException if the provided URL contained a fragment.

This commit aligns the implementation of fromHttpUrl() with that of
fromUriString(), by parsing a fragment and storing it in the builder.

Closes gh-25300
2020-06-26 18:30:09 +02:00
Sam Brannen
dd11dbf3b1 Polish UriComponentsBuilderTests 2020-06-26 14:58:06 +02:00
Rossen Stoyanchev
115ea253f6 Fix typo 2020-06-24 16:29:47 +01:00
Rossen Stoyanchev
b16f6fa456 Shared static instance of DefaultDataBufferFactory 2020-06-24 16:12:56 +01:00
Juergen Hoeller
3a06622270 Include module names into alphabetical order 2020-06-24 16:08:21 +02:00
Sam Brannen
049f5250fe Suppress varargs warning
Prior to this commit, the Gradle build failed due to a varargs warning.

See gh-25311
2020-06-24 15:38:39 +02:00
Philippe Marschall
a142d21700 Use @SafeVarargs in Jackson builder and factory
Using @SafeVarargs in Jackson mapper builder and factory bean classes
allows the varargs methods to be used without a compiler warning. The
implementations of these methods do not perform unsafe operations on
their varargs parameter. It is therefore safe to add this annotation.

The following two methods are changed:

- add @SafeVarargs to Jackson2ObjectMapperBuilder#modulesToInstall
  and make it final
- add @SafeVarargs to
  Jackson2ObjectMapperFactoryBean#setModulesToInstall and make it final

This is a backwards incompatible change as these methods now have to be
declared final. Existing subclasses that override one of these methods
will break.

Closes gh-25311
2020-06-24 15:38:21 +02:00
Sam Brannen
b33d2fe683 Clean up warnings in Gradle build, polishing, etc. 2020-06-24 15:02:24 +02:00
May
bc9b9bc477 Replace cascading if statements with switch statement
Closes gh-25308
2020-06-24 13:54:17 +02:00