Commit Graph

510 Commits

Author SHA1 Message Date
Moritz Halbritter 94f4a4396c Merge branch '2.7.x'
Closes gh-33880
2023-01-18 17:35:52 +01:00
Moritz Halbritter e8d809fe65 Replace 'via' with 'over' or 'through' in the documentation
Closes gh-33878
2023-01-18 16:56:42 +01:00
Phillip Webb a2ac38e203 Update copyright year of changed files 2023-01-09 15:46:07 -08:00
Krzysztof Krason cf6493f65c Simplify AssertJ assertions and also make them more readable
See gh-33653
2023-01-09 11:10:20 +01:00
Phillip Webb f588793445 Update copyright year of changed files 2022-12-22 01:00:42 -08:00
Moritz Halbritter f36e2ecb7b Use AutoClosables with try-with-resources
Closes gh-33538
2022-12-16 15:43:15 +01:00
Moritz Halbritter 725337f976 Make fields final
Closes gh-33537
2022-12-16 14:28:44 +01:00
Phillip Webb 45ce096b6b Replace our TestCompiler with Spring Framework's version
Replace the last use of our `TestCompiler` with Spring Framework's
version.

See gh-31266
2022-10-18 11:39:03 -07:00
Phillip Webb e0b67889a8 Use Stream.toList instead of Stream.collect when possible
Update code to make use of `Stream.toList()` whenever possible.

Closes gh-28177
2022-10-04 00:29:22 -07:00
Scott Frederick d25a99692f Replace Spring Boot TestCompiler with Spring Framework's version
See gh-31266
2022-09-30 15:58:11 -05:00
Andy Wilkinson 51df7813a5 Remove code deprecated in 2.x and add since and forRemoval attributes
Closes gh-32548
Closes gh-32549
2022-09-30 14:39:05 +01:00
Phillip Webb 46be4a3f30 Merge branch '2.7.x' 2022-09-08 19:38:18 -07:00
Phillip Webb e88a682220 Merge branch '2.6.x' into 2.7.x 2022-09-08 19:37:52 -07:00
Phillip Webb 85697ac482 Update copyright year of changed files 2022-09-08 19:36:59 -07:00
Phillip Webb 07c0a8bced Fix SecurityManager deprecation issues
See gh-32086
2022-08-17 13:22:40 -07:00
Phillip Webb 4ec2e357d9 Merge branch '2.7.x'
See gh-32086
2022-08-17 12:49:52 -07:00
Phillip Webb 60e1cc510c Merge branch '2.6.x' into 2.7.x
See gh-32085
2022-08-17 12:48:21 -07:00
Phillip Webb bd74344025 Revert "Don't close jar files early"
This reverts commit b42f056ddb.
2022-08-17 11:38:42 -07:00
Phillip Webb 674022d401 Revert "Don't close nested jars or wrapper when parent is closed"
This reverts commit 360eb027be.
2022-08-17 11:37:19 -07:00
Phillip Webb ee2bd9e065 Merge branch '2.7.x'
Closes gh-32086
2022-08-15 17:59:28 -07:00
Phillip Webb ef7aac8c14 Merge branch '2.6.x' into 2.7.x
Closes gh-32085
2022-08-15 17:59:06 -07:00
Phillip Webb 360eb027be Don't close nested jars or wrapper when parent is closed
Update `JarFile` so that the `close()` method no longer closes nested
jars or the wrapper. Prior to this commit it was possible for a parent
jar file to be garbage collected and closed even though references still
existed to the nested jars. When this happened the nested jars would get
closed and any access to entries would result in `JarFile.ensureOpen()`
throwing an `IllegalStateException`. The user would often not see this
exception directly, but rather find `ClassNotFoundException` being
thrown.

