PR gh-25038 introduced regressions in SimpleThreadScope and
SimpleTransactionScope in Spring Framework 5.2.7. Specifically, if a
thread-scoped or transaction-scoped bean has a dependency on another
thread-scoped or transaction-scoped bean, respectively, a
ConcurrentModificationException will be thrown on Java 11 or higher.
The reason is that Java 11 introduced a check for concurrent
modification in java.util.HashMap's computeIfAbsent() implementation,
and such a modification can occur when a thread-scoped bean is being
created in order to satisfy a dependency of another thread-scoped bean
that is currently being created.
This commit fixes these regressions by switching from HashMap to
ConcurrentHashMap for the instance maps in SimpleThreadScope and
SimpleTransactionScope.
Closes gh-25618
This commit declares each of the following public interfaces as a
@FunctionalInterface.
- org.springframework.context.ApplicationContextInitializer
- org.springframework.test.web.servlet.DispatcherServletCustomizer
- org.springframework.validation.MessageCodeFormatter
- org.springframework.util.IdGenerator
- org.springframework.beans.factory.config.YamlProcessor.MatchCallback
- org.springframework.beans.factory.config.YamlProcessor.DocumentMatcher
Closes gh-25580
This commit removes support for a standalone "L" in the
day-of-week of a cron expression, which used a locale-dependent
API to determine what the last day of the week is (Saturday or
Sunday ?).
Alternatively, we could have implement this in the exact way as Quartz
has done (i.e. treat the "L" like "SAT"), but we opted not to do that,
as having an explicit SAT or SUN is much clearer.
This commit makes sure that in CronExpression, the asterisk is only used
in a range field, and is not surrounded by unexpected characters.
Closes gh-19500
This commit introduces support for Quartz-specific features in
CronExpression. This includes support for "L", "W", and "#".
Closes gh-20106
Closes gh-22436
Added test for Friday 13th trigger, i.e. an uncommon crontab expression.
With the new CronExpression in place, this failure does not occur
anymore.
Closes gh-21574
Added test for a fixed day-of-week and day-of-month combination.
With the new CronExpression in place, this failure does not occur
anymore.
Closes gh-13621
This commit adds a new `StartupStep` interface and its factory
`ApplicationStartup`. Such steps are created, tagged with metadata and
thir execution time can be recorded - in order to collect metrics about
the application startup.
The default implementation is a "no-op" variant and has no side-effect.
Other implementations can record and collect events in a dedicated
metrics system or profiling tools. We provide here an implementation for
recording and storing steps with Java Flight Recorder.
This commit also instruments the Spring application context to gather
metrics about various phases of the application context, such as:
* context refresh phase
* bean definition registry post-processing
* bean factory post-processing
* beans instantiation and post-processing
Third part libraries involved in the Spring application context can
reuse the same infrastructure to record similar metrics.
Closes gh-24878
Because of security and broader industry support, support for several
remoting technologies is now deprecated and scheduled for removal in
Spring Framework 6.0.
This commit deprecates the following remoting technologies:
* HTTPInvoker
* RMI
* Hessian
* JMS remoting
Other remoting technologies like EJB or JAXWS might be deprecated in the
future depending on industry support.
Closes gh-25379
This commit removes load time weaving, CGLIB and Objenesis support
from native images.
GraalDetector has been removed for now because of
https://github.com/oracle/graal/issues/2594. It should be reintroduced
when this bug will be fixed with NativeImageDetector class name.
Closes gh-25179