Commit Graph

358 Commits

Author SHA1 Message Date
Andy Wilkinson
4e87f8163e Merge branch '1.5.x' 2017-10-02 20:07:38 +01:00
Andy Wilkinson
71c15cb65e Avoid possible livelock when stopping FileSystemWatcher in parallel
Previously, if the file watcher thread tried to stop the
FileSystemWatcher when another thread was already stopping it a
livelock could occur. The livelock occurred because the file watcher
thread would attempt to lock a monitor that was being held by a thread
that had joined the file watcher thread and was waiting for it to die.

This commit avoid the livelock by narrowing the synchronization that's
used when stopping the FileSystemWatcher. The monitor is used to
obtain a reference to the file watcher thread in a thread-safe manner,
but it is released prior to joining the file watcher thread and
waiting for it to die. This will allow a parallel attempt by the
file watcher thread to stop itself to succeed.

Closes gh-10496
2017-10-02 20:03:17 +01:00
Andy Wilkinson
205c25bf0f Polish 2017-10-02 15:56:52 +01:00
Andy Wilkinson
41424e4529 Merge branch '1.5.x'
Closes gh-10457
2017-10-02 15:24:12 +01:00
Johnny Lim
bfa291f671 Polish 2017-10-02 15:07:03 +01:00
Andy Wilkinson
9ba20cc380 Merge branch '1.5.x' 2017-10-02 12:56:14 +01:00
Andy Wilkinson
bcbf7b5511 Update ChangeableUrlsTests to cope with URL-like Windows file paths
Closes gh-10268
2017-10-02 12:53:25 +01:00
Andy Wilkinson
ce77f48c3f Fall back to JVM's class path when TCCL is not a URLClassLoader
Previously, DevTools assumed that the TCCL was a URLClassLoader
when trying to determine the URLs that it should examine to determine
the locations that should be watched for triggering a restart. This
fails on Java 9 as the TCCL is not a URLClassLoader.

This commit updates the logic that determines the changeable URLs to
fall back to examining the JVM's class path when the TCCL is not a
URLClassLoader, typically because the application is running on Java
9. This fall back isn't a direct equivalent of the behaviour on Java 8
as the class path of the TCCL and the class path with which the JVM
was launched may not be the same. However, I consider the fix to be
reasonable for two reasons:

1. In reality, the class path of the TCCL and the class path with
   which the JVM was launched are the same.
2. There appears to be now to get the URLs on the class path of the
   TCCL on Java 9. There is a URLClassPath field, however Java 9's
   access restrictions prevent us from using it even if we resort to
   reflection.

Closes gh-10454
2017-09-29 12:17:26 +01:00
Andy Wilkinson
f01bb8e175 Polish 2017-09-29 12:04:46 +01:00
Andy Wilkinson
b6a0d67332 Merge branch '1.5.x' 2017-09-29 11:50:28 +01:00
Andy Wilkinson
c27d678b81 Improve handling of absolute URLs in Class-Path manifest attribute
Closes gh-10268
2017-09-29 11:45:57 +01:00
Andy Wilkinson
0e2d34cdb4 Remove additional auto-configured security configurers
Closes gh-10435
2017-09-28 07:43:25 +01:00
Andy Wilkinson
7e2d7dcd1d Polish 2017-09-27 19:48:26 +01:00
Andy Wilkinson
b59bc20f58 Try to make HateoasObjenesisCacheDisablerTests more robust 2017-09-26 12:57:57 +01:00
dreis2211
f3472beed8 Remove redundant semicolons
Closes gh-10422
2017-09-26 08:38:43 +02:00
Andy Wilkinson
edc9a9b269 Merge branch '1.5.x' 2017-09-25 16:47:46 +01:00
Andy Wilkinson
7eb9193862 Tolerate absolute URLs in manifest's Class-Path attribute
Closes gh-10268
2017-09-25 16:47:27 +01:00
Andy Wilkinson
dd4dbce816 Fix generation of Javadoc on Java 9
This commit fixes Javadoc generation when building with Java 9. It
upgrades the Javadoc plugin to a version that is Java 9 compatible
(3.0.0-M1) and reworks DevTools to remove usage of @PostConstruct.
The latter change is necessary as @PostConstruct is not visible by
default when building with Java 9 and, therefore its usage causes
Javadoc generation to fail.

Closes gh-10029
2017-09-25 06:43:07 +01:00
Spring Buildmaster
30eb937a83 Next Development Version 2017-09-12 10:54:22 +00:00
Andy Wilkinson
fb79684ddd Merge branch '1.5.x' 2017-09-07 20:47:45 +01:00
Andy Wilkinson
8761ef547c Log single message per jar with faulty Class-Path manifest attribute
Previously, when DevTools encountered a jar with a Class-Path manifest
attribute that referenced non-existent files, it would log one
message per entry in the attribute that did not exist. While useful
information, this has proven to be too verbose.

This commit aims to strike a better balances by logging a single
message for an entire jar. The message is a single line that
includes the path to the jar with the faulty Class-Path manifest
attribute and the paths of all of the files that do not exist that are
referenced by the attribute.

Closes gh-10111
2017-09-07 20:43:09 +01:00
Stephane Nicoll
a076adbb51 Add deprecated metadata for remote debug support
See gh-10076
2017-08-25 16:31:14 +02:00
Phillip Webb
9127c48fb5 Fixup warnings 2017-07-27 16:39:49 -07:00
Spring Buildmaster
17a5bb0be4 Next development version 2017-07-27 08:00:21 +00:00
Andy Wilkinson
5616915621 Polishing 2017-07-26 17:40:29 +01:00
Spring Buildmaster
41c5c0e7c9 Next development version 2017-07-26 08:30:55 +00:00
Emanuel Campolo
2626a3a795 Use lambdas when possible
Replace anonymous inner classes with lambda declarations (when possible
using method references).

See gh-9781
2017-07-25 00:53:38 -07:00
Emanuel Campolo
d16af43664 Replace try with try-with-resources
Update existing try/finally/close blocks to use "try with resources"

See gh-9781
2017-07-25 00:53:38 -07:00
Emanuel Campolo
798fe5ed53 Collapse catch clauses
Use multi-catch for exceptions whenever possible.

See gh-9781
2017-07-25 00:53:37 -07:00
Emanuel Campolo
04fdec6f8b Replace explicit generics with diamond operator
Where possible, explicit generic declarations to use the Java 8 diamond
operator.

See gh-9781
2017-07-25 00:53:37 -07:00
Stephane Nicoll
8cae031441 Remove Devtools remote debugging support
Closes gh-9489
2017-07-22 15:23:52 +02:00
Andy Wilkinson
0b11fb7ce0 Merge branch '1.5.x' 2017-07-20 10:39:43 +01:00
Andy Wilkinson
f3b26525f7 Use System.out rather than err for ignored Class-Path entry message
Closes gh-9802
2017-07-20 10:37:49 +01:00
Phillip Webb
eb17aa06f9 Merge branch '1.5.x' 2017-07-06 18:38:52 -07:00
Phillip Webb
aa57ca7e18 Polish 2017-07-06 16:53:04 -07:00
Stephane Nicoll
1b62f664e4 Merge branch '1.5.x' 2017-06-26 08:49:32 +02:00
Misagh Moayyed
07d09f3f18 Add missing whitespace in log
Closes gh-9597
2017-06-26 08:48:37 +02:00
Andy Wilkinson
f26f8176b6 Start building against Spring Session 2.0 snapshots
See gh-9541
2017-06-23 10:00:05 +02:00
Andy Wilkinson
991314c63d Merge branch '1.5.x' 2017-06-16 09:13:42 +01:00
Andy Wilkinson
59122358d3 Clean up and format code 2017-06-16 08:58:14 +01:00
Andy Wilkinson
73b114860c Configure Derby to write its log in the target directory 2017-06-14 17:34:51 +01:00
Phillip Webb
b94bb00fa1 Remove need for attached test-jar artifacts
Remove test-jar artifacts from Maven projects and relocate classes. The
majority of utilities now live in the `spring-boot-testsupport` module.

This update will help us to deploy artifacts using the standard Maven
deploy plugin in the future (which doesn't support the filtering of
individual artifacts).

Fixes gh-9493
2017-06-12 21:11:35 -07:00
Andy Wilkinson
f7e9ec5f42 Minimise our usage of SocketUtils.findAvailableTcpPort
Closes gh-9382
2017-06-09 14:45:09 +01:00
Andy Wilkinson
06eb24557e Fix HttpTunnelConnectionTests following changes for null handling 2017-06-08 14:38:59 +01:00
Andy Wilkinson
776933a1be Adapt to MockClientHttpResponse no longer accepting a null body 2017-06-08 14:11:37 +01:00
Spring Buildmaster
05d4d0281c Next Development Version 2017-06-08 12:47:16 +00:00
Phillip Webb
de66621905 Fix unsupported null argument
Update `MockClientHttpRequestFactory` following upstream Spring
Framework changes that mean `null` is not a valid payload.
2017-06-07 20:37:37 -07:00
Stephane Nicoll
05fbd5dc46 Merge branch '1.5.x' 2017-06-06 16:04:29 +02:00
Stephane Nicoll
cbdab9edb3 Add support for custom ProtocolResolver with Devtools
Prior to this commit, custom `ProtocolResolvers` set on the
`ApplicationContext` were lost when Devtools is used as the customized
`ResourceLoader` did not copy any customization made to the default
resource loader.

This commit makes sure to copy any `ProtocolResolver` set on the context.

Closes gh-9331
2017-06-06 16:04:12 +02:00
Phillip Webb
2c7dd9f519 Polish 2017-06-02 16:00:39 -07:00