Fixes gh-31853
2022-08-15 17:55:25 -07:00
Johnny Lim 6a4681baf5 Polish
See gh-31948
2022-08-02 15:14:23 +02:00
Phillip Webb 22144987e9 Update copyright year of changed files 2022-07-29 12:10:03 +01:00
Phillip Webb 35a65cf82e Merge branch '2.7.x'
Closes gh-31876
2022-07-26 17:48:00 +01:00
Phillip Webb fd076ab9ef Merge branch '2.6.x' into 2.7.x
Closes gh-31875
2022-07-26 17:46:20 +01:00
aoyvx 8c93d2e8a7 Ensure PROTOCOL_HANDLER system property is reset
See gh-31870
2022-07-26 17:20:55 +01:00
Phillip Webb 7377d85096 Merge branch '2.7.x'
Closes gh-31866
2022-07-26 12:18:14 +01:00
Phillip Webb a4ef6a7c5c Merge branch '2.6.x' into 2.7.x
Closes gh-31865
2022-07-26 12:13:16 +01:00
Phillip Webb f8412847dc Update copyright year for "Fix typos in code and documentation"
See gh-31734
2022-07-26 12:08:30 +01:00
Marc Wrobel dbfc6bded4 Fix typos in code and documentation
See gh-31734
2022-07-26 12:08:07 +01:00
dreis2211 5db04da275 Use pattern matching for instanceof where appropriate
See gh-31475
2022-06-20 17:55:36 +01:00
dreis2211 b687e1c7ee Use Runtime.version() instead of reflection
See gh-31444
2022-06-19 10:28:59 +02:00
Andy Wilkinson d370d19e7a Merge branch '2.7.x'
Closes gh-31403
2022-06-16 12:14:52 +01:00
Andy Wilkinson 5e1cd28d3f Merge branch '2.6.x' into 2.7.x
Closes gh-31402
2022-06-16 12:14:28 +01:00
Lars Grefer e8a1a0399a Upgrade to Bouncycastle 1.71
Closes gh-31400
2022-06-16 12:14:06 +01:00
Phillip Webb d84557f1f9 Merge branch '2.7.x'
Closes gh-31396
2022-06-15 10:53:17 -07:00
Phillip Webb bcbcc53a09 Merge branch '2.6.x' into 2.7.x
Closes gh-31395
2022-06-15 10:51:40 -07:00
Phillip Webb b42f056ddb Don't close jar files early
Update `JarFile` and related classes so that `close()` is not longer
called early.

Prior to this commit, we would always immediately close the underlying
jar file to prevent file locking issues with our build. This causes
issues on certain JVMs when they attempt to verify a signed jar.

The file lock issues have now been solved by returning a custom input
stream from `JarUrlConnection` which captures and delegates the close
method.

Fixes gh-29356
2022-06-15 10:51:01 -07:00
Andy Wilkinson 26b89bfc80 Remove redundant throws declarations from public APIs
Closes gh-31179
2022-05-26 16:00:47 +01:00
Andy Wilkinson 5dfa5adb75 Merge branch '2.7.x'
Closes gh-31178
2022-05-26 15:54:58 +01:00
Andy Wilkinson 455ee0ce22 Merge branch '2.6.x' into 2.7.x
Closes gh-31177
2022-05-26 15:53:38 +01:00
Andy Wilkinson ee45fd2fc8 Remove redundant throws declarations from internal APIs
Closes gh-31176
2022-05-26 15:47:35 +01:00
Andy Wilkinson 541ab69aff Merge branch '2.7.x' 2022-05-03 15:18:20 +01:00
Andy Wilkinson 4cd850cfc0 Merge branch '2.6.x' into 2.7.x
Closes gh-30851
2022-05-03 15:17:13 +01:00
Andy Wilkinson fa327a783d Merge branch '2.5.x' into 2.6.x
Closes gh-30850
2022-05-03 15:14:00 +01:00
Andy Wilkinson 4fd2e0c916 Polish "Fix typos"
See gh-30773
2022-05-03 14:09:53 +01:00
Andy Wilkinson f6d24dc1a8 Fix typos
See gh-30773
2022-05-03 14:09:37 +01:00
Andy Wilkinson 52ed7f74a0 Merge branch '2.7.x' 2022-02-10 16:01:18 +00:00
Andy Wilkinson 4f724f14d3 Polish "Override available() in RandomAccessDataFile's InputStream"
See gh-29295
2022-02-10 15:25:01 +00:00
Gnaily 49bf620f4b Override available() in RandomAccessDataFile's InputStream
See gh-29295
2022-02-10 15:23:19 +00:00
Stephane Nicoll 41fb9cf562 Merge branch '2.7.x' 2022-02-01 11:15:49 +01:00
Stephane Nicoll f812b33cbd Merge branch '2.6.x' into 2.7.x
Closes gh-29613
2022-02-01 11:07:31 +01:00
Stephane Nicoll 136b5959c3 Merge branch '2.5.x' into 2.6.x
Closes gh-29612
2022-02-01 10:59:08 +01:00
Stephane Nicoll 7f17f819a6 Polish "Enforce use of BDDMockito"
See gh-29178
2022-02-01 10:03:18 +01:00
Yanming Zhou b49418aaaf Enforce use of BDDMockito
1. Replace Mockito.verify*() with BDDMockito.then()
2. Replace Mockito.doReturn() with BDDMockito.willReturn()
3. Adjust checkstyle rule

See gh-29178
2022-02-01 09:37:15 +01:00
Andy Wilkinson de3b9a4910 Remove code deprecated for removal in 2.x
Closes gh-29482
2022-01-19 17:25:14 +00:00
Scott Frederick c78b157e95 Merge branch '2.7.x' 2021-12-09 16:42:33 -06:00
Scott Frederick 8f57f0babb Add classpath index support for exploded war archives
Update the Maven and Gradle packaging for war files so that a
`classpath.idx` file is written into the archive that provides the
original order of the classpath, as was previously done for jar files.
The `WarLauncher` class will use this file when running as an exploded
archive to ensure that the classpath order is the same as when running
from the far war.

Fixes gh-19875
2021-12-09 16:41:49 -06:00
Andy Wilkinson 900085628a Raise the minimum supported version of Java to 17
Closes gh-28101
2021-11-30 15:37:40 +00:00
Andy Wilkinson 99f33ede14 Remove SecurityManager support
Closes gh-28213
2021-11-30 15:37:15 +00:00
Andy Wilkinson b1ff60c728 Merge branch '2.5.x'
Closes gh-28681
2021-11-15 12:09:06 +00:00
Andy Wilkinson 4cfbc0db36 Merge branch '2.4.x' into 2.5.x
Closes gh-28680
2021-11-15 12:08:49 +00:00
Leo Li 9de9983e25 Fix @deprecated and @see in Archive's javadoc
See gh-28677
2021-11-15 12:07:22 +00:00
Andy Wilkinson 2a342ef416 Merge branch '2.5.x'
Closes gh-28662
2021-11-12 23:40:35 +00:00
Andy Wilkinson 5e4a502b2d Merge branch '2.4.x' into 2.5.x
Closes gh-28661
2021-11-12 20:31:25 +00:00
Andy Wilkinson 2cec3971d7 Prohibit unwanted dependencies in all modules not just starters
Closes gh-28658
2021-11-12 20:04:35 +00:00
Phillip Webb bcef8ee4c9 Merge branch '2.5.x'
Closes gh-28357
2021-10-14 21:49:06 -07:00
Phillip Webb a93304c973 Merge branch '2.4.x' into 2.5.x
Closes gh-28356
2021-10-14 21:48:53 -07:00
Phillip Webb 7388f2b60b Attempt to reduce JarFileWrapper heap consumption
Update `JarURLConnection` to use a single shared wrapper per
jar file rather than creating a new one each time. This update
should help to reduce GC pressure.

