This reverts commit bbca612a57.
StandardJarScanner, which contains the faulty assumption about
URLClassLoader is part of Jasper. Jetty, like Tomcat, uses Jasper for
JSPs so it's also affected.
See gh-10456
Previously, StaticResourceJars would only find jars with
META-INF/resources content if it had been loaded by a URLClassLoader.
This is not the case on Java 9 and, as a result, static content in
META-INF/resources of any jars on the class path was not found.
This commit updates StaticResourceJars to fall back to using the
JVM's class path to find static resource jars when it was loaded by
a ClassLoader that is not a URLClassLoader.
Closes gh-10455
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
The translations for the timezone names vary between Java 8 and Java
9. For example, with Java 9, UTC's name is no longer localized while
others have different localizations. This commit updates the test
to verify that the correct locale is being used while also tolerating
the different localization's of Java 8 and 9.
See gh-7226