From edb27a29f30e18f51800a68a3a91fd1fc1a1d54c Mon Sep 17 00:00:00 2001 From: Norman Walsh Date: Wed, 12 Jul 2023 14:44:45 +0100 Subject: [PATCH 1/2] Fix ClassCastException --- src/main/java/org/nineml/coffeesacks/XmlForest.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/nineml/coffeesacks/XmlForest.java b/src/main/java/org/nineml/coffeesacks/XmlForest.java index f1e7838..135836a 100644 --- a/src/main/java/org/nineml/coffeesacks/XmlForest.java +++ b/src/main/java/org/nineml/coffeesacks/XmlForest.java @@ -16,6 +16,7 @@ public class XmlForest { private final Processor processor; private final boolean maxPriorityStyle; private final ParseForest graph; + private final ParserOptions options; private Stack nodeStack = new Stack<>(); private HashMap> parents = new HashMap<>(); private HashMap> children = new HashMap<>(); @@ -29,6 +30,7 @@ public XmlForest(Processor processor, InvisibleXmlDocument document) throws Saxo this.processor = processor; this.maxPriorityStyle = "max".equals(document.getOptions().getPriorityStyle()); this.graph = document.getResult().getForest(); + this.options = document.getOptions(); this.doc = null; if (document.succeeded()) { constructXml(); @@ -247,7 +249,7 @@ private Map attMap(List attributes) { } private AttributeBuilder newAttributes() { - return new AttributeBuilder((ParserOptions) graph.getOptions()); + return new AttributeBuilder(options); } private AttributeBuilder newAttributes(String name, String value) { From f538c089c7f73696ad8fa05f471e7a708666f9f8 Mon Sep 17 00:00:00 2001 From: Norman Walsh Date: Wed, 12 Jul 2023 14:44:54 +0100 Subject: [PATCH 2/2] Version 3.0.0e fixes a few bugs --- gradle.properties | 6 +++--- src/website/xml/changelog.xml | 13 ++++++++++++- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/gradle.properties b/gradle.properties index d807908..c586cfa 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,12 +1,12 @@ sacksName=coffeesacks sacksTitle=CoffeeSacks -sacksVersion=3.0.0d +sacksVersion=3.0.0e filterName=coffeefilter -filterVersion=3.0.0d +filterVersion=3.0.0e grinderName=coffeegrinder -grinderVersion=3.0.0d +grinderVersion=3.0.0e xmlresolverVersion=5.2.0 docbookVersion=5.2CR5 diff --git a/src/website/xml/changelog.xml b/src/website/xml/changelog.xml index 9e47de2..613e705 100644 --- a/src/website/xml/changelog.xml +++ b/src/website/xml/changelog.xml @@ -9,6 +9,18 @@ + +3.0.0e +2023-07-12 + +This is a beta release for version 3.0.0. There are a lot of +underlying changes in this release. +Version 3.0.0e depends on CoffeeGrinder and CoffeeFilter 3.0.0e which fix +a few bugs. Also fixed a bug in CoffeeSacks where attempting to parse a forest would raise +a ClassCastException. + + + 3.0.0d 2023-07-11 @@ -19,7 +31,6 @@ underlying changes in this release. a few bugs and make a few improvements. - 3.0.0c 2023-07-09