commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1101614 - in /commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3: Digester.java ParserFeatureSetterFactory.java parser/
Date Tue, 10 May 2011 19:46:04 GMT
Author: simonetripodi
Date: Tue May 10 19:46:03 2011
New Revision: 1101614

URL: http://svn.apache.org/viewvc?rev=1101614&view=rev
Log:
removed deprecated parser package (and related stuff from DIgester class)

Removed:
    commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/ParserFeatureSetterFactory.java
    commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/parser/
Modified:
    commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/Digester.java

Modified: commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/Digester.java
URL: http://svn.apache.org/viewvc/commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/Digester.java?rev=1101614&r1=1101613&r2=1101614&view=diff
==============================================================================
--- commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/Digester.java
(original)
+++ commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/Digester.java
Tue May 10 19:46:03 2011
@@ -33,7 +33,6 @@ import java.util.EmptyStackException;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import java.util.Properties;
 import java.util.Stack;
 
 import javax.xml.parsers.ParserConfigurationException;
@@ -765,31 +764,7 @@ public class Digester extends DefaultHan
 
         // Create a new parser
         try {
-            if (validating && (schemaLocation != null)) {
-                // There is no portable way to specify the location of
-                // an xml schema to be applied to the input document, so
-                // we have to use parser-specific code for this. That code
-                // is hidden behind the ParserFeatureSetterFactory class.
-
-                // The above has changed in JDK 1.5 and no longer true. The
-                // functionality used in this block has now been deprecated.
-                // We now use javax.xml.validation.Schema instead.
-
-                Properties properties = new Properties();
-                properties.put("SAXParserFactory", getFactory());
-                if (schemaLocation != null) {
-                    properties.put("schemaLocation", schemaLocation);
-                    properties.put("schemaLanguage", schemaLanguage);
-                }
-                parser = ParserFeatureSetterFactory.newSAXParser(properties);
-            } else {
-                // The user doesn't want to use any non-portable parsing features,
-                // so we can just use the portable API here. Note that method
-                // getFactory returns a factory already configured with the
-                // appropriate namespaceAware and validating properties.
-
-                parser = getFactory().newSAXParser();
-            }
+            parser = getFactory().newSAXParser();
         } catch (Exception e) {
             log.error("Digester.getParser: ", e);
             return (null);



Mime
View raw message