[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xerces-cvs
Subject:    cvs commit: xml-xerces/java/src/org/apache/xerces/jaxp SAXParserFactoryImpl.java
From:       edwingo () apache ! org
Date:       2001-03-30 23:24:11
[Download RAW message or body]

edwingo     01/03/30 15:24:10

  Modified:    java/src/org/apache/xerces/jaxp SAXParserFactoryImpl.java
  Log:
  Fix setFeature() bug provided by Kohsuke Kawaguchi
  
  Revision  Changes    Path
  1.5       +11 -3     xml-xerces/java/src/org/apache/xerces/jaxp/SAXParserFactoryImpl.java
  
  Index: SAXParserFactoryImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/jaxp/SAXParserFactoryImpl.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- SAXParserFactoryImpl.java	2001/02/03 00:28:59	1.4
  +++ SAXParserFactoryImpl.java	2001/03/30 23:24:10	1.5
  @@ -1,5 +1,5 @@
   /*
  - * $Id: SAXParserFactoryImpl.java,v 1.4 2001/02/03 00:28:59 edwingo Exp $
  + * $Id: SAXParserFactoryImpl.java,v 1.5 2001/03/30 23:24:10 edwingo Exp $
    *
    * The Apache Software License, Version 1.1
    *
  @@ -72,7 +72,7 @@
   /**
    * @author Rajiv Mordani
    * @author Edwin Goei
  - * @version $Revision: 1.4 $
  + * @version $Revision: 1.5 $
    */
   
   /**
  @@ -137,7 +137,15 @@
           features.put(name, new Boolean(value));
   
           // Test the feature by possibly throwing SAX exceptions
  -        newSAXParserImpl();
  +        try {
  +            newSAXParserImpl();
  +        } catch (SAXNotSupportedException e) {
  +            features.remove(name);
  +            throw e;
  +        } catch (SAXNotRecognizedException e) {
  +            features.remove(name);
  +            throw e;
  +        }
       }
   
       /**
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic