--- old/src/com/sun/org/apache/xerces/internal/jaxp/DocumentBuilderFactoryImpl.java Wed May 8 13:36:11 2013 +++ new/src/com/sun/org/apache/xerces/internal/jaxp/DocumentBuilderFactoryImpl.java Wed May 8 13:36:10 2013 @@ -37,7 +37,7 @@ /** * @author Rajiv Mordani * @author Edwin Goei - * @version $Id: DocumentBuilderFactoryImpl.java,v 1.6 2009/07/28 23:48:32 joehw Exp $ + * @version $Id: DocumentBuilderFactoryImpl.java,v 1.8 2010-11-01 04:40:06 joehw Exp $ */ public class DocumentBuilderFactoryImpl extends DocumentBuilderFactory { /** These are DocumentBuilderFactory attributes not DOM attributes */ @@ -191,6 +191,9 @@ public void setFeature(String name, boolean value) throws ParserConfigurationException { + if (features == null) { + features = new Hashtable(); + } // If this is the secure processing feature, save it then return. if (name.equals(XMLConstants.FEATURE_SECURE_PROCESSING)) { if (System.getSecurityManager() != null && (!value)) { @@ -199,11 +202,10 @@ "jaxp-secureprocessing-feature", null)); } fSecureProcess = value; + features.put(name, value ? Boolean.TRUE : Boolean.FALSE); return; } - if (features == null) { - features = new Hashtable(); - } + features.put(name, value ? Boolean.TRUE : Boolean.FALSE); // Test the feature by possibly throwing SAX exceptions try {