xml-commons-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cross...@apache.org
Subject svn commit: r671455 - in /xml/commons/trunk: java/src/org/apache/xml/resolver/CatalogManager.java src/documentation/content/xdocs/components/resolver/resolver-release-notes.xml status.xml
Date Wed, 25 Jun 2008 08:09:13 GMT
Author: crossley
Date: Wed Jun 25 01:09:12 2008
New Revision: 671455

URL: http://svn.apache.org/viewvc?rev=671455&view=rev
Log:
Use the setting from system property "xml.catalog.verbosity".
Contributed by: Earl Hood
Issue: 45209

Modified:
    xml/commons/trunk/java/src/org/apache/xml/resolver/CatalogManager.java
    xml/commons/trunk/src/documentation/content/xdocs/components/resolver/resolver-release-notes.xml
    xml/commons/trunk/status.xml

Modified: xml/commons/trunk/java/src/org/apache/xml/resolver/CatalogManager.java
URL: http://svn.apache.org/viewvc/xml/commons/trunk/java/src/org/apache/xml/resolver/CatalogManager.java?rev=671455&r1=671454&r2=671455&view=diff
==============================================================================
--- xml/commons/trunk/java/src/org/apache/xml/resolver/CatalogManager.java (original)
+++ xml/commons/trunk/java/src/org/apache/xml/resolver/CatalogManager.java Wed Jun 25 01:09:12
2008
@@ -205,11 +205,9 @@
   /** Constructor. */
   public CatalogManager() {
     debug = new Debug();
-    // Note that we don't setDebug() here; we do that lazily. Either the
-    // user will set it explicitly, or we'll do it automagically if they
-    // read from the propertyFile for some other reason. That way, there's
-    // no attempt to read from the file before the caller has had a chance
-    // to avoid it.
+    queryVerbosityFromSysProp();
+    // Make sure verbosity is set by xml.catalog.verbosity sysprop
+    // setting, if defined.
   }
 
   /** Constructor that specifies an explicit property file. */
@@ -217,11 +215,9 @@
     this.propertyFile = propertyFile;
 
     debug = new Debug();
-    // Note that we don't setDebug() here; we do that lazily. Either the
-    // user will set it explicitly, or we'll do it automagically if they
-    // read from the propertyFile for some other reason. That way, there's
-    // no attempt to read from the file before the caller has had a chance
-    // to avoid it.
+    queryVerbosityFromSysProp();
+    // Make sure verbosity is set by xml.catalog.verbosity sysprop
+    // setting, if defined.
   }
 
   /** Set the bootstrap resolver.*/
@@ -234,6 +230,20 @@
     return bResolver;
   }
 
+  /** Query system property for verbosity level. */
+  private void queryVerbosityFromSysProp() {
+    String verbStr = System.getProperty(pVerbosity);
+    if (verbStr != null) {
+      try {
+        int verb = Integer.parseInt(verbStr.trim());
+        verbosity = verb;
+        debug.setDebug(verb);
+      } catch (Exception e) {
+        System.err.println("Cannot parse verbosity: \"" + verbStr + "\"");
+      }
+    }
+  }
+
   /**
    * Load the properties from the propertyFile and build the
    * resources from it.

Modified: xml/commons/trunk/src/documentation/content/xdocs/components/resolver/resolver-release-notes.xml
URL: http://svn.apache.org/viewvc/xml/commons/trunk/src/documentation/content/xdocs/components/resolver/resolver-release-notes.xml?rev=671455&r1=671454&r2=671455&view=diff
==============================================================================
--- xml/commons/trunk/src/documentation/content/xdocs/components/resolver/resolver-release-notes.xml
(original)
+++ xml/commons/trunk/src/documentation/content/xdocs/components/resolver/resolver-release-notes.xml
Wed Jun 25 01:09:12 2008
@@ -38,9 +38,15 @@
 
 <section id="s.v1.3">
 <title>Apache XML Commons Resolver v1.3</title>
+<section id="s.verbosity">
+<title>Always get verbosity from system property xml.catalog.verbosity</title>
 <para>
+In previous versions, the system property <varname>xml.catalog.verbosity</varname>
was
+only read if a CatalogManager.properties file did not define a "verbosity" setting. Now this
property is always read, and it has precedence.
+(Issue: <ulink url="http://issues.apache.org/bugzilla/show_bug.cgi?id=45209">45209</ulink>)
 </para>
 </section>
+</section>
 
 <section id="s.v1.2">
 <title>Apache XML Commons Resolver v1.2</title>
@@ -50,7 +56,7 @@
 Committee Specification.
 </para>
 <para>XCatalog support
-(Bugzilla Issue: <ulink url="http://issues.apache.org/bugzilla/show_bug.cgi?id=38562">38562</ulink>)
+(Issue: <ulink url="http://issues.apache.org/bugzilla/show_bug.cgi?id=38562">38562</ulink>)
 </para>
 <para>
 Fixed several bugs including one involving the use of "file: URLs".

Modified: xml/commons/trunk/status.xml
URL: http://svn.apache.org/viewvc/xml/commons/trunk/status.xml?rev=671455&r1=671454&r2=671455&view=diff
==============================================================================
--- xml/commons/trunk/status.xml (original)
+++ xml/commons/trunk/status.xml Wed Jun 25 01:09:12 2008
@@ -96,13 +96,17 @@
 
   <changes>
     <!-- Add new releases here -->
+
+    <release version="xml-commons-external-1.4.01-dev" date="not-yet-released">
+    </release>
+
     <release version="xml-commons-resolver-1.3-dev" date="not-yet-released">
       <action type="update" context="docs" dev="crossley">
         Added <link href="site:resolver/release-notes">release notes</link> for
some of the main items.
       </action>
-    </release>
-
-    <release version="xml-commons-external-1.4.01-dev" date="not-yet-released">
+      <action type="fix" context="code" dev="crossley" due-to="Earl Hood" fixes-bug="45209">
+        Use the setting from system property "xml.catalog.verbosity".
+      </action>
     </release>
 
     <release version="xml-commons-external-1.3.04" date="2006-11-22">



Mime
View raw message