Skip to content

Commit

Permalink
remove code deprecated since 4.7
Browse files Browse the repository at this point in the history
  • Loading branch information
bobjacobsen committed Apr 24, 2019
1 parent e8cf837 commit 97c8b4e
Showing 1 changed file with 0 additions and 73 deletions.
73 changes: 0 additions & 73 deletions java/src/jmri/jmrit/XmlFile.java
Expand Up @@ -200,65 +200,6 @@ protected Element getRoot(InputStream stream) throws JDOMException, IOException
return doc.getRootElement();
}

/**
* @deprecated 4.7.2 use setVerifySchema, setVerifyDTD methods
* @param verify true if the XML document should be validated (but this is
* now ignored)
* @param stream input containing the XML document
* @return the root element of the XML document
* @throws org.jdom2.JDOMException if the XML document is invalid
* @throws java.io.IOException if the input cannot be read
*/
@Deprecated // 4.7.2
protected Element getRoot(boolean verify, InputStream stream) throws JDOMException, IOException {
jmri.util.Log4JUtil.deprecationWarning(log, "getRoot");
return getRoot(stream);
}

/**
* Get the root element from an XML document in a Reader.
*
* Runs through a BufferedReader for increased performance.
*
*
* @param verifySchema true if the XML document should be validated against
* its schema
* @param verifyDTD true if the XML document should be validated against
* its DTD
* @param reader input containing the XML document
* @return the root element of the XML document
* @throws org.jdom2.JDOMException if the XML document is invalid
* @throws java.io.IOException if the input cannot be read
* @since 3.1.5
* @deprecated 4.7.2 use setVerifySchema, setVerifyDTD methods
*/
@Deprecated // 4.7.2
protected Element getRoot(boolean verifySchema, boolean verifyDTD, InputStreamReader reader) throws JDOMException, IOException {
jmri.util.Log4JUtil.deprecationWarning(log, "getRoot");
log.trace("getRoot from reader with encoding {}", reader.getEncoding());

SAXBuilder builder = getBuilder(getValidate()); // argument controls validation
Document doc = builder.build(new BufferedReader(reader));
doc = processInstructions(doc); // handle any process instructions
// find root
return doc.getRootElement();
}

/**
* @deprecated 4.7.2 use setVerifySchema, setVerifyDTD methods
* @param verify true if the XML document should be validated (but this is
* now ignored)
* @param reader input containing the XML document
* @return the root element of the XML document
* @throws org.jdom2.JDOMException if the XML document is invalid
* @throws java.io.IOException if the input cannot be read
*/
@Deprecated // 4.7.2
protected Element getRoot(boolean verify, InputStreamReader reader) throws JDOMException, IOException {
jmri.util.Log4JUtil.deprecationWarning(log, "getRoot");
return getRoot(verify, verify, reader);
}

/**
* Write a File as XML.
*
Expand Down Expand Up @@ -731,20 +672,6 @@ public static JFileChooser userFileChooser(
return userFileChooser(filter, suffix1, null);
}

/**
* @param verify true if validation should be attempted
* @return a SAX builder pre-configured to (not) validate XML
* @deprecated 4.7.2
*/
@Deprecated // 4.7.2
public static SAXBuilder getBuilder(boolean verify) {
jmri.util.Log4JUtil.deprecationWarning(log, "getBuilder");
if (verify) {
return getBuilder(Validate.CheckDtdThenSchema);
}
return getBuilder(Validate.None);
}

@SuppressWarnings("deprecation") // wait for updated Xerxes before coding substitute for SAXBuilder(String, boolean)
public static SAXBuilder getBuilder(Validate validate) { // should really be a Verify enum
SAXBuilder builder;
Expand Down

0 comments on commit 97c8b4e

Please sign in to comment.