Fixes gh-28042
2021-10-14 21:48:01 -07:00
Leo Li 1770f065a5 Polish
See gh-28239
2021-10-13 09:07:33 +02:00
Andy Wilkinson 1931104d13 Merge branch '2.4.x' into 2.5.x
Closes gh-28206
2021-10-06 09:57:19 +01:00
Andy Wilkinson 9c9fbf400e Upgrade to Spring Java Format 0.0.29
Closes gh-28205
2021-10-06 09:52:45 +01:00
Phillip Webb 40d65a74dc Merge branch '2.4.x' into 2.5.x 2021-09-21 14:43:38 -07:00
Phillip Webb ec12d51f30 Polish 2021-09-21 14:00:28 -07:00
Phillip Webb 5ba69634c9 Merge branch '2.4.x' into 2.5.x 2021-09-21 11:17:55 -07:00
Phillip Webb cfeafee826 Polish 2021-09-21 11:16:46 -07:00
Andy Wilkinson 37240bda3f Merge branch '2.4.x' into 2.5.x
Closes gh-27900
2021-09-09 10:13:40 +01:00
Andy Wilkinson 47163af9b6 Fix handling of Zip64 jar files larger than 4,294,967,295 bytes
Previously, a Zip64 jar file was identified by the number of entries
in the central directory being 0xFFFF. This value indicates that
there the number of entries is too big for the 2-byte field. However,
a jar may be in Zip64 format due to it exceeding the Zip format's
maximum size rather than its maximum number of entries so this field
cannot be used as a reliable indicator. The Zip specification doesn't
require any of the fields of the end of central directory record to
have a value of 0xFFFF (2-byte fields) or 0xFFFFFFFF (4-byte fields)
when using Zip64 format so we need to take a different approach.

Additionally, a number of places in the code assumed that an entry's
offset would always be available from the central directory file
header directly. This assumption did not hold true when the jar was
a Zip64 archive due to its size as the offset's value would be
0xFFFFFFF indicating that it should be read from the Zip64 extended
information field within the header's extra field instead.

This commit updates the Zip64 detection to look for the Zip64 end of
central directory locator instead. If present, it begins 20 bytes
before the beginning of the end of central directory record. Its
first four bytes are always 0x07064b50. The code that reads the
local header offset has also been updated to refer to the Zip64
extended information field when the offset is too large to fit in
the 4-byte field in the central directory file header. To allow
greater-than-4-byte offsets to be handled, a number of fields,
method parameters, and local variables have had their type changed
from an int to a long.

Fixes gh-27822
2021-09-09 09:17:48 +01:00
dreis2211 dacfe27350 Fix tests for multi-release JARs on JDK 17
See gh-27229
2021-07-10 17:38:16 +02:00
dreis2211 00d3330c9a Avoid illegal reflective access on ZipEntry.xdostime
See gh-27100
2021-07-08 18:05:16 +01:00
Phillip Webb 02494d63d2 Merge branch '2.4.x'
Closes gh-26744
2021-06-02 17:26:05 -07:00
Phillip Webb 1cda557d03 Merge branch '2.3.x' into 2.4.x
Closes gh-26743
2021-06-02 17:25:51 -07:00
Phillip Webb 1beee5700c Don't close early when SecurityManager present
Update `JarFile` and `JarFileWrapper` classes so that they no longer
close the `JarFile` early if a `SecurityManager` is in use.

Prior to this commit, the closed `JarFile` would cause (an ultimately
swallowed) NPE in `ZipFile` which manifested itself as a
`ClassNotFoundException` when starting the app.

Closes gh-25538
2021-06-02 17:24:05 -07:00
weixsun 8a2be288a3 Remove unnecessary throws declaration in tests
See gh-26441
2021-05-17 09:31:51 +02:00
Andy Wilkinson f92510e39d Merge branch '2.4.x'
Closes gh-26451
2021-05-13 11:44:27 +01:00
Andy Wilkinson 970f933806 Merge branch '2.3.x' into 2.4.x
Closes gh-26450
2021-05-13 11:44:01 +01:00
Andy Wilkinson 2dd94b5554 Polish "Use try-with-resources statement"
See gh-26449
2021-05-13 11:37:10 +01:00
weixsun 5ba9db391f Use try-with-resources statements
See gh-26449
2021-05-13 11:36:14 +01:00
Phillip Webb 8c31d29acf Merge branch '2.4.x' 2021-03-30 09:29:59 -07:00
Phillip Webb a28a3ae090 Merge branch '2.3.x' into 2.4.x 2021-03-30 09:25:46 -07:00
Phillip Webb 9c8a97809d Consistent use of @deprecated since
Restore the patch version number for consistency with `@since`
tags.

