CVS: plexus-container-new/src/java/org/apache/plexus/configuration XmlPullConfigurationBuilder.java,1.1,1.2

[email protected] Tue, 27 May 2003 22:40:30 -0500
Newsgroups gmane.comp.java.plexus.devel
Message-ID <[email protected]>
Update of /cvsroot/plexus/plexus-container-new/src/java/org/apache/plexus/configuration
In directory eng.werken.com:/tmp/cvs-serv23889

Modified Files:
	XmlPullConfigurationBuilder.java 
Log Message:
o no m_ stuff in here!

Index: XmlPullConfigurationBuilder.java
===================================================================
RCS file: /cvsroot/plexus/plexus-container-new/src/java/org/apache/plexus/configuration/XmlPullConfigurationBuilder.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- XmlPullConfigurationBuilder.java	3 May 2003 00:31:35 -0000	1.1
+++ XmlPullConfigurationBuilder.java	28 May 2003 03:40:21 -0000	1.2
@@ -19,14 +19,14 @@
      * encountered the lists will grow automatically.
      */
     private static final int EXPECTED_DEPTH = 5;
-    private final ArrayList m_elements = new ArrayList( EXPECTED_DEPTH );
-    private final ArrayList m_values = new ArrayList( EXPECTED_DEPTH );
+    private final ArrayList elements = new ArrayList( EXPECTED_DEPTH );
+    private final ArrayList values = new ArrayList( EXPECTED_DEPTH );
     /**
      * Contains true at index n if space in the configuration with
      * depth n is to be preserved.
      */
-    private final BitSet m_preserveSpace = new BitSet();
-    private Configuration m_configuration;
+    private final BitSet preserveSpace = new BitSet();
+    private Configuration configuration;
 
     public Configuration parse( Reader reader )
         throws Exception
@@ -49,20 +49,20 @@
                     createConfiguration( rawName, getLocationString() );
                 // depth of new configuration (not decrementing here, configuration
                 // is to be added)
-                final int depth = m_elements.size();
+                final int depth = elements.size();
                 boolean preserveSpace = false; // top level element trims space by default
 
                 if ( depth > 0 )
                 {
                     final DefaultConfiguration parent =
-                        (DefaultConfiguration) m_elements.get( depth - 1 );
+                        (DefaultConfiguration) elements.get( depth - 1 );
                     parent.addChild( configuration );
                     // inherits parent's space preservation policy
-                    preserveSpace = m_preserveSpace.get( depth - 1 );
+                    preserveSpace = this.preserveSpace.get( depth - 1 );
                 }
 
-                m_elements.add( configuration );
-                m_values.add( new StringBuffer() );
+                elements.add( configuration );
+                values.add( new StringBuffer() );
 
                 final int attributesSize = parser.getAttributeCount();
 
@@ -83,11 +83,11 @@
 
                 if ( preserveSpace )
                 {
-                    m_preserveSpace.set( depth );
+                    this.preserveSpace.set( depth );
                 }
                 else
                 {
-                    m_preserveSpace.clear( depth );
+                    this.preserveSpace.clear( depth );
                 }
             }
             else if ( eventType == XmlPullParser.TEXT )
@@ -96,23 +96,23 @@
                 // manual trimming and thus preserve some precious bits
                 // of memory, but it's really not important enough to justify
                 // resulting code complexity
-                final int depth = m_values.size() - 1;
-                final StringBuffer valueBuffer = (StringBuffer) m_values.get( depth );
+                final int depth = values.size() - 1;
+                final StringBuffer valueBuffer = (StringBuffer) values.get( depth );
                 valueBuffer.append( parser.getText() );
             }
             else if ( eventType == XmlPullParser.END_TAG )
             {
 
-                final int depth = m_elements.size() - 1;
+                final int depth = elements.size() - 1;
                 final DefaultConfiguration finishedConfiguration =
-                    (DefaultConfiguration) m_elements.remove( depth );
-                final String accumulatedValue = ( m_values.remove( depth ) ).toString();
+                    (DefaultConfiguration) elements.remove( depth );
+                final String accumulatedValue = ( values.remove( depth ) ).toString();
 
                 if ( finishedConfiguration.getChildren().length == 0 )
                 {
                     // leaf node
                     String finishedValue;
-                    if ( m_preserveSpace.get( depth ) )
+                    if ( preserveSpace.get( depth ) )
                     {
                         finishedValue = accumulatedValue;
                     }
@@ -139,14 +139,14 @@
 
                 if ( 0 == depth )
                 {
-                    m_configuration = finishedConfiguration;
+                    configuration = finishedConfiguration;
                 }
             }
 
             eventType = parser.next();
         }
 
-        return m_configuration;
+        return configuration;
     }
 
     /**
@@ -154,8 +154,8 @@
      */
     public void clear()
     {
-        m_elements.clear();
-        m_values.clear();
+        elements.clear();
+        values.clear();
     }
 
     /**