< prev index next >
modules/graphics/src/main/java/javafx/css/converter/URLConverter.java
Print this page
rev 9619 : [mq]: 9-jake.patch
*** 113,122 ****
--- 113,123 ----
}
final String path = resourceUri.getPath();
if (path.startsWith("/")) {
final ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
+ // FIXME: JIGSAW -- use Class.getResource if resource is in a module
return contextClassLoader.getResource(path.substring(1));
}
final String stylesheetPath = (stylesheetUrl != null) ? stylesheetUrl.trim() : null;
*** 138,147 ****
--- 139,149 ----
}
// URL doesn't have scheme or stylesheetUrl is null
final ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
+ // FIXME: JIGSAW -- use Class.getResource if resource is in a module
return contextClassLoader.getResource(path);
} catch (final MalformedURLException|URISyntaxException e) {
PlatformLogger cssLogger = com.sun.javafx.util.Logging.getCSSLogger();
*** 161,184 ****
--- 163,192 ----
//
// See also StyleSheet#loadStylesheet(String)
//
private URL resolveRuntimeImport(final URI resourceUri) {
+ // FIXME: JIGSAW -- this method needs to be rewritten for Jigsaw.
+ // There is no jfxrt.jar any more, and resource encapsulation will
+ // prevent it from being resolved anyway.
final String path = resourceUri.getPath();
final String resourcePath = path.startsWith("/") ? path.substring(1) : path;
if ((resourcePath.startsWith("com/sun/javafx/scene/control/skin/modena/") ||
resourcePath.startsWith("com/sun/javafx/scene/control/skin/caspian/")) &&
(resourcePath.endsWith(".css") || resourcePath.endsWith(".bss"))) {
+ System.err.println("WARNING: resolveRuntimeImport cannot resolve: " + resourcePath);
+
final SecurityManager sm = System.getSecurityManager();
if (sm == null) {
// If the SecurityManager is not null, then just look up the resource on the class-path.
// If there is a SecurityManager, the URLClassPath getResource call will return null,
// so fall through and create a URL from the code-source URI
final ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
+ // FIXME: JIGSAW -- use Class.getResource if resource is in a module
final URL resolved = contextClassLoader.getResource(resourcePath);
return resolved;
}
// check whether the path is file from our runtime jar
< prev index next >