Commit Graph

519 Commits

Author SHA1 Message Date
Juergen Hoeller 3c6f1f8352 Polishing 2015-05-22 17:24:40 +02:00
Juergen Hoeller 1177f5c0a3 ByteBufferConverter explicitly declares applicability to byte[]
Includes an optimization for simple ByteBuffer duplication.

Issue: SPR-13056
(cherry picked from commit 792b7b9)
2015-05-22 17:23:57 +02:00
Juergen Hoeller ae35e84c1e Polishing
(cherry picked from commit 0711d6d)
2015-05-13 17:27:41 +02:00
Juergen Hoeller ca17dc06a5 SimpleAliasRegistry prevents NPE for alias resolved to null
Issue: SPR-13016
(cherry picked from commit e83d495)
2015-05-13 16:10:53 +02:00
Juergen Hoeller ce4e795f09 Polishing 2015-05-11 18:05:09 +02:00
Juergen Hoeller 8e074b6b67 Avoid infinite loop in PatternMatchUtils
Issue: SPR-12971
(cherry picked from commit db80378)
2015-05-11 15:42:08 +02:00
Juergen Hoeller 5b10575ce5 Fix for ASM issue 317555
Issue: SPR-12957
(cherry picked from commit 2c043ec)
2015-05-11 15:36:59 +02:00
Juergen Hoeller 6a7aab02aa PathMatchingResourcePatternResolver skips invalid jar classpath entries
Issue: SPR-12928
(cherry picked from commit 49f3046)
2015-05-11 15:36:12 +02:00
Juergen Hoeller f1dbe8db27 AnnotatedElementUtils leniently ignores TypeNotPresentExceptions (just like AnnotationUtils)
Also refines logIntrospectionFailure to just log at debug level for meta-annotation introspection failures.

Issue: SPR-12889
(cherry picked from commit e78b086)
2015-05-11 15:26:03 +02:00
Sam Brannen bf423b2ca0 Remove duplicate separators when combining paths
Prior to this commit, AntPathMatcher would not correctly combine a path
that ends with a separator with a path that starts with a separator.
For example, `/foo/` + `/bar` combined into `/foo//bar`.

Specifically, this commit:

 - Removes the duplicated separator in combined paths

 - Improves RequestMappingInfo's toString() representation

 - Fixes Javadoc formatting in AntPathMatcher

 - Polishes AntPathMatcherTests

 - Polishes Javadoc in AbstractRequestCondition

Issue: SPR-12975
(cherry picked from commit a80d0e87a4)
2015-05-08 14:12:28 +02:00
Juergen Hoeller 34a5fb28c2 Polishing 2015-04-01 17:12:29 +02:00
Juergen Hoeller 89f5248189 AnnotationUtils.getAnnotationAttributes makes Method accessible (analogous to AnnotationUtils.getValue)
Issue: SPR-12858
(cherry picked from commit 1d33fd0)
2015-03-31 18:40:21 +02:00
Juergen Hoeller 52ed9b7106 Consistent javadoc param declarations for type variables
(cherry picked from commit d23893f)
2015-03-25 01:02:40 +01:00
Juergen Hoeller ca09eb2c59 Fixed addConverterFactory assertion
(cherry picked from commit 22670b7)
2015-03-25 00:59:33 +01:00
Juergen Hoeller 6892ad42d6 Alignment with ResolvableType revision in master 2015-03-24 21:17:48 +01:00
Juergen Hoeller 8d14e7736a Polishing
(cherry picked from commit 162ee36)
2015-03-21 00:35:08 +01:00
Juergen Hoeller b352dbfdeb Polishing (in particular updating javadoc references to Apache Commons)
(cherry picked from commit bc6a98c)
2015-03-13 20:13:21 +01:00
Juergen Hoeller 7ed7f981c9 Polishing
(cherry picked from commit b541fc9)
2015-03-06 18:50:49 +01:00
Juergen Hoeller f2691901bb ObjectToOptionalConverter preserves existing Optional instances
Issue: SPR-12785
(cherry picked from commit f786fc3)
2015-03-06 18:09:32 +01:00
Juergen Hoeller 5f305759fa Converter interface explicitly documents null values
Issue: SPR-12780
(cherry picked from commit dcb1145)
2015-03-06 18:09:13 +01:00
Juergen Hoeller 364210b0e7 Fixed javadoc 2015-03-02 14:00:05 +01:00
Sam Brannen 6c93745f35 Include charset in EncodedResource.equals()
Prior to this commit, the implementation of equals() in EncodedResource
was based solely on the resource and encoding. Thus, if a Charset were
specified instead of an encoding, invocations of equals() would not
work as expected.

This commit addresses this issue by including the charset in the
implementation of equals() and introducing corresponding tests in a new
EncodedResourceTests class. Furthermore, this commit makes
EncodedResource immutable and updates all Javadoc to reflect support
for the encoding and charset properties.

