Commit Graph

3117 Commits

Author SHA1 Message Date
Andy Wilkinson
c44e477a77 Merge branch '3.2.x'
Closes gh-40613
2024-05-02 10:49:55 +01:00
Andy Wilkinson
94c9a5c686 Polish 2024-05-02 10:49:31 +01:00
Andy Wilkinson
c7ec6080ce Publish a runtime variant that supports Java 22
In order to support Java 22, we must use spring-core 6.1.x.
spring-core 6.1.x is a multi-release jar so, in order to support Java
22, a version of Gradle that supports multi-release jars must be
used.

This commit adds a new variant to spring-boot-gradle-plugin for
modern versions of Gradle. When Gradle's plugin API version is 8.7 or
later, we use spring-core 6.1.x. spring-core 6.0.x is used at all
other times.

Closes gh-40074
2024-05-02 10:45:18 +01:00
Moritz Halbritter
51b8b992aa Merge branch '3.2.x'
Closes gh-40606
2024-05-02 10:51:24 +02:00
Moritz Halbritter
888ae040e4 Merge branch '3.1.x' into 3.2.x
Closes gh-40605
2024-05-02 10:51:10 +02:00
Moritz Halbritter
64b302032c Polish "Change Spring Boot CLI init command docs default build system to gradle"
See gh-40603
2024-05-02 10:49:51 +02:00
coursar
1a786fc788 Change Spring Boot CLI init command docs default build system to gradle
See gh-40603
2024-05-02 10:44:33 +02:00
Phillip Webb
63dedaafe0 Merge branch '3.2.x'
Closes gh-40599
2024-05-01 22:46:53 -07:00
yokotaso
5b4bd61720 Fix possible NullPointerException from getPermission()
Fix regression in `JarUrlConnection` where a NullPointerException could
be thrown internally causing performance issues.

When the SecurityManager is present, the following stack trace is
thrown:

java.lang.NullPointerException: Cannot invoke "java.net.URLConnection.getPermission()" because "this.jarFileConnection" is null
        at org.springframework.boot.loader.net.protocol.jar.JarUrlConnection.getPermission(JarUrlConnection.java:175)
        at java.base/jdk.internal.loader.URLClassPath.check(URLClassPath.java:553)
        at java.base/jdk.internal.loader.URLClassPath$Loader.findResource(URLClassPath.java:612)
        at java.base/jdk.internal.loader.URLClassPath.findResource(URLClassPath.java:296)
        at java.base/java.net.URLClassLoader$2.run(URLClassLoader.java:629)
        at java.base/java.net.URLClassLoader$2.run(URLClassLoader.java:627)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
        at java.base/java.net.URLClassLoader.findResource(URLClassLoader.java:626)
        at org.springframework.boot.loader.net.protocol.jar.JarUrlClassLoader.findResource(JarUrlClassLoader.java:70)
        at java.base/java.lang.ClassLoader.getResource(ClassLoader.java:1403)
        at java.base/java.net.URLClassLoader.getResourceAsStream(URLClassLoader.java:290)
        at java.base/java.lang.Class.getResourceAsStream(Class.java:2850)

See gh-39856
2024-05-01 22:42:52 -07:00
Phillip Webb
ff5c2a2351 Improve javadoc cleanup to remove duplicate spaces
Improve `TypeUtils` so that repeated space chars are removed.

Fixes gh-40593
2024-05-01 22:37:10 -07:00
Scott Frederick
c6c02906ef Merge branch '3.2.x'
Closes gh-40577
2024-04-29 16:43:20 -05:00
Scott Frederick
21a0bc7fee Merge branch '3.1.x' into 3.2.x
Closes gh-40576
2024-04-29 16:42:53 -05:00
Moritz Halbritter
a12e3d4594 Merge branch '3.2.x'
Closes gh-40530
2024-04-26 11:13:03 +02:00
Moritz Halbritter
5707ca83e9 Merge branch '3.1.x' into 3.2.x
Closes gh-40529
2024-04-26 11:12:46 +02:00
chaewss
d51282aff5 Remove unnecessary null check for expectedDeprecationMessages
See gh-40524
2024-04-26 11:12:20 +02:00
Moritz Halbritter
760bc9237d Merge branch '3.2.x' 2024-04-26 09:20:47 +02:00
Moritz Halbritter
f13e487724 Close streams in test before deleting file 2024-04-26 09:20:36 +02:00
Phillip Webb
abdff95ad0 Merge branch '3.2.x'
Closes gh-40526
2024-04-25 12:54:13 -07:00
Phillip Webb
9e40970280 Support gzip compressed image layers
Update buildpack support to allow gzip compressed image layers to be
used when returned by the Docker engine. This update is restores
buildpack support when using Docker Desktop with the "Use containerd
for pulling and storing images" option enabled.

