Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8177284

HTMLEditor fails to load resources from modena.css if security manager is present

    Details

    • Type: Bug
    • Status: In Progress
    • Priority: P3
    • Resolution: Unresolved
    • Affects Version/s: 8, 9, 10
    • Fix Version/s: tbd
    • Component/s: javafx
    • Subcomponent:
    • Understanding:
      Fix Understood

      Description

      To reproduce, run HelloHTMLEditor with a security manager enabled:

      java -Djava.security.manager hello.HelloHTMLEditor

      The HTMLEditor control will fail to load the resources from the modena.css file and will produce the following warnings:

      Mar 20, 2017 2:40:13 PM com.sun.javafx.css.StyleManager getCachedImage
      WARNING: Error loading image: jrt:/javafx.controls/com/sun/javafx/scene/control/skin/modena/HTMLEditor-Cut.png
      Mar 20, 2017 2:40:13 PM com.sun.javafx.css.StyleManager getCachedImage
      WARNING: Error loading image: jrt:/javafx.controls/com/sun/javafx/scene/control/skin/modena/HTMLEditor-Copy.png
      Mar 20, 2017 2:40:13 PM com.sun.javafx.css.StyleManager getCachedImage
      WARNING: Error loading image: jrt:/javafx.controls/com/sun/javafx/scene/control/skin/modena/HTMLEditor-Paste.png
      Mar 20, 2017 2:40:13 PM com.sun.javafx.css.StyleManager getCachedImage
      WARNING: Error loading image: jrt:/javafx.controls/com/sun/javafx/scene/control/skin/modena/HTMLEditor-Left.png
      Mar 20, 2017 2:40:13 PM com.sun.javafx.css.StyleManager getCachedImage
      WARNING: Error loading image: jrt:/javafx.controls/com/sun/javafx/scene/control/skin/modena/HTMLEditor-Center.png
      Mar 20, 2017 2:40:13 PM com.sun.javafx.css.StyleManager getCachedImage
      WARNING: Error loading image: jrt:/javafx.controls/com/sun/javafx/scene/control/skin/modena/HTMLEditor-Right.png
      Mar 20, 2017 2:40:13 PM com.sun.javafx.css.StyleManager getCachedImage
      WARNING: Error loading image: jrt:/javafx.controls/com/sun/javafx/scene/control/skin/modena/HTMLEditor-Justify.png
      Mar 20, 2017 2:40:13 PM com.sun.javafx.css.StyleManager getCachedImage
      WARNING: Error loading image: jrt:/javafx.controls/com/sun/javafx/scene/control/skin/modena/HTMLEditor-Outdent.png
      Mar 20, 2017 2:40:13 PM com.sun.javafx.css.StyleManager getCachedImage
      WARNING: Error loading image: jrt:/javafx.controls/com/sun/javafx/scene/control/skin/modena/HTMLEditor-Indent.png
      Mar 20, 2017 2:40:13 PM com.sun.javafx.css.StyleManager getCachedImage
      WARNING: Error loading image: jrt:/javafx.controls/com/sun/javafx/scene/control/skin/modena/HTMLEditor-Bullets.png
      Mar 20, 2017 2:40:13 PM com.sun.javafx.css.StyleManager getCachedImage
      WARNING: Error loading image: jrt:/javafx.controls/com/sun/javafx/scene/control/skin/modena/HTMLEditor-Numbered.png
      Mar 20, 2017 2:40:13 PM com.sun.javafx.css.StyleManager getCachedImage
      WARNING: Error loading image: jrt:/javafx.controls/com/sun/javafx/scene/control/skin/modena/HTMLEditor-Text-Color.png
      Mar 20, 2017 2:40:13 PM com.sun.javafx.css.StyleManager getCachedImage
      WARNING: Error loading image: jrt:/javafx.controls/com/sun/javafx/scene/control/skin/modena/HTMLEditor-Background-Color.png
      Mar 20, 2017 2:40:13 PM com.sun.javafx.css.StyleManager getCachedImage
      WARNING: Error loading image: jrt:/javafx.controls/com/sun/javafx/scene/control/skin/modena/HTMLEditor-Bold.png
      Mar 20, 2017 2:40:13 PM com.sun.javafx.css.StyleManager getCachedImage
      WARNING: Error loading image: jrt:/javafx.controls/com/sun/javafx/scene/control/skin/modena/HTMLEditor-Italic.png
      Mar 20, 2017 2:40:13 PM com.sun.javafx.css.StyleManager getCachedImage
      WARNING: Error loading image: jrt:/javafx.controls/com/sun/javafx/scene/control/skin/modena/HTMLEditor-Underline.png
      Mar 20, 2017 2:40:13 PM com.sun.javafx.css.StyleManager getCachedImage
      WARNING: Error loading image: jrt:/javafx.controls/com/sun/javafx/scene/control/skin/modena/HTMLEditor-Strikethrough.png
      Mar 20, 2017 2:40:13 PM com.sun.javafx.css.StyleManager getCachedImage
      WARNING: Error loading image: jrt:/javafx.controls/com/sun/javafx/scene/control/skin/modena/HTMLEditor-Break.png

      A default set of resources is used.

      I tested it on JDK 8 and it fails there, too (the URL to the resources is necessarily different, since it uses a jar: URL rather than the new-in-9 jrt: URL).

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              kcr Kevin Rushforth
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: