Added -Xlint option on javac. Fixed deprecation warning. All tests pass

This commit is contained in:
Farrukh Najmi 2013-10-03 15:51:30 -04:00
parent 1078e0ad3c
commit f84f0ae10e
3 changed files with 15 additions and 3 deletions

View file

@ -129,6 +129,7 @@
<configuration>
<source>1.6</source>
<target>1.6</target>
<compilerArgument>-Xlint</compilerArgument>
</configuration>
</plugin>
<plugin>

View file

@ -1,6 +1,8 @@
package com.sun.syndication.io;
import org.jdom2.JDOMException;
import org.jdom2.input.sax.XMLReaderJDOMFactory;
import org.jdom2.input.sax.XMLReaders;
import org.xml.sax.XMLReader;
/*
@ -15,9 +17,17 @@ import org.xml.sax.XMLReader;
*
*/
public class SAXBuilder extends org.jdom2.input.SAXBuilder {
public SAXBuilder(XMLReaderJDOMFactory factory) {
super(factory);
}
/**
*
* @deprecated use SAXBuilder(XMLReaderJDOMFactory) with either XMLReaders.DTDVALIDATING or XMLReaders.NONVALIDATING
* @param _validate
*/
public SAXBuilder(boolean _validate) {
super(_validate);
super(_validate ? XMLReaders.DTDVALIDATING : XMLReaders.NONVALIDATING);
}
public XMLReader createParser() throws JDOMException {

View file

@ -39,6 +39,7 @@ import org.xml.sax.XMLReader;
import com.sun.syndication.feed.WireFeed;
import com.sun.syndication.io.impl.FeedParsers;
import com.sun.syndication.io.impl.XmlFixerReader;
import org.jdom2.input.sax.XMLReaders;
/**
* Parses an XML document (File, InputStream, Reader, W3C SAX InputSource, W3C DOM Document or JDom DOcument)
@ -283,7 +284,7 @@ public class WireFeedInput {
* @return a new org.jdom2.input.SAXBuilder object
*/
protected SAXBuilder createSAXBuilder() {
SAXBuilder saxBuilder = new SAXBuilder(_validate);
SAXBuilder saxBuilder = new SAXBuilder(_validate ? XMLReaders.DTDVALIDATING : XMLReaders.NONVALIDATING);
saxBuilder.setEntityResolver(RESOLVER);
//