Update `NestedJarFileResources` to fix a race condition that could
result in a `NullPointerException`.
The methods `getOrCreateInflater` and `endOrCacheInflater` both
synchronize on a local `inflaterCache` variable but attempted to use the
`this.inflaterCache` instance which could be set to null.
The `releaseInflators` method had a synchronized block for ending each
inflater but the cache was being nulled out outside the block meaning that
the other 2 methods mentioned could hit the race condition.
Signed-off-by: Ian Kettle <25729118+icikle@users.noreply.github.com>
See gh-51744
Closes gh-51708
* fix-devtools-reactive-web-environment-detection:
Polish "Fix detection of reactive web environments in DevTools"
Fix detection of reactive web environments in DevTools
DevToolsPropertyDefaultsPostProcessor looked for
ConfigurableReactiveWebEnvironment
in org.springframework.boot.web.reactive.context by name, but the class
moved to org.springframework.boot.web.context.reactive in 4.0. As a
result, reactive web applications were never identified as web
applications and the hint about setting logging.level.web to DEBUG was
not logged for them.
ConfigurableReactiveWebEnvironment is part of spring-boot, so it is now
referenced directly rather than by name. The servlet environment check
is unchanged as spring-web is an optional dependency.
See gh-51708
Signed-off-by: ohchanKyu <okc0202@naver.com>
The default of @AutoConfigureTestDatabase's replace attribute changed
from ANY to NON_TEST in 3.4 but the manually declared metadata for
spring.test.database.replace still advertised "any" as the default.
See gh-51709
Signed-off-by: ohchanKyu <okc0202@naver.com>
Closes gh-51666
* gh-51666:
Polish "Use TLS port for Docker Compose RabbitMQ connection when SSL is configured"
Use TLS port for Docker Compose RabbitMQ connection when SSL is configured
When a rabbitmq Docker Compose service has SSL bundle labels,
RabbitDockerComposeConnectionDetailsFactory created an SslBundle but
still resolved the address from container port 5672, the plain AMQP
listener. As the connection factory enables SSL when an SslBundle is
present, the TLS handshake was attempted against the non-TLS listener
and the connection failed.
The address is now resolved from container port 5671 when an SslBundle
is present, matching RabbitStreamDockerComposeConnectionDetailsFactory
and the Testcontainers-based RabbitContainerConnectionDetailsFactory.
The SSL integration test now opens a connection using the resolved
address and SslBundle so that it fails without this fix.
Signed-off-by: ohchanKyu <okc0202@naver.com>
See gh-51666
Changelog.computeDifferences() called
ConfigurationMetadataRepository.getAllProperties() from inside its main
loop. The default repository implementation builds a new map each time
that method is called, so the new version's properties were rebuilt once
per property of the old version. The ids that had already been seen were
also tracked in an ArrayList, turning each membership check into a linear
scan.
Read the properties of each repository once and use the old properties
map itself to detect the properties that have been added.
Computing the changelog between Spring Boot 3.4.0 and 3.5.0 (2,498 and
2,555 properties) drops from 203ms to 0.5ms and the generator's peak
memory from 302MB to 91MB. The generated asciidoc is byte for byte
identical.
See gh-51655
Signed-off-by: Junggi Kim <kimjg2477@gmail.com>
Packager#isCycloneDxBom only recognized CycloneDX SBOMs beneath
META-INF/sbom/. In a war, the CycloneDX Maven plugin's output is
packaged beneath WEB-INF/classes/META-INF/sbom/, so repackaging did
not add the SBOM manifest attributes.
Also check beneath Layout#getClassesLocation(), which findMainMethod
already uses to locate application classes. Continue to support the
root location used by jars.
Signed-off-by: COBI-98 <tkdgus968@naver.com>
See gh-51551
Gradle 9.6 deprecates Project.getProperties, which will be removed
in Gradle 10.
Use ProviderFactory.gradleProperty to read the required properties
in AntoraAsciidocAttributes and the image system tests build script.
Preserve null handling for missing Antora properties and fall back
to the project version when springBootVersion is not configured.
Update the provider mocks and add tests for the GraalVM
plugin version attribute.
Signed-off-by: Hyunwoo Jung <hyunwoojung@kakao.com>
See gh-51635
Gradle 9.6 deprecated the implicit lookup of properties in parent
projects, which currently causes the build to emit deprecation
warnings and will become an error in Gradle 10.
The settings script for the gradle/plugins build sets properties
from the root gradle.properties file only on its root project. The
cycle-detection-plugin subproject then resolves javaFormatVersion
and checkstyleToolVersion by walking up to its parent, which
triggers the deprecation.
This commit uses GradleLifecycle#beforeProject rather than
Gradle#rootProject so that the properties are defined directly on
every project in the build. As an isolated action, it also avoids
carrying the settings script into each project's configuration,
which keeps the build friendlier to the configuration cache.
It also enables the NO_IMPLICIT_LOOKUP_IN_PARENT_PROJECTS feature
preview so that any reintroduction of the deprecated behavior fails
the build rather than only emitting a warning.
Signed-off-by: Hyunwoo Jung <hyunwoojung@kakao.com>
See gh-51625
The deprecation entry for
management.prometheus.metrics.export.pushgateway.base-url was declared
as "management.promethus", so the deprecation was never reported.
Signed-off-by: ohchanKyu <okc0202@naver.com>
See gh-51627
This commit improves TestImage so that an explicit image can trigger
the creation of the container, with optional additional setup. This
removes the need of creating additional container types for images that
have multiple flavors, and to please the static method that can only
create a container based on a single match.
Closes gh-51082
Prior to this commit, CloudFoundryReactiveActuatorAutoConfiguration
registered a BeanPostProcessor replaced the WebFilterChainProxy bean
with one that handled CF security and delegated to the existing
chain.
Constructing a new WebFilterChainProxy resulted in the loss of any
firewall customization on the existing chain as Spring Security does
not provide an API to retreive the firewall from the existing chain
and apply it to the new chain.
This commit changes the approach and aligns it with its Servlet
counterpart. Instead of post-processing the filter chain proxy, a new
SecurityWebFilterChain that handles cloudfoundryapplication/**
is defined. This chain becomes part of the existing
WebFilterChainProxy, preserving any firewall customization.
Signed-off-by: aashikantkumar <aashikantkumar2@gmail.com>
See gh-51549
Previously, the CloudFoundryAuthorizationExceptions thrown for a
missing application ID or cloud controller URL were not routed
through the error handling that turned them into a SecurityResponse
with a 503 status code. As a result, they were processed by the
general exception handling which resulted in a 500 response.
This commit updates the reactive SecurityInterceptor so that the
exceptions are processed through
SecurityInterceptor::getErrorResponse. This aligns the behavior of
the Cloud Foundry security intergration in a reactive application
more closely with that of a Servlet application.
Fixes gh-51613
Gradle 9.6 deprecates passing a Project instance as dependency notation,
which currently causes the build to emit deprecation warnings and will
become an error in Gradle 10.
This commit updates AggregatorPlugin to use
DependencyFactory#createProjectDependency instead.
Signed-off-by: Hyunwoo Jung <hyunwoojung@kakao.com>
See gh-51598