Remove "this." prefixing and apply Felix Coding Standards

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@568652 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/scr/src/main/java/org/apache/felix/scr/parser/KXml2SAXParser.java b/scr/src/main/java/org/apache/felix/scr/parser/KXml2SAXParser.java
index 4e7714d..4c3765f 100644
--- a/scr/src/main/java/org/apache/felix/scr/parser/KXml2SAXParser.java
+++ b/scr/src/main/java/org/apache/felix/scr/parser/KXml2SAXParser.java
@@ -18,6 +18,7 @@
  */

 package org.apache.felix.scr.parser;

 

+

 import java.io.Reader;

 import java.util.Properties;

 

@@ -25,57 +26,70 @@
 import org.xmlpull.v1.XmlPullParser;

 import org.xmlpull.v1.XmlPullParserException;

 

+

 /**

  * The KXml2SAXParser extends the XmlParser from kxml. This is a very

  * simple parser that does not take into account the DTD

  *

  */

-public class KXml2SAXParser extends KXmlParser {

+public class KXml2SAXParser extends KXmlParser

+{

 

     /**

-	* The constructor for a parser, it receives a java.io.Reader.

-	*

-	* @param   reader  The reader

-	* @throws XmlPullParserException

-	*/

-	public KXml2SAXParser(Reader reader) throws XmlPullParserException {

-		super();

-	    this.setInput(reader);

-	    this.setFeature(FEATURE_PROCESS_NAMESPACES, true);

-	}

+    * The constructor for a parser, it receives a java.io.Reader.

+    *

+    * @param   reader  The reader

+    * @throws XmlPullParserException

+    */

+    public KXml2SAXParser( Reader reader ) throws XmlPullParserException

+    {

+        super();

+        setInput( reader );

+        setFeature( FEATURE_PROCESS_NAMESPACES, true );

+    }

 

-	/**

-	* Parser from the reader provided in the constructor, and call

-	* the startElement and endElement in a KxmlHandler

-	*

-	* @param   reader  The reader

-	* @exception   Exception thrown by the superclass

-	*/

-	public void parseXML(KXml2SAXHandler handler) throws Exception {

 

-		while (this.next() != XmlPullParser.END_DOCUMENT) {

-			handler.setLineNumber(this.getLineNumber());

-			handler.setColumnNumber(this.getColumnNumber());

-			if (this.getEventType() == XmlPullParser.START_TAG) {

-				Properties props = new Properties();

-				for (int i = 0; i < this.getAttributeCount(); i++) {

-					props.put(this.getAttributeName(i), this.getAttributeValue(i));

-				}

-				handler.startElement(

-					this.getNamespace(),

-					this.getName(),

-					props);

-			} else if (this.getEventType() == XmlPullParser.END_TAG) {

-				handler.endElement(this.getNamespace(), this.getName());

-			} else if (this.getEventType() == XmlPullParser.TEXT) {

-				String text = this.getText();

-				handler.characters(text);

-			} else if (this.getEventType() == XmlPullParser.PROCESSING_INSTRUCTION) {

-				// TODO extract the target from the evt.getText()

-				handler.processingInstruction(null,this.getText());

-			} else {

-				// do nothing

-			}

-		}

-	}

+    /**

+    * Parser from the reader provided in the constructor, and call

+    * the startElement and endElement in a KxmlHandler

+    *

+    * @param   reader  The reader

+    * @exception   Exception thrown by the superclass

+    */

+    public void parseXML( KXml2SAXHandler handler ) throws Exception

+    {

+

+        while ( next() != XmlPullParser.END_DOCUMENT )

+        {

+            handler.setLineNumber( getLineNumber() );

+            handler.setColumnNumber( getColumnNumber() );

+            if ( getEventType() == XmlPullParser.START_TAG )

+            {

+                Properties props = new Properties();

+                for ( int i = 0; i < getAttributeCount(); i++ )

+                {

+                    props.put( getAttributeName( i ), getAttributeValue( i ) );

+                }

+                handler.startElement( getNamespace(), getName(), props );

+            }

+            else if ( getEventType() == XmlPullParser.END_TAG )

+            {

+                handler.endElement( getNamespace(), getName() );

+            }

+            else if ( getEventType() == XmlPullParser.TEXT )

+            {

+                String text = getText();

+                handler.characters( text );

+            }

+            else if ( getEventType() == XmlPullParser.PROCESSING_INSTRUCTION )

+            {

+                // TODO extract the target from the evt.getText()

+                handler.processingInstruction( null, getText() );

+            }

+            else

+            {

+                // do nothing

+            }

+        }

+    }

 }