215 Commits

Author SHA1 Message Date
Phillip Webb
269815dbcf Make LaunchedURLClassLoader constructor public
Restore the public constructor in LaunchedURLClassLoader which was
accidentally removed in commit e07df7e4c6d69b5be6c56e76b854e1a3c7436e89.
2015-09-09 09:20:34 -07:00
Phillip Webb
e674d751de Polish Javadoc 2015-09-08 17:01:36 -07:00
Phillip Webb
e07df7e4c6 Remove redundant modifiers 2015-09-08 17:01:30 -07:00
Phillip Webb
460ca75fce Polish newline at end of file 2015-09-08 16:05:22 -07:00
Phillip Webb
6e29ee4557 Polish 2015-09-08 16:04:30 -07:00
Phillip Webb
67402405db Reformat code 2015-09-08 14:56:40 -07:00
Phillip Webb
0335053139 Merge branch '1.2.x' 2015-09-08 14:37:16 -07:00
Phillip Webb
15686ed4fd Reformat code 2015-09-08 14:07:06 -07:00
Phillip Webb
690da89c82 Fix warnings 2015-09-05 00:21:09 -07:00
Ilayaperumal Gopinathan
61ac04aa4c Make it easier to subclass Launchers
Change constructors from `package private` to `protected` for subclasses
to use.

Closes gh-3741
2015-09-03 14:40:23 -07:00
Phillip Webb
891dd5a0f6 Polish 2015-08-03 11:03:48 -07:00
Andy Wilkinson
4660a3ed4d Merge branch '1.2.x' 2015-08-03 15:50:26 +01:00
Andy Wilkinson
d241171fff Use fast exceptions in hasMoreElements in LaunchedURLClassLoader
When nested jars are being used, hasMoreElements requires opening a
connection for an entry in every nested jar. If that entry doesn't
exist, a FileNotFoundException is thrown to indicate that a particular
jar doesn't contain the requested entry. This exception is used to
indicate the lack of an entry and is then swallowed, i.e. its stack
trace is of no importance. This means that the performance of
hasMoreElements can be improved by switching on fast exceptions while
it's being called. When fast exceptions are switched on a general
purpose pre-initialized FileNotFoundException is thrown rather than
creating a new FileNotFoundException instance each time.

In certain situations, the use of fast exceptions as described above
can improve performance fairly significantly. The JRE's default SAAJ
implementation uses META-INF/services-based discovery for _every_
request that's handled by Spring Web Services. Each discovery attempt
results in hasMoreElements being called making its performance
critical to throughput.

See gh-3640
2015-08-03 15:39:56 +01:00
Stephane Nicoll
42e230192f Polish 2015-07-24 07:19:53 +02:00
Dave Syer
de02eaa26b Add missing jar (.gitignored) 2015-07-14 12:44:23 +01:00
Dave Syer
bfa816f2a3 Maintain classpath order in PropertiesLauncher
I think this is safe, judging by the integration tests, but I'm not
putting it in 1.2.x until we've had some feedback on it. The
integration tests actually had a bug that was masking this problem
because they were merging Properties from the whole classpath instead
of picking the first available resource (which is generally what
we do in Spring Boot applications for application.properties for
instance).

Fixes gh-3048
2015-07-14 10:22:36 +01:00
Stephane Nicoll
97634e85ac Remove unnecessary keyword 2015-07-09 14:33:01 +02:00
Phillip Webb
b1f8a692a8 Merge branch '1.2.x' 2015-07-01 19:30:12 -07:00
Phillip Webb
a1b87766a7 Fix PropertiesLauncher javadoc
See gh-3392
2015-07-01 18:09:56 -07:00
Phillip Webb
61fc4f3f12 Polish copyright headers 2015-06-23 10:22:14 -07:00
Phillip Webb
f65dfe4bcb Fix javadoc errors and warnings 2015-06-19 14:04:55 -07:00
Phillip Webb
7609c43685 Switch Javadoc <code>...</code> to {@code ...}
Update Javadoc to use the {@code ...} syntax when possible.
2015-06-05 10:10:34 -07:00
Eddú Meléndez
baca62a6c0 Fix typos 2015-06-05 16:59:51 +02:00
Phillip Webb
49c4710f63 Merge branch '1.2.x' 2015-06-02 12:32:46 -07:00
Phillip Webb
968b68c322 Polish 2015-06-02 11:17:16 -07:00
Andy Wilkinson
02859cc2d4 Merge branch '1.2.x' 2015-04-15 17:04:05 +01:00
Andy Wilkinson
ebb8d0c55f Read the time of a JarEntryData using MSDOS Date Time format
The format is rather unusual.

