215 Commits

Author SHA1 Message Date
Dave Syer
a70d293c87 Re-organize the Launcher code a bit 2013-09-24 08:52:04 +01:00
Phillip Webb
e9fd7c96b8 Loader changes 2013-09-24 08:52:04 +01:00
Dave Syer
053c072155 Add some tests for PropertiesLauncher 2013-09-24 08:52:04 +01:00
Dave Syer
f83fd47184 Add PropertiesLauncher 2013-09-24 08:52:03 +01:00
Dave Syer
8a1e39c4dc Remove unused annotation 2013-09-05 17:15:16 -07:00
Phillip Webb
e2b3c03fc4 Refine LaunchedURLClassLoader load order
Refine the loading order of LaunchedURLClassLoader to consider the
root loader before locally bundled classes.

The prevents classes from locally bundled JARs from replacing system
classes.

Issue: #56232870
2013-09-05 17:15:15 -07:00
Phillip Webb
680741fdc8 Fix LaunchedURLClassLoader Java 1.6 compatibility 2013-09-05 17:15:15 -07:00
Phillip Webb
cd2c18965e Support javaagent instrumentation with loader
Update spring-boot-loader to allow `-javaagent` instrumentation when
running from executable jars.

Prior to this commit the `Launcher` skipped the application classloader
and instead used the system classloader as a parent. This was to ensure
that locally packaged classes were always loaded by the classloader
that had access to nested jars.  Unfortunately when using the
`-javaagent` option, it is the application classloader that is modified.

The `Launcher` class now uses the application classloader as parent
and `LaunchedURLClassLoader` has been updated to always search local
URLs before delegating to the parent. This is very similar to the way
that most application servers handle the loading of war files.

Issue: #56232870
2013-09-05 17:15:15 -07:00
Phillip Webb
5b7d56895b Provide accurate InputStream.available() results
Provide accurate InputStream.available() results by using the size
attribute of the ZipEntry. This helps improve performance with
CGLib and also fixes issues where libraries expect that a non-zero
result from available() indicates that read() will not return -1.
2013-09-05 17:14:16 -07:00
Phillip Webb
c999541fd3 Set source/target version to 1.6 for int. tests 2013-09-05 17:14:14 -07:00
Daniel L. Buchko
7ecb99757b Prevent test failures under Windows
Cleaned up file separators to prevent tests failing on Windows.
2013-09-05 17:14:14 -07:00
Daniel L. Buchko
3c5fa0daa0 Fixed handling of spaces in file paths
Update Launcher to correctly handle spaced in file paths.
2013-09-05 17:14:14 -07:00
Phillip Webb
0b7256e7f9 Fix compile failure on JDK 6 2013-08-09 13:01:39 -07:00
Phillip Webb
cf655945aa Polish 2013-08-09 12:28:54 -07:00
Dave Syer
19a880dff6 Move tools modules under spring-boot-tools 2013-08-02 12:00:14 +01:00