See gh-25808
2021-03-30 09:20:30 -07:00
Phillip Webb 44b1751bb4 Merge branch '2.4.x'
Closes gh-25826
2021-03-29 15:48:20 -07:00
Phillip Webb 363f5829d1 Merge branch '2.3.x' into 2.4.x
Closes gh-25825
2021-03-29 15:46:50 -07:00
Phillip Webb 26dd1b9a26 Update deprecations with for removal targets
Update all deprecation tags to include a removal target.

Closes gh-25808
2021-03-29 15:44:58 -07:00
Phillip Webb deaff1a522 Merge branch '2.4.x'
Closes gh-25775
2021-03-23 17:08:18 -07:00
Phillip Webb ca9fae6b47 Merge branch '2.3.x' into 2.4.x
Closes gh-25774
2021-03-23 17:07:44 -07:00
Phillip Webb ec21202d54 Delete unpacked jars when the JVM exits
Update `JarFileArchive` so that any unpacked files are now deleted when
the JVM exits.

Closes gh-25773
2021-03-23 17:06:56 -07:00
Phillip Webb 05f61bccea Align unpack logic with Files.createTempDirectory
Update `JarFileArchive` to align the way that it creates temp files and
folders with the way that `Files.createTempDirectory` works.

Closes gh-25772
2021-03-23 17:06:56 -07:00
Phillip Webb b8873578ca Add missing @Deprecated annotations 2021-03-23 17:06:53 -07:00
Andy Wilkinson db781a0d84 Merge branch '2.4.x'
See gh-25077
2021-02-02 15:14:18 +00:00
Andy Wilkinson 788a42d694 Merge branch '2.3.x' into 2.4.x
See gh-25076
2021-02-02 15:12:27 +00:00
Andy Wilkinson 67479b6380 Add junit-platform-launcher dependency by convention
Closes gh-25074
2021-02-02 13:03:21 +00:00
Phillip Webb d8b6960997 Merge branch '2.4.x'
Closes gh-25077
2021-02-01 16:08:57 -08:00
Phillip Webb 257608a3a3 Merge branch '2.3.x' into 2.4.x
Closes gh-25076
2021-02-01 16:03:43 -08:00
Phillip Webb 939b5dfc26 Add junit-platform-launcher dependency
Update `build.gradle` files to ensure that `junit-platform-launcher` is
a `testRuntimeOnly` dependency. This ensures that tests can be run from
Eclipse.

Closes gh-25074
2021-02-01 15:31:28 -08:00
Andy Wilkinson 45f298bc7a Merge branch '2.4.x'
Closes gh-24711
2021-01-08 17:08:52 +00:00
Andy Wilkinson 9e389c8376 Merge branch '2.3.x' into 2.4.x
Closes gh-24710
2021-01-08 17:07:45 +00:00
Andy Wilkinson 5ad4d627fd Fix classpath index so entries match those expected by the launcher
This reverts commit ad164269e9 and adds
some additional tests.

Fixes gh-24192
2021-01-08 15:32:19 +00:00
Stephane Nicoll c063c3434d Merge branch '2.4.x'
Closes gh-24581
2020-12-21 10:03:31 +01:00
Stephane Nicoll 09fa16c58c Merge branch '2.3.x' into 2.4.x 2020-12-21 09:59:33 +01:00
Stephane Nicoll 306b964ce3 Fix multi-release JAR test on JDK 16
See gh-24453
2020-12-21 09:59:01 +01:00
Phillip Webb 82791b4eda Improve performance of Tomcat 'jar:war:file' URLs
Update jar `Handler` fallback logic to directly support Tomcat
'jar:war:file' URLs. This commit allows contents to be accessed without
the JDK needing to extracted the nested jar to the temporary folder.

