harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vasily Zakharov (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HARMONY-4748) [classlib][luni] Content-Encoding HTTP header is not processed
Date Tue, 11 Sep 2007 11:38:32 GMT

     [ https://issues.apache.org/jira/browse/HARMONY-4748?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Vasily Zakharov updated HARMONY-4748:
-------------------------------------

    Summary: [classlib][luni] Content-Encoding HTTP header is not processed  (was: [classlib][swing][html]
Stylesheet fails to load when provided in GZIP format)

> [classlib][luni] Content-Encoding HTTP header is not processed
> --------------------------------------------------------------
>
>                 Key: HARMONY-4748
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4748
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Vasily Zakharov
>
> org.apache.harmony.x.swing.text.html.cssparser.CSSParser displays the following errors
when trying to open the http://www.apache.org/ page:
> CSSParser: failed to parse '' at [1, 1] 
> CSSParser: failed to parse '+' at [1, 20] 
> CSSParser: failed to parse '' at [2, 188] 
> Here's the reproducer:
> import javax.swing.JFrame;
> import javax.swing.JEditorPane;
> public class Test {
>     public static void main(String argv[]) {
>         try {
>             JFrame frame = new JFrame();
>             frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
>             JEditorPane pane = new JEditorPane("http://www.apache.org/");
>             frame.getContentPane().add(pane);
>             frame.setSize(200, 300);
>             frame.setVisible(true);
>         } catch (Exception e) {
>             e.printStackTrace(System.out);
>         }
>     }
> }
> Investigation shows that the errors occur at the following point:
> 	at org.apache.harmony.x.swing.text.html.cssparser.CSSLogger.logError(CSSLogger.java:29)
> 	at org.apache.harmony.x.swing.text.html.cssparser.CSSParser.skipTillRuleSetEnd(CSSParser.java:30)
> 	at org.apache.harmony.x.swing.text.html.cssparser.CSSParser.skipTillExpressionEnd(CSSParser.java:546)
> 	at org.apache.harmony.x.swing.text.html.cssparser.CSSParser.styleSheetBody(CSSParser.java:134)
> 	at org.apache.harmony.x.swing.text.html.cssparser.CSSParser.styleSheet(CSSParser.java:75)
> 	at org.apache.harmony.x.swing.text.html.cssparser.CSSParser.cssGrammar(CSSParser.java:54)
> 	at org.apache.harmony.x.swing.text.html.cssparser.CSSParser.parse(CSSParser.java:11)
> 	at javax.swing.text.html.StyleSheet.parseSheet(StyleSheet.java:1156)
> 	at javax.swing.text.html.StyleSheet.loadRules(StyleSheet.java:995)
> 	at javax.swing.text.html.HTMLDocument$HTMLReader$LinkAction.loadCSS(HTMLDocument.java:535)
> 	at javax.swing.text.html.HTMLDocument$HTMLReader$LinkAction.start(HTMLDocument.java:524)
> 	at javax.swing.text.html.HTMLDocument$HTMLReader.handleSimpleTag(HTMLDocument.java:627)
> 	at javax.swing.text.html.parser.DocumentParser.handleEmptyTag(DocumentParser.java:70)
> 	at javax.swing.text.html.parser.Parser.startTag(Parser.java:431)
> 	at javax.swing.text.html.parser.Parser$ParserHandlerImpl.iHaveNewStartTag(Parser.java:592)
> 	at javax.swing.text.html.parser.CUP$ParserCup$actions.CUP$ParserCup$do_action(ParserCup.java:939)
> 	at javax.swing.text.html.parser.ParserCup.do_action(ParserCup.java:221)
> 	at java_cup.runtime.lr_parser.parse(lr_parser.java:569)
> 	at javax.swing.text.html.parser.Parser$ParserHandlerImpl.parse(Parser.java:59)
> 	at javax.swing.text.html.parser.Parser.parse(Parser.java:399)
> 	at javax.swing.text.html.parser.DocumentParser.parse(DocumentParser.java:98)
> 	at javax.swing.text.html.parser.ParserDelegator.parse(ParserDelegator.java:80)
> 	at javax.swing.text.html.HTMLEditorKit.read(HTMLEditorKit.java:736)
> 	at javax.swing.JEditorPane.documentLoading(JEditorPane.java:68)
> 	at javax.swing.JEditorPane.setPage(JEditorPane.java:697)
> 	at javax.swing.JEditorPane.setPage(JEditorPane.java:591)
> 	at javax.swing.JEditorPane.<init>(JEditorPane.java:298)
> 	at Test.main(Test.java:8)
> Further investigation is complicated because of HARMONY-4660 that throws NPE when page
is parsed.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message