Commit Graph

779 Commits

Author SHA1 Message Date
Juergen Hoeller
e518d7dcc6 Mark log4j support classes as deprecated in favor of Apache Log4j 2 (following Apache's EOL declaration for log4j 1.x)
Issue: SPR-13400
2015-08-27 12:36:57 +02:00
Juergen Hoeller
e05fb494f5 Polishing 2015-08-26 11:04:14 +02:00
Juergen Hoeller
3430f7623c Consistent detection of meta-annotation attributes via ASM
Issue: SPR-13394
2015-08-25 21:52:11 +02:00
Juergen Hoeller
b198cad58e SimpleAliasRegistry detects circles between non-canonical aliases as well (through hasAlias)
Additionally, as an optimization, we skip the re-registration step for existing aliases now.

Issue: SPR-13390
2015-08-25 17:06:23 +02:00
Sam Brannen
6085be3a71 Assert status quo for finding annotations on bridged methods 2015-08-22 16:49:12 +02:00
Sam Brannen
a3e7848a30 Clean up warnings and tests in spring-core 2015-08-20 15:49:33 +02:00
Stephane Nicoll
71585c909a Polish 2015-08-17 14:44:59 +02:00
Sam Brannen
68c39570fe Revert "Increase randomness in SocketUtils"
This reverts commit d5944c4e39.
2015-08-16 14:39:48 +02:00
Sam Brannen
d5944c4e39 Increase randomness in SocketUtils 2015-08-15 23:48:20 +02:00
Sam Brannen
f47bbb0d9e Polish tests 2015-08-12 19:35:45 +02:00
Gary Russell
f15140415a Properly detect available port on localhost in SocketUtils
SocketUtils is used to find available ports on localhost; however,
prior to this commit, SocketUtils incorrectly reported a port as
available on localhost if another process was already bound to
localhost on the given port but not to other network interfaces. In
other words, SocketUtils determined that a given port was available for
some interface though not necessarily for the loopback interface.

This commit addresses this issue by refactoring SocketUtils so that it
tests the loopback interface to ensure that the port is actually
available for localhost.

Issue: SPR-13321
2015-08-12 18:45:52 +02:00
Juergen Hoeller
e0f012f32d Removal of redundant JdkVersion checks in the test suite
Issue: SPR-13312
2015-08-12 18:42:36 +02:00
Sam Brannen
acb44f9d46 Suppress warnings regarding deprecated JdkVersion
Issue: SPR-13312
2015-08-12 17:36:28 +02:00
Juergen Hoeller
bec3b0fa1a Deprecate JdkVersion (for optimistic compatibility with newer JDK generations)
Issue: SPR-13312
2015-08-12 16:14:43 +02:00
Sam Brannen
e20b47c3bc Ensure local aliases don't override meta-annotation
This commit introduces an additional test case to ensure that explicit
local attribute aliases (configured via @AliasFor) do not accidentally
override attributes of the same names in meta-annotations (i.e., by
convention).

Issue: SPR-13325
2015-08-12 14:38:01 +02:00
Sam Brannen
4317e76e79 Polish AnnotationUtilsTests 2015-08-12 14:36:54 +02:00
Sam Brannen
5deeaf348a Polish SynthesizedAnnotation support classes 2015-08-10 15:40:25 +02:00
Sam Brannen
f17173f6d5 Synthesize nested maps into annotations
Prior to this commit, attempting to synthesize an annotation from a map
of annotation attributes that contained nested maps instead of nested
annotations would result in an exception.

This commit addresses this issue by properly synthesizing nested maps
and nested arrays of maps into nested annotations and nested arrays of
annotations, respectively.

Issue: SPR-13338
2015-08-10 14:55:54 +02:00
Sam Brannen
8289036165 Throw exception if required meta-annotation is not present
It is a configuration error if an alias is declared via @AliasFor for
an attribute in a meta-annotation and the meta-annotation is not
meta-present. However, prior to this commit, the support for validating
the configuration of @AliasFor in AnnotationUtils currently silently
ignored such errors.

This commit fixes this by throwing an AnnotationConfigurationException
whenever a required meta-annotation is not present or meta-present on
an annotation that declares an explicit alias for an attribute in the
meta-annotation.

Issue: SPR-13335
2015-08-09 19:14:29 +02:00
Sam Brannen
78ff4ff542 Polish AnnotationUtilsTests 2015-08-09 16:48:38 +02:00
Sam Brannen
48b965ad33 Improve performance of NumberUtils
This commit aims to improve the space and time performance of
NumberUtils by invoking valueOf() factory methods instead of the
corresponding constructors when converting a number to a target class.
2015-08-06 19:42:03 +02:00
Sam Brannen
e0392d9da5 Polish NumberUtilsTests 2015-08-06 19:31:44 +02:00
Sam Brannen
15033c1cc9 Polish Javadoc for NumberUtils 2015-08-06 19:21:02 +02:00
Sam Brannen
c8d604bf05 Ensure @AliasFor overrides attribute in correct meta-annotation
Prior to this commit, an explicit override for an attribute in a
meta-annotation configured via @AliasFor could potentially result in an
incorrect override of an attribute of the same name but in the wrong
meta-annotation.

This commit fixes the algorithm in getAliasedAttributeName(Method,
Class) in AnnotationUtils by ensuring that an explicit attribute
override is only applied to the configured target meta-annotation
(i.e., configured via the 'annotation' attribute in @AliasFor).

Issue: SPR-13325
2015-08-06 19:04:08 +02:00
Stephane Nicoll
1a659e3c1d Polish 2015-08-05 08:36:01 +02:00
Sam Brannen
1ff3af6da3 Improve Javadoc for Ordered/@Order regarding sort semantics 2015-07-30 15:24:04 +02:00
Sam Brannen
a07ba695b0 Make @Order @Documented 2015-07-30 15:21:32 +02:00
Sam Brannen
1c8ac2b2aa Update @AliasFor Javadoc regarding new 'value' alias
Issue: SPR-13289
2015-07-29 16:08:42 +02:00
Sam Brannen
725292081e Introduce 'value' alias for 'attribute' in @AliasFor
SPR-11512 introduced support for annotation attribute aliases via
@AliasFor, requiring the explicit declaration of the 'attribute'
attribute. However, for aliases within an annotation, this explicit
declaration is unnecessary.

This commit improves the readability of alias pairs declared within an
annotation by introducing a 'value' attribute in @AliasFor that is an
alias for the existing 'attribute' attribute. This allows annotations
such as @ContextConfiguration from the spring-test module to declare
aliases as follows.

public @interface ContextConfiguration {

     @AliasFor("locations")
     String[] value() default {};

     @AliasFor("value")
     String[] locations() default {};

    // ...
}

Issue: SPR-13289
2015-07-29 15:27:06 +02:00
Juergen Hoeller
291550a484 AntPathMatcher allows for case-insensitive matching
Issue: SPR-13286
2015-07-29 12:38:41 +02:00
Juergen Hoeller
965fca808a Polishing 2015-07-29 01:08:16 +02:00
Sam Brannen
288d253b8b Introduce support for conditional lambda execution in Spring's Assume 2015-07-27 19:48:01 +02:00
Sam Brannen
b6c0e7cba3 Remove trailing whitespace in Java source code 2015-07-27 12:40:54 +02:00
Juergen Hoeller
0cce41eb94 Fixed exception message expectation plus formatting
Issue: SPR-13067
2015-07-17 16:19:11 +02:00
Juergen Hoeller
aedef43a9a Exception fine-tuning and general polishing
Issue: SPR-13067
2015-07-17 15:24:04 +02:00
Sam Brannen
0940f43a47 Stop documenting annotations using @AliasFor in Javadoc
The removed listing will later be incorporated into the reference manual
in a dedicated section.

Issue: SPR-11515
2015-07-08 15:13:09 +02:00
Juergen Hoeller
145d88d152 Polishing 2015-07-07 00:26:31 +02:00
Juergen Hoeller
df8e9638ee LinkedMultiValueMap explicitly supports deep copies
Issue: SPR-13201
2015-07-07 00:24:39 +02:00
Sam Brannen
67ac675e9a Polish AnnotationAttributes[Tests] 2015-07-06 14:41:52 +02:00
Juergen Hoeller
b7acddbb19 AnnotationAttributes stores and re-throws resolution exceptions
Issue: SPR-13177
2015-07-06 13:35:16 +02:00
Juergen Hoeller
265cd2ad1e Javadoc fine-tuning for 4.2 2015-06-30 18:02:42 +02:00
Sam Brannen
49aabd5ac2 Polish Javadoc for (Synthesizing)MethodParameter 2015-06-30 00:30:42 +02:00
Juergen Hoeller
dc1f921f5c Split between basic MethodParameter and SynthesizingMethodParameter
This split avoids a package tangle (between core and core.annotation) and also allows for selective use of raw annotation exposure versus synthesized annotations, with the latter primarily applicable to web and message handler processing at this point.

Issue: SPR-13153
2015-06-30 00:02:02 +02:00
Juergen Hoeller
a5349eb2f8 Base64Utils falls back to JAXB DatatypeConverter for String-based encoding
Issue: SPR-12938
2015-06-26 22:06:13 +02:00
Rossen Stoyanchev
b542b52775 Update Javadoc on AntPathMatcher 2015-06-25 09:41:59 -04:00
Sam Brannen
51e30dd221 Polish MimeType 2015-06-24 23:59:22 +02:00
Sam Brannen
89e504c2f1 Uses Charset instead of String in MimeType.equals()
Prior to this commit, Spring's MimeType checked for equality between
two MIME types based on the equality of their properties maps; however,
the properties maps contain string representations of the "charset"
values. Thus, "UTF-8" is never equal to "utf-8" which breaks the
contract for character set names which must be compared in a
case-insensitive manner.

This commit addresses this issue by ensuring that "charset" properties
in MimeType instances are compared as Java Charset instances, thereby
ignoring case when checking for equality between charset names.

Issue: SPR-13157
2015-06-23 22:30:25 +02:00
Sam Brannen
f2f58f1677 Polish Javadoc in MimeType 2015-06-23 21:26:50 +02:00
Sam Brannen
3da59178e5 Document attribute alias support in AnnotationUtils 2015-06-23 18:38:00 +02:00
Sam Brannen
2451594cdd Synthesize annotation arrays within AnnotationUtils
Issue: SPR-11393
2015-06-23 18:30:47 +02:00