Added -Xlint option on javac. Fixed deprecation warning. All tests pass
This commit is contained in:
parent
1078e0ad3c
commit
f84f0ae10e
3 changed files with 15 additions and 3 deletions
1
pom.xml
1
pom.xml
|
@ -129,6 +129,7 @@
|
||||||
<configuration>
|
<configuration>
|
||||||
<source>1.6</source>
|
<source>1.6</source>
|
||||||
<target>1.6</target>
|
<target>1.6</target>
|
||||||
|
<compilerArgument>-Xlint</compilerArgument>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
package com.sun.syndication.io;
|
package com.sun.syndication.io;
|
||||||
|
|
||||||
import org.jdom2.JDOMException;
|
import org.jdom2.JDOMException;
|
||||||
|
import org.jdom2.input.sax.XMLReaderJDOMFactory;
|
||||||
|
import org.jdom2.input.sax.XMLReaders;
|
||||||
import org.xml.sax.XMLReader;
|
import org.xml.sax.XMLReader;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -15,9 +17,17 @@ import org.xml.sax.XMLReader;
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class SAXBuilder extends org.jdom2.input.SAXBuilder {
|
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) {
|
public SAXBuilder(boolean _validate) {
|
||||||
super(_validate);
|
super(_validate ? XMLReaders.DTDVALIDATING : XMLReaders.NONVALIDATING);
|
||||||
}
|
}
|
||||||
|
|
||||||
public XMLReader createParser() throws JDOMException {
|
public XMLReader createParser() throws JDOMException {
|
||||||
|
|
|
@ -39,6 +39,7 @@ import org.xml.sax.XMLReader;
|
||||||
import com.sun.syndication.feed.WireFeed;
|
import com.sun.syndication.feed.WireFeed;
|
||||||
import com.sun.syndication.io.impl.FeedParsers;
|
import com.sun.syndication.io.impl.FeedParsers;
|
||||||
import com.sun.syndication.io.impl.XmlFixerReader;
|
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)
|
* 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
|
* @return a new org.jdom2.input.SAXBuilder object
|
||||||
*/
|
*/
|
||||||
protected SAXBuilder createSAXBuilder() {
|
protected SAXBuilder createSAXBuilder() {
|
||||||
SAXBuilder saxBuilder = new SAXBuilder(_validate);
|
SAXBuilder saxBuilder = new SAXBuilder(_validate ? XMLReaders.DTDVALIDATING : XMLReaders.NONVALIDATING);
|
||||||
saxBuilder.setEntityResolver(RESOLVER);
|
saxBuilder.setEntityResolver(RESOLVER);
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in a new issue