Update AntPathMatcher Comparator to treat `/**` in the same way as
`null` paths.
Prior to this commit the pattern `/**` would be picked in preference
to patterns with 3 or more PathVariable (e.g. `/matches/{matchId}/
periods/{periodId}/teams/{teamId}/results`).
Issue: SPR-10550
Refine AntPathMatcher.combine rules to allow direct concatenation of
patterns when pattern1 does not contain '*.'. Prior to this commit
direct concatenation was allowed when pattern1 did not contain '.',
this prevented calls of the form:
pathMatcher.combine("/1.0", "/foo/test")
from working as expected.
This commit also applies some general cleanup to the `combine` method.
Issue: SPR-10554
This turned into a rather huge affair since it led to the introduction of a new AutowireCandidateResolver implementation in the spring-context module. That ACR impl is now being set through AnnotationConfigUtils; GenericApplicationContext and co do not set a default QualifierAnnotationAutowireCandidateResolver anymore (which has always been a smell anyway). At the same time, dependency ordering has moved from AutowiredAnnotationBeanPostProcessor to DefaultListableBeanFactory itself through a "dependencyComparator" strategy, applying to constructor dependencies and lazy resolution proxies as well.
Issue: SPR-10353
Also, StandardReflectionParameterNameDiscoverer calls "Parameter.isNamePresent()" now to return null (and pass on to the next discoverer) if no JDK 8 parameters are available. Note that this requires OpenJDK 8 b100 or higher to compile now.
Issue: SPR-10532
MimeType is available in core-spring and does not include support
for quality parameters and media used in HTTP content negotiation.
The MediaType sub-class in org.springframework.http adds q-parameters.
The method returning query parameters now returns only query string
parameters as opposed to any Servlet request parameter.
This commit also adds a ReadOnlyMultiValueMap.
Previously building with JDK > 1.8 b88 caused test failures due to errors
with custom compilers like Jibx and Jasper reports.
This commit adds a new TestGroup named CUSTOM_COMPILATION that allows the
CI server to continue to run these tests but allow committers to ignore
these tests.
Add ByteBufferConverter that is registered by default with the
DefaultConversionService. Allows conversion from/to a ByteBuffer and
byte[] or to any type that can be converted via a byte[].
Issue: SPR-10712
Prior to this commit the Spring Framework did not provide a public means
for scanning for available server ports. However, the Spring Framework
internally used a FreePortScanner in integration tests within its own
test suite. Furthermore, Spring Integration 2.2 provides similar support
in a SocketUtils class in the spring-integration-test module.
This commit introduces SocketUtils in spring-core to replace the
FreePortScanner which was previously only used internally within
Spring's test suite. This new implementation is inspired by both Spring
Framework's FreePortScanner and Spring Integration's SocketUtils and
consequently attempts to merge the best of both previous
implementations.
Issue: SPR-8032
Develop new org.springframework.core.io.Resource implementation
backed by java.nio.file.Path. Primarily developed to allow custom
file system implementations to be used with Spring.
Since the minimum requirement for Spring is still Java 6 the
existing FileSystemResource can't be retrofitted (and no #getPath
method can be added to the Resource interface).
Unlike FileSystemResource, PathResource delegates to the underlying
file system instead of StringUtils. It has therefore slightly
different semantics. First, when building relative resources via
createRelative the relative path will apply to this path (like URL or
Unix). Second, equality is delegated to the underlying file system
provider so it's case-insensitive on Windows.
Issue: SPR-10608
JOpt 4.4 has enumerable options, so this change can be made
if we upgrade. The only awkward thing is that JOpt allows
aliases for options, so we have to pick one to avoid double
counting. This implementation picks the last one in the list
which is the alphebtically last of the long options, if there
are any (e.g. "o1", "option1" returns "option1"). Most of the
time there will only be one or two aliases for each option so
it won't matter.
Issue: SPR-10579
Update AnnotationMetadata and MethodMetadata to extend from a new
AnnotatedTypeMetadata base interface containing the methods that are
common to both. Also introduce new getAllAnnotationAttributes methods
providing MultiValueMap access to both annotation and meta-annotation
attributes.
Existing classreading and standard implementations have been
refactored to support the new interface.
Add temporary Assume.canLoadNativeDirFonts() method allowing failing
jasper report tests to be bypassed on OSX.
This should be revisited when JDK 8 is released.
Issue: SPR-10537
Specifically, we need to avoid "... ? this.method : this.constructor" expressions since those potentially select java.lang.reflect.Executable (which is only available on JDK 8) as common type and hardcode this into the generated bytecode (which therefore becomes JDK 8 dependent).
Aiming for the JdkVersion class to support one generation ahead now, in order for the test suite to properly detect 1.7/1.8+ JVMs even when running against a JDK 1.9 preview at some point.
ASM has been patched to accept 1.8 bytecode simply through removing an assertion. As a consequence, we have an embedded copy of the ASM sources now instead of jarjar'ing the original ASM jar. The sources originate from ASM 4.1; for CGLIB 3.0 compatibility, a further assertion has been removed.
Issue: SPR-9639
In particular, avoid accidental usage of ASM for core JDK types - which will fail in case of a new bytecode version in the JDK, even if the application itself has been compiled with an earlier bytecode target.
Issue: SPR-10292