Commit Graph

896 Commits

Author SHA1 Message Date
Sam Brannen
d6d05e8ca0 Remove trailing whitespace in Java source code 2016-08-29 15:25:10 +02:00
Juergen Hoeller
2e4a7480fc Consistent use of JDK 7 StandardCharsets over Charset.forName
Issue: SPR-14492
2016-08-26 14:16:19 +02:00
Juergen Hoeller
a8f7f75f64 Moved encodeHttpHeaderFieldParam method to HttpHeaders itself (including tests)
This commit also sets the test source encoding to UTF-8.

Issue: SPR-14547
2016-08-26 11:14:02 +02:00
Brian Clozel
f2faf84f31 Add RFC5987 support for HTTP header field params
This commit adds support for HTTP header field parameters encoding, as
described in RFC5987.
Note that the default implementation still relies on US-ASCII encoding,
as the latest rfc7230 Section 3.2.4 says that:

> Newly defined header fields SHOULD limit their field values to
  US-ASCII octets

Issue: SPR-14547
2016-08-25 14:26:58 +02:00
Juergen Hoeller
c4fcdb6864 DefaultListableBeanFactory does not trigger early candidate creation ahead of primary bean selection
Issue: SPR-14611
2016-08-24 22:56:47 +02:00
Sebastien Deleuze
106bda7294 Fix NettyDataBuffer#lastIndexOf() 2016-08-09 18:07:10 +02:00
Rossen Stoyanchev
cc288a0c4a Switch back to Reactor 3.0 snapshots 2016-08-08 16:42:30 -04:00
Juergen Hoeller
b9ab895743 Inferred generics for newSetFromMap arrangements
Issue: SPR-13188
2016-07-26 21:26:31 +02:00
Juergen Hoeller
c13f8419f9 Minor revision of reactive support layout (ahead of 5.0 M1)
DataSourceUtils moved to main core.io.buffer package.
Consistently named Jackson2JsonDecoder/Encoder and Jaxb2XmlDecoder/Encoder.
Plenty of related polishing.
2016-07-26 15:39:32 +02:00
Juergen Hoeller
ae28815886 Polishing 2016-07-25 23:27:06 +02:00
Juergen Hoeller
87a89c216c Javadoc revision 2016-07-25 14:21:19 +02:00
Juergen Hoeller
dd65f7acfc LinkedCaseInsensitiveMap properly overrides HashMap.clone()
Issue: SPR-14509
2016-07-25 12:08:55 +02:00
Juergen Hoeller
382a931e7d Polishing 2016-07-22 22:28:20 +02:00
Arjen Poutsma
b0d7625e3e Reactor StringEncoder into CharSequenceEncoder
This commit refactors the StringEncoder to a CharSequenceEncoder, in
order to support StringBuilders, Groovy GStrings, etc.

Issue: https://github.com/spring-projects/spring-reactive/issues/120
2016-07-22 12:47:46 -04:00
Rossen Stoyanchev
101220bad1 Add ReactiveAdapterRegistry
Issue: SPR-14159
2016-07-22 12:21:28 -04:00
Juergen Hoeller
e756a5b54b ResourcePatternUtils.getResourcePatternResolver actually accepts null argument
Issue: SPR-14500
2016-07-21 14:06:30 +02:00
Arjen Poutsma
7b2196b408 Add writeAndFlushWith to ReactiveHttpOutputMessage
This commit changes the reactive flushing mechanism to use a newly
introduced writeAndFlushWith(Publisher<Publisher<DataBuffer>>) on
ReactiveHttpOutputMessage instead of using the FlushingDataBuffer.

Issue: https://github.com/spring-projects/spring-reactive/issues/125
2016-07-21 11:08:54 +02:00
Juergen Hoeller
9cc625ee2c Polishing
(cherry picked from commit 5a92aa4)
2016-07-20 23:25:17 +02:00
Juergen Hoeller
28e7c11234 Polishing 2016-07-20 22:41:56 +02:00
Juergen Hoeller
99be15f58b Revise encoding steps towards use of JDK Charset and StandardCharsets
Issue: SPR-14492
2016-07-19 23:43:06 +02:00
Juergen Hoeller
a4743c07d4 Polishing 2016-07-19 20:09:00 +02:00
Juergen Hoeller
d07381e862 Avoid deprecated number constructors on JDK 9
Issue: SPR-13344
2016-07-19 19:25:55 +02:00
Juergen Hoeller
8580483d72 SerializableTypeWrapper reobtains type accessors from declaring interface
Issue: SPR-14487
2016-07-19 19:22:32 +02:00
Juergen Hoeller
aaac199e8b Consistently use constructor-based instantiation instead of Class.newInstance / BeanUtils.instantiate
Issue: SPR-14486
2016-07-19 19:21:06 +02:00
Juergen Hoeller
8bb34bc962 Resource.isFile() and JAF MediaTypeFactory
Issue: SPR-14484
2016-07-19 18:53:31 +02:00
Rossen Stoyanchev
3e096ce810 Improve javadoc on reactive classes
Ensure type-level Javadoc in every class, comply with guidelines for
80 char on Javadoc, and minor polish.
2016-07-18 14:59:15 -04:00
Fredrik Sundberg
d3b051a933 Fix javadoc reference
Method is called nextBackOff() and not nextBackOffMillis().

