Adapt to changes in Commons IO
authorMathieu Baudier <mbaudier@argeo.org>
Wed, 24 May 2023 04:17:20 +0000 (06:17 +0200)
committerMathieu Baudier <mbaudier@argeo.org>
Wed, 24 May 2023 04:17:20 +0000 (06:17 +0200)
swt/org.argeo.app.swt/src/org/argeo/app/swt/docbook/DbkTextInterpreter.java
swt/org.argeo.app.ui/src/org/argeo/app/ui/docbook/DbkTextInterpreter.java

index 1eff7a4edc80bbf5b3b220f87562c5f5591610df..27a666cec625ca8a2d427f335399e74275487330 100644 (file)
@@ -18,18 +18,16 @@ import javax.xml.transform.stream.StreamResult;
 
 import org.apache.commons.io.IOUtils;
 import org.argeo.api.acr.Content;
-import org.argeo.app.docbook.DbkType;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
-import org.w3c.dom.Text;
 
 /** Based on HTML with a few Wiki-like shortcuts. */
 public class DbkTextInterpreter implements TextInterpreter {
 
        private TransformerFactory transformerFactory = TransformerFactory.newDefaultInstance();
 
-       private String linkCssClass = DbkType.link.name();
+//     private String linkCssClass = DbkType.link.name();
 
        @Override
        public void write(Content node, String content) {
@@ -184,7 +182,7 @@ public class DbkTextInterpreter implements TextInterpreter {
 //                             Text text = (Text) n;
 //                             sb.append(text.getTextContent());
 //                     } else 
-                               if (n instanceof Element) {
+                       if (n instanceof Element) {
                                Element elem = (Element) n;
                                sb.append(elem.getTextContent());
                        }
@@ -246,8 +244,6 @@ public class DbkTextInterpreter implements TextInterpreter {
                                sb.append(lines.get(i));
                        }
                        return sb.toString();
-               } catch (IOException e) {
-                       throw new RuntimeException(e);
                }
        }
 
index ff12348dced60bc8f8d456316b9b4e57202f4d98..80f768cb8fd0fcaef099a5c7fa5a58b47ac4b825 100644 (file)
@@ -18,7 +18,6 @@ import javax.jcr.NodeIterator;
 import javax.jcr.Property;
 import javax.jcr.PropertyIterator;
 import javax.jcr.RepositoryException;
-import javax.xml.parsers.DocumentBuilderFactory;
 
 import org.apache.commons.io.IOUtils;
 import org.argeo.app.docbook.DbkAttr;
@@ -28,7 +27,7 @@ import org.argeo.jcr.JcrException;
 
 /** Based on HTML with a few Wiki-like shortcuts. */
 public class DbkTextInterpreter implements TextInterpreter {
-       private DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
+//     private DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
 
        private String linkCssClass = DbkType.link.name();
 
@@ -242,8 +241,6 @@ public class DbkTextInterpreter implements TextInterpreter {
                                sb.append(lines.get(i));
                        }
                        return sb.toString();
-               } catch (IOException e) {
-                       throw new RuntimeException(e);
                }
        }