Closes gh-24553
2020-12-17 22:51:19 -08:00
Phillip Webb 0730949325 Merge branch '2.3.x' into 2.4.x
Closes gh-24554
2020-12-17 20:47:13 -08:00
Phillip Webb c4e41305d5 Prevent Tomcat URL "reflective access" warnings
Update the jar `Handler` class to support a non-reflective fallback
mechanism when possible. The updated code attempts to capture a regular
jar URL before our handler is installed. It can then use that URL as
context when creating the a fallback URL. The JDK jar `Handler` will
be copied from the context URL to the fallback URL.

Without this commit, resolving new Tomcat URLs of the form
`jar:war:file:...` would result in an ugly "Illegal reflective access"
warning.

Fixes gh-18631
2020-12-17 20:43:41 -08:00
Phillip Webb 4fba7d0c60 Merge branch '2.3.x' into 2.4.x 2020-12-15 19:48:52 -08:00
Phillip Webb 29300530c6 Polish 2020-12-15 19:44:40 -08:00
Phillip Webb cd5ff6e4af Merge branch '2.3.x'
Closes gh-24404
2020-12-08 12:13:02 -08:00
Phillip Webb 11f285bde5 Merge branch '2.2.x' into 2.3.x
Closes gh-24403
2020-12-08 12:12:51 -08:00
Andy Wilkinson bbad377ecc Merge branch '2.3.x'
Closes gh-24017
2020-11-03 18:00:22 +00:00
Andy Wilkinson f3d4b3e5ac Allow entries to be streamed from JarURLConnections' jar file
Fixes gh-23821
2020-11-03 17:59:38 +00:00
Santhoshkumar. P 5cb07e292d Polish empty string checks
See gh-23550
2020-10-05 10:38:47 +02:00
Andy Wilkinson 558c2b4591 Merge branch '2.3.x'
Closes gh-23501
2020-09-26 09:17:08 +01:00
Andy Wilkinson 9bd040cb0f Merge branch '2.2.x' into 2.3.x
Closes gh-23500
2020-09-26 09:16:46 +01:00
Andy Wilkinson e74f777971 Remove use of spring-core's Assert from PropertiesLauncher
Fixes gh-23474
2020-09-26 09:11:05 +01:00
Stephane Nicoll 37ded9f6d3 Merge branch '2.2.x' into 2.3.x
Closes gh-23446
2020-09-22 10:10:24 +02:00
dreis2211 fba1fb23e4 Fix multi-release JAR test on JDK 15
Backport of 54f93e9

See gh-23445
2020-09-22 10:09:18 +02:00
Phillip Webb 3fca8c6b4e Merge branch '2.2.x' into 2.3.x
Closes gh-23441
2020-09-21 22:27:45 -07:00
Phillip Webb 4945806d84 Make `StringSequence.isEmpty()` public
Make `StringSequence.isEmpty()` public for compatibility with JDK 15.

Closes gh-23440
2020-09-21 22:26:20 -07:00
Phillip Webb 5b74d464a6 Merge branch '2.3.x' 2020-09-15 08:48:51 -07:00
Phillip Webb 5c1055dc22 Merge branch '2.2.x' into 2.3.x 2020-09-15 08:48:25 -07:00
Phillip Webb 195def0ec3 Merge branch '2.1.x' into 2.2.x 2020-09-15 08:48:00 -07:00
Phillip Webb e0030094e2 Fix missing jar entry certificates
Ensure that the source jar entry is closed before reading
certificates and code signers from the entry.