Closes gh-1115
2016-07-18 08:14:12 +02:00
Rossen Stoyanchev
028be2a298 Switch to Reactor 3 snapshots and Netty 4.1.3 2016-07-15 17:16:26 -04:00
Juergen Hoeller
dc1664939c Javadoc fixes and pruning of outdated references 2016-07-15 22:12:11 +02:00
Sam Brannen
177f4ec3a7 Polish annotation utils 2016-07-15 19:54:53 +02:00
Sam Brannen
53c9584025 Remove obsolete references to @AliasFor in Javadoc for AnnotationAttributes 2016-07-15 19:53:54 +02:00
Sam Brannen
53dd88437e Delete dead code in AnnotationAttributes 2016-07-15 19:51:33 +02:00
Juergen Hoeller
3d3407c789 Consistent alias processing behind AnnotatedTypeMetadata abstraction (also for ASM)
Issue: SPR-14427
2016-07-15 13:59:25 +02:00
Rossen Stoyanchev
d2e105f28d Add @Since 5.0 and package-info for reactive classes 2016-07-14 17:40:17 -04:00
Juergen Hoeller
e2c7653da4 Correct parameter index boundary in exception message
Issue: SPR-14466
2016-07-14 22:29:14 +02:00
Rossen Stoyanchev
2e8326220b Move spring-web-reactive classes to spring-core 2016-07-14 12:30:30 -04:00
Juergen Hoeller
dd65689e0a MethodParameter.equals accepts subclasses pointing to same target declaration again
Issue: SPR-14438
2016-07-14 09:51:37 +02:00
Sam Brannen
264f5860a8 Use Supplier<String> support in Assert in spring-core
This commit makes use of the new Supplier<String> variants of utility
methods in org.springframework.util.Assert within the spring-core
module.

Issue: SPR-14450
2016-07-12 16:41:03 +02:00
Sam Brannen
17dd5dd22d Introduce Supplier<String> support in Assert util
Prior to this commit, utility methods in
org.springframework.util.Assert accepted String arguments for custom
error messages. Such Strings are evaluated (e.g., concatenated)
eagerly, and for performance reasons, it was therefore not always
possible to make use of these utility methods. Consequently, there are
several places in the code base that "inline" identical functionality
in order to lazily evaluate error message concatenation and avoid an
unnecessary performance penalty. This leads to verbose code like the
following.

if (!contextPath.startsWith("/")) {
    throw new IllegalArgumentException("contextPath '" + contextPath +
    "' must start with '/'.");
}
if (contextPath.endsWith("/")) {
    throw new IllegalArgumentException("contextPath '" + contextPath +
    "' must not end with '/'.");
}

This commit addresses this shortcoming by introducing Supplier<String>
variants of all utility methods in org.springframework.util.Assert that
allow custom error messages to be evaluated lazily via a lambda
expression that is only evaluated if the assertion fails. This results
in a simplification of the previous examples as follows.

Assert.isTrue(contextPath.startsWith("/"), () -> "contextPath '" +
    contextPath + "' must start with '/'.");
Assert.isTrue(!contextPath.endsWith("/"), () -> "contextPath '" +
    contextPath + "' must not end with '/'.");

Issue: SPR-14450
2016-07-12 16:41:03 +02:00
Sam Brannen
3d4338f555 Clean up warnings in spring-core 2016-07-12 16:41:03 +02:00
Brian Clozel
147a35f4f1 Polish AntPathMatcher.setTrimTokens javadoc
Issue: SPR-14247
2016-07-12 14:47:18 +02:00
Stephane Nicoll
c425e774a3 Polish 2016-07-12 09:10:34 +02:00
Sam Brannen
40b2d26bd4 Avoid reflection for @Repeatable look-ups
Issue: SPR-13188
2016-07-08 13:21:31 +02:00
Juergen Hoeller
61db8e9f1e DigestUtils processes InputStream with buffered read instead of full copy
Issue: SPR-14427
2016-07-08 12:20:49 +02:00
Juergen Hoeller
6aa5931e28 Polishing 2016-07-07 01:05:25 +02:00
Juergen Hoeller
a1f5fb53db Java 8 getParameterCount() instead of getParameterTypes().length
Issue: SPR-13188
2016-07-07 01:04:24 +02:00
Juergen Hoeller
39e3f2ebf6 MethodParameter supports Java 8 Executable/Parameter and validates parameter indexes
Also, equals insists on the same class now, differentiating from SynthesizingMethodParameter.

Issue: SPR-14055
Issue: SPR-13456
Issue: SPR-14438
2016-07-07 00:37:52 +02:00
Juergen Hoeller
102dc8a4dd Polishing 2016-07-06 15:29:15 +02:00
Stephane Nicoll
e4b0486c5a Add @FunctionalInterface on candidate interfaces
Issue: SPR-14432
2016-07-06 14:32:13 +02:00
Stephane Nicoll
00d2606b00 Explicit type can be replaced by <>
Issue: SPR-13188
2016-07-05 17:00:34 +02:00