Commit Graph

409 Commits

Author SHA1 Message Date
Phillip Webb 81fef71fcb Merge branch '1.5.x' 2017-04-19 22:48:46 -07:00
Dave Syer 14638e67bc Extended PropertiesLauncher class location logic
Update `PropertiesLauncher` so that classes can be loaded outside of
`BOOT-INF/classes`. You can use a subdirectory, or the root directory
of an external jar (but not the parent archive to avoid issues
with agents and awkward delegation models).

Fixes gh-8480
Closes gh-8486
2017-04-19 22:18:12 -07:00
Phillip Webb ad38776de3 Polish 2017-04-04 09:48:10 -07:00
Andy Wilkinson 3ec5041826 Merge branch '1.5.x' 2017-04-04 11:31:43 +01:00
Andy Wilkinson c55bfb00b1 Merge branch '1.4.x' into 1.5.x 2017-04-04 11:31:34 +01:00
Andy Wilkinson 456327260b Fail fast when a Zip64 jar is encountered
Previously, jars (either top-level or nested) in Zip64 format were
treated as normal jar files. This would lead to a failure later on
when an attempt was made to read an entry from the file.

This commit updates the loader to fail fast when it encounters a
Zip64 jar file. Such files are identified by the number of entries
in the central directory end record being 0xFFFF.

Closes gh-8735
2017-04-04 11:31:18 +01:00
Stephane Nicoll ff50331168 Merge branch '1.5.x' 2017-03-28 10:27:31 +02:00
Stephane Nicoll d8e90af3bf Merge branch '1.4.x' into 1.5.x 2017-03-28 10:27:14 +02:00
dreis 1266642aba Fix test assertions
Closes gh-8660
2017-03-28 10:26:25 +02:00
Andy Wilkinson 83df8e47fe Merge branch '1.5.x' 2017-03-24 10:34:02 +00:00
Andy Wilkinson e6cfb4e5fb Improve diagnostics when reading a nested jar throws a runtime exception
Previously, only IOExceptions were caught and wrapped in a new
IOException that included the name of the nested entry that was
being read.

Following this commit, any Exception is caught and wrapped so that the
problematic entry can be identified in more failure scenarios.

Closes gh-8711
2017-03-24 10:32:16 +00:00
Phillip Webb d8f827d224 Cleanup and format code 2017-03-06 17:08:09 -08:00
Spring Buildmaster d23fa24340 Next Development Version 2017-03-03 16:18:26 +00:00
Spring Buildmaster 2a83e80a9b Next Development Version 2017-03-03 14:39:21 +00:00
Andy Wilkinson 9c88ba3b90 Merge branch '1.5.x' 2017-03-02 17:30:44 +00:00
Andy Wilkinson 6673d8eebc Polish "Allow loader.path to refer to nested jars"
Closes gh-8334
Closes gh-8465
2017-03-02 17:29:45 +00:00
Dave Syer 3701cce88f Allow loader.path to refer to nested jars
Previously, each entry in loader.path could only refer to a standard
jar file. Refering to such a jar would add all of the classes in
the root of the jar to the class path.

This commit adds support for referencing a directory within a jar file
that contains one or more nested jars. For example:

$ java -jar -Dloader.path='jar:file:./lib.jar/!BOOT-INF/lib' my.jar

This will add all of the classes in all of that jars in the
BOOT-INF/lib directory of lib.jar to the class path.

See gh-8334
2017-03-02 16:49:24 +00:00
Andy Wilkinson b6e8a280fd Merge branch '1.5.x' 2017-03-02 11:22:17 +00:00
Andy Wilkinson b36c8a7c24 Polish "Tighten up PropertiesLauncher's contract"
See gh-8346
Closes gh-7221
2017-03-02 11:19:48 +00:00
Dave Syer e4c807b884 Tighten up PropertiesLauncher's contract
The main changes are:

- Switch to `loader.properties` instead of `application.properties`
- Search for `loader.properties` in `loader.home` as well as in
  the classpath
- Placeholder replacements in MANIFEST.MF (using `loader.properties`
  or system/env vars)

See gh-7221
Closes gh-8346
2017-03-02 11:19:48 +00:00
Spring Buildmaster 5c12500366 Next Development Version 2017-01-30 20:10:13 +00:00
Spring Buildmaster a2696bf873 Next Development Version 2017-01-30 11:40:24 +00:00
Andy Wilkinson 31b0e81765 Add @FunctionalInterface to remaining public and protected interfaces
See gh-6857
2017-01-27 16:41:09 +00:00
Eddú Meléndez 3d52c86a21 Annotate interfaces with @FunctionaInterface
Closes gh-6857
2017-01-27 16:41:01 +00:00
Spring Buildmaster ed1ce140c0 Next Development Version 2017-01-26 14:20:39 +00:00
Stephane Nicoll 661fd848eb Merge branch '1.5.x' 2017-01-25 11:02:32 +01:00
Stephane Nicoll 505e7f75ea Polish contribution
Closes gh-8089
2017-01-25 11:01:53 +01:00
dreis d58f38f6f6 Use String.replace() with single char if possible
See gh-8089
2017-01-25 11:01:52 +01:00
Stephane Nicoll 551bfb2c60 Polish contribution
Closes gh-8103
2017-01-25 11:01:52 +01:00
Johnny Lim 32f9e90de5 Replace 'String.length() == 0' with 'String.isEmpty()'
See gh-8103
2017-01-25 11:01:52 +01:00
Andy Wilkinson 2b75570680 Fix dead code warning in CentralDirectoryParserTests 2017-01-24 11:07:43 +00:00
Phillip Webb f92f019418 Don't mock package private class
See gh-7770
2017-01-05 14:39:22 -08:00
Phillip Webb 77f9bb09ca Further Polish Mockito 2 support
See gh-7770
2017-01-05 14:29:29 -08:00
Phillip Webb f8c7890a45 Merge branch '1.5.x' 2017-01-03 15:36:47 -08:00
dreis cee576b8b2 Reduce memory footprint of AsciiBytes.hashCode
Update `AsciiBytes.hashCode(int hash, String string)` so that it no
longer copies the backing array of the string.

Closes gh-7851
2017-01-03 15:36:11 -08:00
Phillip Webb 53f1df86a2 Merge branch '1.5.x' 2016-12-30 12:17:28 -08:00
Phillip Webb aacf5d660f Update copyright year for changed files 2016-12-30 11:53:51 -08:00
Spring Buildmaster 9057f9ae1f Next development version 2016-12-23 00:15:23 +00:00
Phillip Webb 6e02fe59f7 Merge branch '1.5.x' 2016-12-21 22:32:43 -08:00
Johnny Lim e12b4a944f Polish 2016-12-21 20:18:04 -08:00
Phillip Webb 1f417997f3 Merge branch '1.5.x' 2016-12-19 13:21:18 -08:00
Phillip Webb 6121208cbb Polish formatting 2016-12-19 12:47:03 -08:00
Phillip Webb 4b9cba351b Merge branch '1.4.x' into 1.5.x 2016-12-19 12:36:57 -08:00
Phillip Webb bd74c3d327 Polish formatting 2016-12-19 12:25:09 -08:00
Andy Wilkinson 6eaa8d7c56 Merge branch '1.5.x' 2016-12-08 11:38:23 +00:00
Andy Wilkinson 53287eadf6 Merge branch '1.4.x' into 1.5.x 2016-12-08 11:38:13 +00:00
Andy Wilkinson 2d8344d46d Ensure that JarLauncher doesn't cause root jar to be on class path twice
Closes gh-7595
2016-12-08 11:34:22 +00:00
Stephane Nicoll bd2415463c Merge branch '1.5.x' 2016-12-01 12:13:02 +01:00
Oscar Utbult 3a7969b8bb Remove redundant StringBuilder
Closes gh-7538
2016-12-01 12:11:04 +01:00
Stephane Nicoll e7275b62dc Merge branch '1.5.x' 2016-11-30 08:27:30 +01:00