Issue: SPR-12767
(cherry picked from commit 93c70b7440)
2015-02-28 17:54:06 +01:00
Juergen Hoeller 8dbe753963 Polishing 2015-02-18 17:54:16 +01:00
Juergen Hoeller 0706889222 Polishing
(cherry picked from commit 058714b)
2015-02-10 22:58:16 +01:00
Rossen Stoyanchev d63cfc8eeb Add JdkIdGenerator and use it in SockJS client
Issue: SPR-12658
2015-01-22 21:29:18 -05:00
Juergen Hoeller a7975c685d AnnotationUtils explicitly handles null parameters
Issue: SPR-12604
(cherry picked from commit 0ddf8dd)
2015-01-21 12:33:56 +01:00
Juergen Hoeller ed665a12a3 ObjectToOptionalConverter uses Optional.ofNullable after ConversionService invocation
Issue: SPR-12589
(cherry picked from commit ec84fa6)
2015-01-02 15:53:55 +01:00
Juergen Hoeller 86b8112c90 Polishing 2014-12-29 15:13:40 +01:00
Juergen Hoeller dfdfc03ff3 Polishing 2014-12-22 20:02:25 +01:00
Sam Brannen aec284a4ca Create empty EnumSets & EnumMaps in CollectionFactory
SPR-12483 introduced automatic type conversion support for EnumSet and
EnumMap. However, the corresponding changes in CollectionFactory
contradict the existing contract for the "create approximate" methods
by creating a copy of the supplied set or map, thereby potentially
including elements in the returned collection when the returned
collection should in fact be empty.

This commit addresses this issue by ensuring that the collections
returned by createApproximateCollection() and createApproximateMap()
are always empty.

Furthermore, this commit improves the Javadoc throughout the
CollectionFactory class.

Issue: SPR-12533
2014-12-10 22:59:00 +01:00
Sam Brannen 86f99ec8f7 Improve error handling in CollectionFactory
This commit improves error handling in CollectionFactory by asserting
preconditions.

In addition, this commit introduces ConnectionFactoryTests.
2014-12-10 14:47:15 +01:00
Sam Brannen d8ef666764 Suppress "rawtypes" warnings in CollectionFactory
This commit also adds links to the newly created Eclipse bug that was
raised for this issue.
2014-12-09 21:29:05 +01:00
Sam Brannen fe78900524 Work-around for Eclipse bug regarding EnumSets
This commit introduces superfluous casts in CollectionFactory to
address a bug in Eclipse 4.4.1 that prevents the code from compiling
within Eclipse. Specifically, without these casts Eclipse displays the
following error for use of the EnumSet.copyOf() and EnumSet.noneOf()
methods:

Type mismatch: cannot convert from EnumSet<Enum<Enum<E>>> to
Collection<E>
2014-12-09 20:54:36 +01:00
Juergen Hoeller bb1d1e916e Polishing 2014-12-07 20:52:18 +01:00
Juergen Hoeller 5018889d78 AnnotationAttributesReadingVisitor defensively handles meta-annotation retrieval failure
Issue: SPR-12493
2014-12-02 15:12:23 +01:00
Juergen Hoeller c94d584f37 OrderUtils defensively checks for presence of javax.annotation.Priority
Issue: SPR-12489
2014-12-01 18:08:11 +01:00
Juergen Hoeller efb114d49a Polishing 2014-11-29 20:49:21 +01:00
Juergen Hoeller bfbd25a0e9 BeanWrapper auto-growing support for EnumSet / EnumMap
Issue: SPR-12483
2014-11-29 20:49:06 +01:00
Juergen Hoeller 7635e7b7f2 Polishing
Issue: SPR-12483
2014-11-28 20:32:35 +01:00
Juergen Hoeller fef4cd0ed6 Default conversion support for EnumSet / EnumMap
Issue: SPR-12483
2014-11-28 20:30:46 +01:00
Juergen Hoeller f44217a0c2 Clarified getAllAnnotationAttributes behavior
Issue: SPR-12473
(cherry picked from commit 5ac8680)
2014-11-26 16:14:41 +01:00
Juergen Hoeller ab5856b6a8 Tracking ASM 5.0.4 development: Fix for ASM issue 317545
Issue: SPR-12470
2014-11-26 11:42:30 +01:00
Juergen Hoeller 223d849a14 Polishing 2014-11-23 00:12:02 +01:00
Juergen Hoeller 7fcadaa393 MethodParameter generally uses volatile variables where applicable now (as well as a local copy of the parameterNameDiscoverer field)
Issue: SPR-12453
2014-11-22 16:45:26 +01:00
Juergen Hoeller 1ef06cc743 MutablePropertySources uses an internal CopyOnWriteArrayList for defensiveness against concurrent modifications
Issue: SPR-12428
2014-11-22 16:12:28 +01:00
Chris Beams dff48ad8dd Allow non-String args in JOptCommandLinePropertySource
Prior to this commit, JOptCommandLinePropertySource prevented the
possibility of non-String option arguments. This effectively prevents
the use of JOpt's #ofType support (which allows specifying custom
argument types).

Now, non-String arguments are detected and converted to strings as
necessary. JOpt's #ofType now works as expected. A test has been added
to cover this case.
2014-11-20 12:03:29 +01:00
Juergen Hoeller 285dca027b Polishing
(cherry picked from commit acefd83)
2014-11-02 11:48:09 +01:00
Juergen Hoeller 1146d5ba1d Polishing 2014-10-29 22:44:59 +01:00
Juergen Hoeller 725ad0df50 SimpleMetadataReaderFactory is capable of resolving inner class names with dot syntax now (analogous to ClassUtils.forName)
Issue: SPR-12390
2014-10-29 22:03:01 +01:00
Juergen Hoeller b70c5d1ff1 Normalized AnnotationAttributesReadingVisitor class layout and improved diagnostics through delegating to AnnotationUtils
Issue: SPR-12387
2014-10-28 19:08:45 +01:00