Hi, We were getting the default.css from the class of the instance of HTMLEditorKit. Since this instance could be a class in some foreign package loaded through a custom classloader we were not getting the default.css resource correctly. This patch fixes that.
2006-09-17 Mark Wielaard <[EMAIL PROTECTED]>
* javax/swing/text/html/HTMLEditorKit (getStyleSheet): Load
resource from HTMLEditorKit.class.
This again gets us a little further with JabRef.
Committed,
Mark
diff -u -r1.33 HTMLEditorKit.java
--- javax/swing/text/html/HTMLEditorKit.java 24 Aug 2006 16:58:11 -0000
1.33
+++ javax/swing/text/html/HTMLEditorKit.java 17 Sep 2006 23:07:29 -0000
@@ -1148,7 +1148,8 @@
try
{
styleSheet = new StyleSheet();
- InputStream in = getClass().getResourceAsStream(DEFAULT_CSS);
+ Class c = HTMLEditorKit.class;
+ InputStream in = c.getResourceAsStream(DEFAULT_CSS);
InputStreamReader r = new InputStreamReader(in);
styleSheet.loadRules(r, null);
r.close();
signature.asc
Description: This is a digitally signed message part
