Commit Graph

2926 Commits

Author SHA1 Message Date
Andy Wilkinson
16c2ddb02c Merge branch '3.1.x'
Closes gh-38665
2023-12-05 20:31:17 +00:00
Andy Wilkinson
b424254587 Test Gradle plugin against Gradle 8.5
Closes gh-38664
2023-12-05 20:30:54 +00:00
Moritz Halbritter
d172b22064 Escape pipe symbol in properties changelog table cells
Closes gh-38515
2023-11-30 11:37:25 +01:00
Phillip Webb
6fd691af58 Allow FileSystems to be create by splitting URLs
Relax the constraint that a `NestedLocation` must have a nested entry
name specified so that URLs can be split and rebuilt.

Prior to this commit, given a URL of the following form:

	jar:nested:/myjar.jar!/nested.jar!/my/file

It was possible to create a FileSystem from
"jar:nested:/myjar.jar!/nested.jar" and from that create a path to
"my/file".

However, it wasn't possible to create a FileSystem from
"jar:nested:/myjar.jar", then create another file system from the path
"nested.jar" and then finally create a path to "/nested.jar".

This was because `nested:/myjar.jar` was not considered a value URL
because it didn't include a nested entry name.

Projects such as `JobRunr` were relying on the ability to compose file
systems, so it makes sense to remove our somewhat artificial
restriction.

Fixes gh-38592
2023-11-28 22:14:29 -08:00
Phillip Webb
9a0f95420a Update NestedByteChannel.read to read all possible data when
Update `NestedByteChannel.read` so that it loops until all
remaining data has been read into the buffer. Prior to this
commit, it was possible for to read only some bytes into the
buffer. Although it looks like this should be OK according to
the API documentation, the `ZipFileSystem` relies on all
remaining bytes being returned.

Fixes gh-38595
2023-11-28 22:14:29 -08:00
Phillip Webb
8c7e8778a6 Fix NegativeArraySizeException caused by missing unsigned conversion
Update `ZipContent` so that `eocd.totalNumberOfCentralDirectoryEntries`
is converted from a short to an unsigned int to prevent a negative
number from being used.

This commit also updates the code to consistently use `X.toUnsigned...`
helper methods rather than using bitwise operators.

Fixed gh-38572
2023-11-27 23:33:15 -08:00
Phillip Webb
0856e10443 Fix IndexOutOfBoundsException exception from parseUrl with empty spec
Update jar `Handler` code so that the `parseUrl` method can accept an
empty `spec`. Prior to this commit, a `classLoader.getResource("")`
call would result in a `null` result. This breaks a number of things
including `ClassPathResource` and `PathMatchingResourcePatternResolver`.

Fixes gh-38524
2023-11-23 14:35:04 -08:00
Johnny Lim
f9f73aa146 Polish
See gh-38508
2023-11-23 09:39:01 +01:00
Johnny Lim
175b6473c7 Polish
See gh-38389
2023-11-22 10:16:19 +01:00
Scott Frederick
d433deb737 Merge branch '3.0.x' into 3.1.x
Closes gh-38485
2023-11-21 17:30:54 -06:00
Scott Frederick
dabcebf8a3 Merge branch '2.7.x' into 3.0.x
Closes gh-38484
2023-11-21 17:30:07 -06:00
Scott Frederick
d1cce0f8ef Upgrade default CNB builders to Paketo Jammy
Closes gh-38477
2023-11-21 17:22:32 -06:00
Phillip Webb
6c3dec42e0 Add container support for Oracle Free which replaces Oracle XE
Update Docker Compose and Testcontainers support to work with
`gvenzl/oracle-free` which replaces `gvenzl/oracle-xe`.

Closes gh-38476
2023-11-21 11:51:59 -08:00
Phillip Webb
3a32e4e913 Merge branch '3.1.x'
Closes gh-38405
2023-11-20 16:27:46 -08:00
Phillip Webb
f68df82b30 Support lenient ContainerConnectionDetailsFactory hint registration
Update `ContainerConnectionDetailsFactory` hint registration logic
so that types are optional on the classpath.

See gh-36606
Fixes gh-38392
2023-11-20 16:26:22 -08:00
Moritz Halbritter
82f0684cd8 Merge branch '3.1.x'
Closes gh-38354
2023-11-14 17:04:41 +01:00
Moritz Halbritter
22a991b334 Document tags format used in Gradle and Maven plugins
Closes gh-33088
2023-11-14 17:03:50 +01:00
Phillip Webb
dbbde18d41 Attempt to fix Windows build failure due to open files
See gh-38204
2023-11-08 07:04:46 -08:00
Moritz Halbritter
b9a5bdc294 Merge branch '3.1.x'
Closes gh-38249
2023-11-07 11:28:52 +01:00
Moritz Halbritter
e549380a59 Merge branch '3.0.x' into 3.1.x
Closes gh-38248
2023-11-07 11:28:20 +01:00
Moritz Halbritter
3664877d80 Merge branch '2.7.x' into 3.0.x
Closes gh-38247
2023-11-07 11:24:16 +01:00
Andy Wilkinson
08a4a836aa Merge branch '3.1.x'
Closes gh-38233
2023-11-06 14:26:09 +00:00
Andy Wilkinson
b01235e68d Copy attributes from runtimeClasspath to productionRuntimeClasspath
Fixes gh-38209
2023-11-06 11:50:27 +00:00
Phillip Webb
c0f8b90d31 Return getLastModified result from JarUrlConnection
Update `JarUrlConnection` and `NestedUrlConnection` so that calls
to `getLastModified()` and `getHeaderFieldDate("last-modified", 0)`
always return a result.

Fixes gh-38204
2023-11-04 19:43:54 -07:00
Phillip Webb
77218a644e Merge branch '3.1.x' 2023-11-02 14:16:37 -07:00
Phillip Webb
afa4d274c2 Merge branch '3.0.x' into 3.1.x 2023-11-02 14:14:19 -07:00
Phillip Webb
8d53caa1c6 Merge branch '2.7.x' into 3.0.x 2023-11-02 14:13:47 -07:00
Phillip Webb
e891a3e24c Polish adoc formatting 2023-11-02 14:12:56 -07:00
Andy Wilkinson
890a3e72ac Repair file channel when it's closed by interruption
When an interrupted that calls FileChannel.read, the channel is
closed and the read fails with a ClosedByInterruptException. The
closure of the channel makes it unusable by other threads. To
allow other threads to read from the data block, this commit
recreates the FileChannel when a read fails on an interrupted
thread with a ClosedByInterruptException. The exception is then
rethrown to continue the thread's interruption.

Closes gh-38154
2023-11-01 17:12:43 +00:00
Andy Wilkinson
173e6543fd Merge branch '3.1.x'
Closes gh-38168
2023-11-01 15:06:20 +00:00
Andy Wilkinson
40ce6182a1 Merge branch '3.0.x' into 3.1.x
Closes gh-38167
2023-11-01 15:03:29 +00:00
Andy Wilkinson
b7f00c1087 Merge branch '2.7.x' into 3.0.x
Closes gh-38166
2023-11-01 15:02:54 +00:00
Moritz Halbritter
20edbb402f Merge branch '3.1.x' 2023-10-31 10:23:13 +01:00
Moritz Halbritter
607ed86edb Merge branch '3.0.x' into 3.1.x 2023-10-31 10:23:01 +01:00
Moritz Halbritter
f3c10ae97b Polish JsonStream 2023-10-31 09:49:01 +01:00
Andy Wilkinson
94e810201e Fix test for incremental build of renamed properties class
Previously, the .class file for the renamed properties class was
on the class path of the compilation in two places:

1. The output directory of the test's previous compilation
2. The output directory of the compilation of src/test/java of
   spring-boot-configuration-processor

The first of these locations is addressed by updating TestProject.
The .class file is now deleted from the project's output location
at the same time as the .java file is deleted from its source
location.

The second of these locations is addressed by configuring the class
path of the compiler to include a copy of the result of compiling
src/test/java of spring-boot-configuration-processor. From this copy
entries can then be deleted as needed without destabilizing other tests.

Closes gh-26271
2023-10-30 15:17:28 +00:00
Moritz Halbritter
f66c76e2a8 Merge branch '3.1.x'
Closes gh-38078
2023-10-27 13:47:23 +02:00
Moritz Halbritter
5ca7201fa5 Fix "Integrating with Actuator" code snippet
Closes gh-36114
2023-10-27 13:47:02 +02:00
Moritz Halbritter
35aa28485a Merge branch '3.1.x'
Closes gh-38069
2023-10-27 09:50:57 +02:00
Moritz Halbritter
8bb2228adf Document how to unset maven.compiler.release
Closes gh-37993
2023-10-27 09:50:12 +02:00
Phillip Webb
beb49e1933 Add tests for DataBlockInputStream and fix implementation oddities
Fix issues with `DataBlockInputStream` including the fact that remain
bytes were not tracked correctly. Also add some tests and fix a few
other unusual details with the implementation.

Closes gh-38066
2023-10-26 23:00:20 -07:00
Phillip Webb
4af9ed4d1d Fix Tomcat TldScanner issues by returning raw zip data for nested jars
Update JarUrlConnection so that the full raw zip data is returned from
nested jars when no entry name is specified. This update allows
Tomcat's `WarURLConnection` to work with our nested connections since
they can parse the returned raw zip data.

Fixes gh-38047
2023-10-26 23:00:20 -07:00
Phillip Webb
bba323ba5f Copy zip data descriptor records when creating virtual zip data
The zip specification states that when 'bit 3' of the general purpose
flags is set then a data descriptor record must be present. Prior to
this commit, our `VirtualZipDataBlock` ignored such records and would
create invalid data.

Although the generated data would work for zip parsers that read the
central directory records, it causes problems with streaming reader
implementations such as `JarInputStream`.

This commit updates the code so that it now copies the data descriptor
records. It support both blocks that have a signature and those that
don't. It also updates the generation logic to correctly deal with
any extra data bytes present after the local file header record.

Fixes gh-38063
2023-10-26 23:00:20 -07:00
Phillip Webb
b35c4d6497 Open loader jar URLs by default using runtimeVersion
Update `UrlJarFileFactory` so that `runtimeVersion` is used by default
instead of `baseVersion`. Prior to this commit we tried to mirror the
JDK handler on look for a `#runtime` fragment. This unfortunately
doesn't work with the URLs produced by `URLClassPath`.

This commit also fixes a bug in `NestedJarFile` where we didn't return
the correct result from `hasEntry`.

Fixes gh-38050
2023-10-25 21:20:42 -07:00
Andy Wilkinson
b167eb3b02 Merge branch '3.1.x' 2023-10-25 14:50:30 +01:00
Andy Wilkinson
4dea11ef96 Merge branch '3.0.x' into 3.1.x 2023-10-25 14:50:21 +01:00
Andy Wilkinson
ead0c77a5b Polish
See gh-38030
2023-10-25 14:50:07 +01:00
Andy Wilkinson
0d1a223fee Merge branch '3.1.x'
Closes gh-38032
2023-10-25 14:08:22 +01:00
Andy Wilkinson
649117de35 Merge branch '3.0.x' into 3.1.x
Closes gh-38031
2023-10-25 14:08:10 +01:00
Andy Wilkinson
331bf51332 Merge branch '2.7.x' into 3.0.x
Closes gh-38030
2023-10-25 14:07:57 +01:00