changeset 3984:29f85364846e

RT-31042: fix NPE from Declaration found by running CSSParserTest
author David Grieve<david.grieve@oracle.com>
date Thu, 13 Jun 2013 09:04:27 -0400
parents 76a7ba878acd
children 0c7ce9e94f64
files javafx-ui-common/src/com/sun/javafx/css/Stylesheet.java javafx-ui-common/test/unit/com/sun/javafx/css/parser/CSSParserTest.java
diffstat 2 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/javafx-ui-common/src/com/sun/javafx/css/Stylesheet.java	Thu Jun 13 10:13:22 2013 +0200
+++ b/javafx-ui-common/src/com/sun/javafx/css/Stylesheet.java	Thu Jun 13 09:04:27 2013 -0400
@@ -190,6 +190,7 @@
     public void readBinary(DataInputStream is, String[] strings)
         throws IOException 
     {
+        this.stringStore = strings;
         final int index = is.readShort();
         this.setOrigin(StyleOrigin.valueOf(strings[index]));
         final int nRules = is.readShort();
@@ -228,7 +229,6 @@
             final String[] strings = StringStore.readBinary(dataInputStream);
             // read binary data
             stylesheet = new Stylesheet(url);
-            stylesheet.stringStore = strings;
             stylesheet.readBinary(dataInputStream,strings);
 
         } catch (FileNotFoundException fnfe) {
--- a/javafx-ui-common/test/unit/com/sun/javafx/css/parser/CSSParserTest.java	Thu Jun 13 10:13:22 2013 +0200
+++ b/javafx-ui-common/test/unit/com/sun/javafx/css/parser/CSSParserTest.java	Thu Jun 13 09:04:27 2013 -0400
@@ -155,7 +155,6 @@
         assertTrue(Double.compare(size, 12) == 0);
     }
     
-    @Ignore("RT-31042")
     @Test public void test_RT_18126() {
         // CSS cannot write binary -fx-background-repeat: repeat, no-repeat;
         String data = "#rt18126 {"