The time is 16 bits: 5 bits for the hour, 6 bits for the minutes, and 5
bits for the seconds. 5 bits only allows 32 values (0-31) so the number
must be doubled, meaning that the time is only accurate to the nearest
two seconds. Also, the JDK rounds this down by subtracting one. The
doubling and rounding is performed by shifting one place to the left
and masking off the right-most bit respectively.

The date is 16 bits: 7 bits for the year, 4 bits for the month, and 5
bits for the day. The year is from 1980, i.e. the earliest date that
can be represented is 1980-01-01.

See http://mindprod.com/jgloss/zip.html for more details of the format.

Fixes gh-2826
2015-04-15 17:03:06 +01:00
Phillip Webb
8143d1f36d Apply animal sniffer to entire build
Move animal sniffer configuration out of spring-boot-dependencies to
spring-boot-parent and apply it to all projects.

See gh-716
2015-04-06 19:47:22 -07:00
Andy Wilkinson
3649a89a03 Use maven-dependency-plugin 2.10 in Loader's integration test projects
Closes gh-2430
2015-03-05 14:07:40 +00:00
Phillip Webb
8e398dc6a7 Polish Javadoc
Update Javadoc to add missing @return and @param elements.
2015-02-03 11:35:06 -08:00
Phillip Webb
0696695e16 Add package javadoc 2015-02-02 17:05:38 -08:00
Phillip Webb
3328c1369f Merge branch '1.1.x'
Conflicts:
	spring-boot/src/main/java/org/springframework/boot/logging/LoggingApplicationListener.java
2015-02-01 20:28:11 -08:00
Phillip Webb
555827cad7 Polish 2015-02-01 20:00:11 -08:00
Dave Syer
1be12ee945 Merge branch '1.1.x' 2015-01-20 17:38:31 +00:00
Dave Syer
4e907f19ce Carefully add nested archives from JAR in PropertiesLauncher
If user runs an executable archive then it and its lib directory will be
on the classpath. Entries from loader.path take precedence in a way that
should make sense to users (earlier wins like in CLASSPATH env var).

Also added new integration tests to verify the behaviour (big improvement
on the old ones, which probably aought to be beefed up to the same
standard).

Fixes gh-2314
2015-01-20 17:37:49 +00:00
Phillip Webb
1f775793ee Use Collections.addAll(...) instead of for loops
Replace various for loops which add items to collections with calls
to Collections.addAll(...).

Fixes gh-2277
2015-01-04 11:49:06 -08:00
Phillip Webb
b947d6001d Polish 2014-11-11 09:47:54 -08:00
Andy Wilkinson
ade22c87ec Update WarLauncher to remove the root of the war from the classpath
Previously, WarLauncher included its root on the classpath. It also used
a filtered version of its root archive to hide both the WEB-INF and
META-INF directories. This meant that files in WEB-INF and META-INF
could be found by the classloader (as they were on the classpath) but
could not be read as the filtered archive was hiding them.

This commit updates WarLauncher to remove the root of the war file from
the classpath. It also removes the filtering of the archive, thereby
allowing files in META-INF and WEB-INF to be accessed via the
ServletContext.

Closes gh-1792
2014-11-11 14:42:19 +00:00
Andy Wilkinson
b99ffcc170 Merge branch '1.1.x' 2014-11-10 15:43:07 +00:00
Michael Cramer
f62664534d Update maven-dependency-plugin to version 2.9
Closes gh-1862
2014-11-10 15:40:42 +00:00
Phillip Webb
2e7aa4685b Polish 2014-10-21 20:34:00 -07:00
Andy Wilkinson
886bbc3b41 Merge branch '1.1.x' 2014-10-15 16:36:11 +01:00
Andy Wilkinson
9a2d654eba Rename test classes so that their tests are run by Maven 2014-10-15 16:35:48 +01:00
Andy Wilkinson
7211571969 Fix some grammar issues in docs
Closes gh-1695
2014-10-13 13:18:24 +01:00
Eric Dahl
16937746a0 Fix some grammar issues in docs 2014-10-13 12:22:14 +01:00
Phillip Webb
509c3aef4e Merge branch '1.1.x' 2014-10-09 19:23:57 -07:00
Phillip Webb
6028d92a4e Support Windows UNC paths with fat jars
Update `Launcher` and `JarFile` to correctly deal with Windows UNC
paths.

Fixes gh-1641
2014-10-09 19:06:28 -07:00
Andy Wilkinson
316e5f78f9 Merge branch '1.1.x' 2014-10-01 10:12:19 +01:00
Andy Wilkinson
f7d1f968b9 Improve error message when JarFile encounters a compressed nested jar
Closes gh-1643
2014-10-01 10:09:30 +01:00
Dave Syer
399238384f Merge branch '1.1.x' 2014-08-19 14:16:44 +01:00