This commit introduces a new `ExportedImageTar` class to deal with the
intricacies of determining the mimetype of a layer. The class deals with
the parsing of `index.json' and related manifest blobs in order to
obtain layer information. The legacy `manifest.json` format is also
supported should `index.json` be missing.

Tests have been added to ensure that export archives from Docker Engine,
Docker Desktop (with and without containerd), and Podman can be used.

Fixes gh-40100

Co-authored-by: Moritz Halbritter <moritz.halbritter@broadcom.com>
Co-authored-by: Scott Frederick <scott.frederick@broadcom.com>
2024-04-25 11:51:59 -07:00
Moritz Halbritter
126927f462 Merge branch '3.2.x'
Closes gh-40499
2024-04-24 14:04:17 +02:00
Moritz Halbritter
b416db4dee Merge branch '3.1.x' into 3.2.x
Closes gh-40498
2024-04-24 14:04:08 +02:00
Moritz Halbritter
2cb19f368e Polish "Remove unnecessary nesting of calls to String.format"
See gh-40494
2024-04-24 13:57:07 +02:00
Hyeon Sung
0cf15fcad0 Remove unnecessary nesting of calls to String.format
See gh-40494
2024-04-24 13:55:04 +02:00
Scott Frederick
2019533b65 Merge branch '3.2.x'
Closes gh-40476
2024-04-22 13:28:09 -05:00
Scott Frederick
fc03fded39 Merge branch '3.1.x' into 3.2.x
Closes gh-40475
2024-04-22 13:27:57 -05:00
Scott Frederick
cdf207cf74 Stop expecting deprecations in NativeImagePluginActionIntegrationTests
Closes gh-35709
2024-04-22 13:14:37 -05:00
Phillip Webb
bce468fb19 Polish 'Generate configuration metadata for records'
Restructure `PropertyDescriptor` type hierarchy and polish code.

See gh-29403
2024-04-22 10:28:00 -07:00
Pavel Anisimov
af976caec9 Generate configuration metadata for records
Update `spring-boot-configuration-processor` to support generating
configuration metadata from record parameter javadoc.

See gh-29403
2024-04-22 10:27:47 -07:00
Moritz Halbritter
de560a933c Extract all files under META-INF
Closes gh-40456
2024-04-22 13:20:57 +02:00
Andy Wilkinson
eb23d3cf59 Merge branch '3.2.x'
Closes gh-40465
2024-04-22 11:18:35 +01:00
Andy Wilkinson
deffda47f6 Merge branch '3.1.x' into 3.2.x
Closes gh-40464
2024-04-22 11:18:22 +01:00
Andy Wilkinson
ca4d64ed16 Use absolute path when showing classpath where main class was not found
Closes gh-40463
2024-04-22 11:16:37 +01:00
Phillip Webb
6963bd884b Merge branch '3.2.x' 2024-04-18 12:53:26 -07:00
Phillip Webb
38af8cd362 Merge branch '3.1.x' into 3.2.x 2024-04-18 12:52:54 -07:00
Phillip Webb
20db2b54c7 Update copyright year of changed files 2024-04-18 12:52:29 -07:00
Moritz Halbritter
8df899b510 Merge branch '3.1.x' into 3.2.x
Closes gh-40427
2024-04-18 11:59:50 +02:00
Moritz Halbritter
3479304e13 Disable creation time verification on Linux
Closes gh-40423
2024-04-18 11:58:46 +02:00
Moritz Halbritter
00a10fdc52 Move Docker Compose and Testcontainers to separate section
See gh-38361
2024-04-17 14:05:52 +02:00
Phillip Webb
dfee56ad9d Merge branch '3.2.x'
Closes gh-40381
2024-04-16 22:17:28 -07:00
Phillip Webb
78e12251e9 Optimize VirtualZipDataBlock
Add some optimizations to `VirtualZipDataBlock` that help when
sequentially reading the block from a JarInputStream.

Closes gh-40125
2024-04-16 22:16:00 -07:00
Phillip Webb
13f41da54f Merge branch '3.2.x'
Closes gh-40379
2024-04-16 15:32:03 -07:00
Phillip Webb
9b0593efe3 Fallback to RandomAccessFile on ClosedByInterruptException
Refine the fix for gh-38611 so that `ClosedByInterruptException` no
longer retries in a loop.

Our previous fix was flawed due to the fact that another interrupt
could occur after we clear the first and whilst we are reading data.
If this happens 10 times in a row, we raise an exception and end up
causing NoClassDefFoundError errors.

Our new approach retains the use of `FileChannel` and a direct buffer
up to the point that a `ClosedByInterruptException` is raised or the
thread is detected as interrupted.  At that point, we temporarily
switch to using a `RandomAccessFile` to access the data. This will
block the thread until the data has been read.

Fixes gh-40096
2024-04-16 14:47:07 -07:00
Phillip Webb
4203e1f2fa Rename FileChannelDataBlock to FileDataBlock
Rename the internal `FileChannelDataBlock` to `FileDataBlock` since we
want to fallback to a `RandomAccessFile` when a thread is interrupted.

See gh-40096
2024-04-16 14:46:56 -07:00
Andy Wilkinson
0ed6864d1d Merge branch '3.2.x'
Closes gh-40324
2024-04-11 16:54:46 +01:00
Andy Wilkinson
45e9412d9b Merge branch '3.1.x' into 3.2.x
Closes gh-40323
2024-04-11 16:54:33 +01:00
Andy Wilkinson
baf5a7f130 Make includes configurable via a property
See gh-39837
2024-04-11 16:32:17 +01:00
Andy Wilkinson
2a6293940b Polish "Make excludes configurable via property"
See gh-39837
2024-04-11 16:31:24 +01:00
Matti Tahvonen
58fc8f8c01 Make excludes configurable via property
See gh-39837
2024-04-11 15:43:31 +01:00
Phillip Webb
3ed77ae5f3 Polish 2024-04-04 23:45:21 -07:00
Moritz Halbritter
6abcde3ce8 Prevent deprecation for DBCP2 username and password properties
Closes gh-40076
2024-04-04 15:06:30 +02:00