SuperReader.getFeature(): avoid NullPointerException
authorFrantišek Kučera <franta-hg@frantovo.cz>
Sun, 08 Jun 2014 11:24:03 +0200
changeset 383de77c1ac95e
parent 37 03f940508c72
child 39 a5020340362b
SuperReader.getFeature(): avoid NullPointerException
java/alt2xml-lib-input/src/cz/frantovo/alt2xml/SuperReader.java
     1.1 --- a/java/alt2xml-lib-input/src/cz/frantovo/alt2xml/SuperReader.java	Sun Jun 08 09:57:33 2014 +0200
     1.2 +++ b/java/alt2xml-lib-input/src/cz/frantovo/alt2xml/SuperReader.java	Sun Jun 08 11:24:03 2014 +0200
     1.3 @@ -85,9 +85,10 @@
     1.4  		 * the http://xml.org/sax/features/namespaces
     1.5  		 * and the http://xml.org/sax/features/namespace-prefixes feature names.
     1.6  		 */
     1.7 -		return features.get(name);
     1.8 +		Boolean feature = features.get(name);
     1.9 +		return feature == null ? false : feature;
    1.10  	}
    1.11 -
    1.12 +	
    1.13  	@Override
    1.14  	public void setFeature(String name, boolean value) throws SAXNotRecognizedException, SAXNotSupportedException {
    1.15  		/**