gh-19041
2020-09-15 08:42:58 -07:00
Phillip Webb 433b357423 Merge branch '2.3.x' 2020-09-14 13:53:00 -07:00
Phillip Webb a249a1a3d1 Merge branch '2.2.x' into 2.3.x 2020-09-14 13:52:22 -07:00
Phillip Webb b8e6b2ef94 Merge branch '2.1.x' into 2.2.x 2020-09-14 13:51:24 -07:00
Phillip Webb 4138e59c33 Fix potential JarFileEntries ClassCastException
Update `JarFileEntries` so that the interface is obtained rather than
the concrete implementation. This allows `JarEntry` values to be used
without causing a ClassCastException.

Closes gh-19041
2020-09-14 13:48:59 -07:00
Phillip Webb 3a8c15af0d Merge branch '2.3.x'
Closes gh-23265
2020-09-13 22:50:28 -07:00
Phillip Webb 45275e6586 Merge branch '2.2.x' into 2.3.x
Closes gh-23264
2020-09-13 22:49:21 -07:00
Phillip Webb a20fdf8e6a Merge branch '2.1.x' into 2.2.x
Closes gh-23263
2020-09-13 22:45:39 -07:00
Phillip Webb 895ff9c72d Merge pull request #19041 from mathieufortin01
* pr/19041:
  Polish 'Fix signed jar performance issues'
  Fix signed jar performance issues
  Ignore Visual Studio Code Files

Closes gh-19041
2020-09-13 22:40:05 -07:00
Phillip Webb c6a9696dd1 Polish 'Fix signed jar performance issues'
Update the performance improvements to push certificate loading
and storage into the `JarFileEntries` class. This allows us to
keep certificates without needing to cache all entry data. We
now also keep certificates and code signers in a dedicated class
which is set whenever the full jar stream as been read, even if
the contained values are `null`. The logic that assumes META-INF
entries are not signed has been removed in favor of delegating to
the streamed entry results.

See gh-19041
2020-09-13 22:28:45 -07:00
mathieufortin01 4d053e15d8 Fix signed jar performance issues
Update Spring Boot nested JarFile support to improve the performance of
signed jars. Prior to this commit, `certificates` and `codeSigners`
were read by streaming the entire jar whenever the existing values
were `null`. Unfortunately, the contract for `getCertificates` and
get `getCodeSigners` states that `null` is a valid return value. This
meant that full jar streaming would occur whenever either method was
called on an entry that had no result. The problem was further
exacerbated by the fact that entries might not be cached.

See gh-19041
2020-09-13 22:14:03 -07:00
Andy Wilkinson 6619dfacf3 Merge branch '2.3.x'
Closes gh-23241
2020-09-10 10:03:09 +01:00
Andy Wilkinson e7e77a917f Align PropertiesLauncher's close behavior with JarLauncher
Previously, PropertiesLauncher would close each archive that it
iterated over when creating its ClassLoader. This was not aligned
with JarLauncher's behaviour and left the ClassLoader with closed
archives. The close was introduced in [1] and became more apparent
following the change to fail operations on closed archives [2].

This commit updates Launcher to remove the close() that was added in
[1]. This aligns the behavior of PropertiesLauncher with JarLauncher
and ensures that the ClassLoader does not have entries backed by
closed archives on its classpath.

Fixes gh-23165

[1] ad72f86bdb
[2] ed7a5db174
2020-09-10 09:40:44 +01:00
dreis2211 33cd875cb8 Simplify InputStream assertions
See gh-23052
2020-08-24 11:35:17 +02:00
Phillip Webb ea8bd75ba1 Merge branch '2.3.x' 2020-08-19 10:34:17 -07:00
Phillip Webb 73038267a0 Merge branch '2.2.x' into 2.3.x 2020-08-19 10:34:06 -07:00
Phillip Webb 17e2d72bcb Fix Windows path issue in JarFileWrapperTests
See gh-22991
2020-08-19 10:33:23 -07:00
Phillip Webb bd5266b9b1 Merge branch '2.3.x' 2020-08-19 10:22:55 -07:00