Commit Graph

326 Commits

Author SHA1 Message Date
Phillip Webb
4b9c3c137e Polish Collection.toArray
Consistently use `StringUtils.toStringArray`, `ClassUtils.toClassArray`
or zero length when converting collections to arrays.

Fixes gh-12160
2018-02-22 21:11:30 -08:00
Johnny Lim
88b184ca23 Polish 2018-02-19 20:00:20 -08:00
Andy Wilkinson
e1ab62668f Merge branch '1.5.x' 2018-02-13 15:05:28 +00:00
Andy Wilkinson
1d2b85b2b8 Ensure that TestJarFile uses insertion order for jar's entries
Previously, the order of the entries in a TestJarFile was determined
by the underlying file system rather than by the order in which
they were added. This could lead to unpredicatable ordering and
failures in tests that verify archive entry ordering.

This commit updates TestJarFile to add entries to the archive in
insertion order.

See gh-11695
See gh-11696
2018-02-01 13:07:50 +00:00
Andy Wilkinson
b2dad7f1c4 Rework entry ordering of repackaged archives
Previously, the Repackager would write entries in the following
order:

- Libraries that require unpacking
- Existing entries
    - Application classes
    - WEB-INF/lib jars in a war
- Libraries that do not require unpacking
- Loader classes

Libraries that require unpacking were written before existing entries
so that, when repackaging a war, an entry in WEB-INF/lib would not
get in first and prevent a library with same location from being
unpacked. However, this had the unwanted side-effect of changing
the classpath order when an entry requires unpacking.

This commit reworks the handling of existing entries and libraries
that require unpacking so that existing entries can be written first
while also marking any that match a library that requires unpacking
as requiring unpacking.

Additionally, loader classes are now written first. They are the
first classes in the jar that will be used so it seems to make sense
for them to appear first. This aligns Maven-based repackaging
with the Gradle plugin's behaviour and with the structure documented
in the reference documentation's "The Executable Jar Format" appendix.

The net result of the changes described above is that entries are
now written in the following order:

- Loader classes
- Existing entries
    - Application classes
    - WEB-INF/lib jars in a war marked for unpacking if needed
- Libraries

Closes gh-11695
Closes gh-11696
2018-02-01 11:38:33 +00:00
Phillip Webb
886b39293c Merge branch '1.5.x' 2018-01-30 12:51:45 -08:00
andrey.onufreyko
b19dcb13e2 Replace string arguments with char
Optimize method calls by replacing single character String arguments
with char.

Closes gh-11680
2018-01-22 16:35:06 -08:00
Andy Wilkinson
54c0cf513b Polish 2018-01-17 19:03:23 +00:00
Stephane Nicoll
d43346d6c2 Polish "Fix potential resource leaks"
Closes gh-11624
2018-01-17 13:56:53 +01:00
igor-suhorukov
5a4238acfc Fix potential resource leaks
See gh-11624
2018-01-17 13:54:50 +01:00
Madhura Bhave
8102dc78cb Remove redundant throws declarations 2017-12-29 12:10:13 -08:00
Johnny Lim
8f7ab95e0e Use BufferedReader.lines()
Closes gh-11436
2017-12-27 16:44:27 +01:00
Phillip Webb
5ca608330c Merge branch '1.5.x' 2017-12-13 13:07:18 -08:00
Stephane Nicoll
23218add90 Polish 2017-12-12 11:57:30 +01:00
Johnny Lim
6d54072e04 Remove "final" keywords
Closes gh-11294
2017-12-08 11:13:07 -08:00
Johnny Lim
44299bb980 Polish
Closes gh-11206
2017-11-29 09:37:36 -08:00
Johnny Lim
bd0dcfb172 Utilize StandardCharsets
Closes gh-10972
2017-11-10 09:49:13 +01:00
Johnny Lim
c05a299520 Polish
Closes gh-10921
2017-11-06 12:28:43 +01:00
Johnny Lim
84d137d41d Restore execution permission on launch.script
Restore the execute permission that was accidentally removed in
commit 5ee28a08e1.

Closes gh-10801
2017-11-02 23:22:17 -07:00
Stephane Nicoll
4dcc354f86 Merge branch '1.5.x' 2017-10-30 16:31:50 +01:00
Stephane Nicoll
a688613fb4 Merge branch '1.5.x' 2017-10-29 14:11:26 +01:00
Stephane Nicoll
dd90f071c6 Bump ASM version to be Java 8+ compatible
Closes gh-10647
2017-10-17 16:29:06 +02:00
dreis2211
3b71393e0a Use Assert.state() with Supplier where possible
See gh-10658
2017-10-17 15:35:59 +02:00
Phillip Webb
748e0779b6 Update copyright year for changed files 2017-10-10 11:56:13 -07:00
Phillip Webb
b87f9c11f1 Fix POMs for the updated build/release process
Fix POMs following project relocations and apply CI friendly Maven
conventions.

See gh-9316
2017-10-04 16:34:38 -07:00
Phillip Webb
0ba4830b4f Relocate projects to spring-boot-project
Move projects to better reflect the way that Spring Boot is released.

The following projects are under `spring-boot-project`:

  - `spring-boot`
  - `spring-boot-autoconfigure`
  - `spring-boot-tools`
  - `spring-boot-starters`
  - `spring-boot-actuator`
  - `spring-boot-actuator-autoconfigure`
  - `spring-boot-test`
  - `spring-boot-test-autoconfigure`
  - `spring-boot-devtools`
  - `spring-boot-cli`
  - `spring-boot-docs`

See gh-9316
2017-10-04 16:34:23 -07:00