You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ws.apache.org by ve...@apache.org on 2016/05/14 18:04:16 UTC
svn commit: r1743842 - in
/webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/stream/serializer:
Serializer.java SerializerBase.java ToStream.java ToXMLStream.java
Author: veithen
Date: Sat May 14 18:04:16 2016
New Revision: 1743842
URL: http://svn.apache.org/viewvc?rev=1743842&view=rev
Log:
Remove unused code.
Modified:
webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/stream/serializer/Serializer.java
webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/stream/serializer/SerializerBase.java
webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/stream/serializer/ToStream.java
webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/stream/serializer/ToXMLStream.java
Modified: webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/stream/serializer/Serializer.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/stream/serializer/Serializer.java?rev=1743842&r1=1743841&r2=1743842&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/stream/serializer/Serializer.java (original)
+++ webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/stream/serializer/Serializer.java Sat May 14 18:04:16 2016
@@ -19,7 +19,7 @@
* $Id$
*/
package org.apache.axiom.core.stream.serializer;
-import java.io.IOException;
+
import java.io.OutputStream;
import java.io.Writer;
import java.util.Properties;
@@ -172,17 +172,5 @@ public interface Serializer {
* @return The output format key/value pairs in use.
*/
public Properties getOutputFormat();
-
- /**
- * This method resets the serializer.
- * If this method returns true, the
- * serializer may be used for subsequent serialization of new
- * documents. It is possible to change the output format and
- * output stream prior to serializing, or to reuse the existing
- * output format and output stream or writer.
- *
- * @return True if serializer has been reset and can be reused
- */
- public boolean reset();
}
Modified: webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/stream/serializer/SerializerBase.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/stream/serializer/SerializerBase.java?rev=1743842&r1=1743841&r2=1743842&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/stream/serializer/SerializerBase.java (original)
+++ webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/stream/serializer/SerializerBase.java Sat May 14 18:04:16 2016
@@ -552,38 +552,6 @@ public abstract class SerializerBase
}
- public boolean reset()
- {
- resetSerializerBase();
- return true;
- }
-
- /**
- * Reset all of the fields owned by SerializerBase
- *
- */
- private void resetSerializerBase()
- {
- this.m_cdataTagOpen = false;
- this.m_docIsEmpty = true;
- this.m_doctypePublic = null;
- this.m_doctypeSystem = null;
- this.m_elemContext = new ElemContext();
- this.m_mediatype = null;
- this.m_needToOutputDocTypeDecl = false;
- if (m_OutputProps != null)
- this.m_OutputProps.clear();
- if (m_OutputPropsDefault != null)
- this.m_OutputPropsDefault.clear();
- this.m_shouldNotWriteXMLHeader = false;
- this.m_sourceLocator = null;
- this.m_standalone = null;
- this.m_standaloneWasSpecified = false;
- this.m_version = null;
- // don't set writer to null, so that it might be re-used
- //this.m_writer = null;
- }
-
/**
* Returns true if the serializer is used for temporary output rather than
* final output.
Modified: webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/stream/serializer/ToStream.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/stream/serializer/ToStream.java?rev=1743842&r1=1743841&r2=1743842&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/stream/serializer/ToStream.java (original)
+++ webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/stream/serializer/ToStream.java Sat May 14 18:04:16 2016
@@ -1894,52 +1894,6 @@ abstract public class ToStream extends S
}
/**
- * Try's to reset the super class and reset this class for
- * re-use, so that you don't need to create a new serializer
- * (mostly for performance reasons).
- *
- * @return true if the class was successfuly reset.
- */
- public boolean reset()
- {
- boolean wasReset = false;
- if (super.reset())
- {
- resetToStream();
- wasReset = true;
- }
- return wasReset;
- }
-
- /**
- * Reset all of the fields owned by ToStream class
- *
- */
- private void resetToStream()
- {
- this.m_cdataStartCalled = false;
- /* The stream is being reset. It is one of
- * ToXMLStream, ToHTMLStream ... and this type can't be changed
- * so neither should m_charInfo which is associated with the
- * type of Stream. Just leave m_charInfo as-is for the next re-use.
- *
- */
- // this.m_charInfo = null; // don't set to null
- // this.m_encodingInfo = null; // don't set to null
-
- // Leave m_format alone for now - Brian M.
- // this.m_format = null;
- this.m_inDoctype = false;
- this.m_isUTF8 = false; // ?? used anywhere ??
- this.m_lineSep = s_systemLineSep;
- this.m_lineSepLen = s_systemLineSep.length;
- this.m_lineSepUse = true;
- // this.m_outputStream = null; // Don't reset it may be re-used
- this.m_spaceBeforeClose = false;
- this.m_writer_set_by_user = false;
- }
-
- /**
* Sets the character encoding coming from the xsl:output encoding stylesheet attribute.
* @param encoding the character encoding
*/
Modified: webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/stream/serializer/ToXMLStream.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/stream/serializer/ToXMLStream.java?rev=1743842&r1=1743841&r2=1743842&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/stream/serializer/ToXMLStream.java (original)
+++ webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/stream/serializer/ToXMLStream.java Sat May 14 18:04:16 2016
@@ -57,34 +57,6 @@ public class ToXMLStream extends ToStrea
}
/**
- * Copy properties from another SerializerToXML.
- *
- * @param xmlListener non-null reference to a SerializerToXML object.
- */
- public void CopyFrom(ToXMLStream xmlListener)
- {
-
- setWriterInternal(xmlListener.m_writer, m_writer_set_by_user);
-
-
- // m_outputStream = xmlListener.m_outputStream;
- String encoding = xmlListener.getEncoding();
- setEncoding(encoding);
-
- setOmitXMLDeclaration(xmlListener.getOmitXMLDeclaration());
-
- m_needToOutputDocTypeDecl = xmlListener.m_needToOutputDocTypeDecl;
- setDoctypeSystem(xmlListener.getDoctypeSystem());
- setDoctypePublic(xmlListener.getDoctypePublic());
- setStandalone(xmlListener.getStandalone());
- setMediaType(xmlListener.getMediaType());
- m_encodingInfo = xmlListener.m_encodingInfo;
- m_spaceBeforeClose = xmlListener.m_spaceBeforeClose;
- m_cdataStartCalled = xmlListener.m_cdataStartCalled;
-
- }
-
- /**
* Receive notification of the beginning of a document.
*
* @throws StreamException Any SAX exception, possibly
@@ -243,38 +215,6 @@ public class ToXMLStream extends ToStrea
}
/**
- * Try's to reset the super class and reset this class for
- * re-use, so that you don't need to create a new serializer
- * (mostly for performance reasons).
- *
- * @return true if the class was successfuly reset.
- */
- public boolean reset()
- {
- boolean wasReset = false;
- if (super.reset())
- {
- // Make this call when resetToXMLStream does
- // something.
- // resetToXMLStream();
- wasReset = true;
- }
- return wasReset;
- }
-
- /**
- * Reset all of the fields owned by ToStream class
- *
- */
- private void resetToXMLStream()
- {
- // This is an empty method, but is kept for future use
- // as a place holder for a location to reset fields
- // defined within this class
- return;
- }
-
- /**
* This method checks for the XML version of output document.
* If XML version of output document is not specified, then output
* document is of version XML 1.0.