commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1102430 - in /commons/sandbox/digester3/trunk/src: main/java/org/apache/commons/digester3/RuleSetBase.java test/java/org/apache/commons/digester3/TestRuleSet.java
Date Thu, 12 May 2011 19:14:55 GMT
Author: simonetripodi
Date: Thu May 12 19:14:54 2011
New Revision: 1102430

URL: http://svn.apache.org/viewvc?rev=1102430&view=rev
Log:
reduced namespaceURI visibility, can be set only by the constructor

Modified:
    commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/RuleSetBase.java
    commons/sandbox/digester3/trunk/src/test/java/org/apache/commons/digester3/TestRuleSet.java

Modified: commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/RuleSetBase.java
URL: http://svn.apache.org/viewvc/commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/RuleSetBase.java?rev=1102430&r1=1102429&r2=1102430&view=diff
==============================================================================
--- commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/RuleSetBase.java
(original)
+++ commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/RuleSetBase.java
Thu May 12 19:14:54 2011
@@ -34,7 +34,28 @@ public abstract class RuleSetBase
     /**
      * The namespace URI that all Rule instances created by this RuleSet will be associated
with.
      */
-    protected String namespaceURI = null;
+    private final String namespaceURI;
+
+    // ----------------------------------------------------------- Constructors
+
+    /**
+     * Build a new RuleSetBase with a null namespaceURI
+     */
+    public RuleSetBase()
+    {
+        this( null );
+    }
+
+    /**
+     * Build a new RuleSetBase with the given namespaceURI
+     *
+     * @param namespaceURI The namespace URI that all Rule instances will be associated with.
+     * @since 3.0
+     */
+    public RuleSetBase( String namespaceURI )
+    {
+        this.namespaceURI = namespaceURI;
+    }
 
     // ------------------------------------------------------------- Properties
 

Modified: commons/sandbox/digester3/trunk/src/test/java/org/apache/commons/digester3/TestRuleSet.java
URL: http://svn.apache.org/viewvc/commons/sandbox/digester3/trunk/src/test/java/org/apache/commons/digester3/TestRuleSet.java?rev=1102430&r1=1102429&r2=1102430&view=diff
==============================================================================
--- commons/sandbox/digester3/trunk/src/test/java/org/apache/commons/digester3/TestRuleSet.java
(original)
+++ commons/sandbox/digester3/trunk/src/test/java/org/apache/commons/digester3/TestRuleSet.java
Thu May 12 19:14:54 2011
@@ -66,12 +66,11 @@ public class TestRuleSet
     public TestRuleSet( String prefix, String namespaceURI )
     {
 
-        super();
+        super(namespaceURI);
         if ( prefix == null )
             this.prefix = "";
         else
             this.prefix = prefix;
-        this.namespaceURI = namespaceURI;
 
     }
 



Mime
View raw message