# HG changeset patch # Parent 5f9007fc0fca0b53e73982b22e1675b485486f47 RT-38758: [CSS] HelloSanity does not get the right CSS file when run from an IDE diff -r 5f9007fc0fca -r 73c80bc89eae modules/graphics/src/main/java/com/sun/javafx/css/StyleManager.java --- a/modules/graphics/src/main/java/com/sun/javafx/css/StyleManager.java Mon Sep 22 09:32:09 2014 -0400 +++ b/modules/graphics/src/main/java/com/sun/javafx/css/StyleManager.java Mon Sep 22 13:16:49 2014 -0400 @@ -1147,7 +1147,13 @@ StylesheetContainer container = platformUserAgentStylesheetContainers.get(n); // assignment in this conditional is intentional! if(isSame = fname.equals(container.fname)) { - byte[] checksum = calculateCheckSum(fname); + // don't use fname in calculateCheckSum since it is just the key to + // find the StylesheetContainer. Rather, use the URL of the + // stylesheet that was already loaded. For example, we could have + // fname = "com/sun/javafx/scene/control/skin/modena/modena.css, but + // the stylesheet URL could be jar:file://some/path/!com/sun/javafx/scene/control/skin/modena/modena.bss + String stylesheetUrl = container.stylesheet.getUrl(); + byte[] checksum = calculateCheckSum(stylesheetUrl); isSame = Arrays.equals(checksum, container.checksum); } }