You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by di...@apache.org on 2005/12/29 14:40:42 UTC
svn commit: r359786 -
/webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/OMElementImpl.java
Author: dims
Date: Thu Dec 29 05:40:40 2005
New Revision: 359786
URL: http://svn.apache.org/viewcvs?rev=359786&view=rev
Log:
get rid of getLogger() stuff. seems like too much effort, better to throw a RuntimeException.
Modified:
webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/OMElementImpl.java
Modified: webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/OMElementImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/OMElementImpl.java?rev=359786&r1=359785&r2=359786&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/OMElementImpl.java (original)
+++ webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/OMElementImpl.java Thu Dec 29 05:40:40 2005
@@ -52,8 +52,6 @@
*/
public class OMElementImpl extends OMNodeImpl
implements OMElement, OMConstants, OMContainerEx {
-
- private Log logger;
/**
* Field ns
*/
@@ -96,7 +94,6 @@
}
this.builder = builder;
firstChild = null;
- getLogger();
}
@@ -125,7 +122,6 @@
if (ns != null) {
setNamespace(ns);
}
- getLogger();
}
/**
@@ -820,11 +816,8 @@
try {
this.serialize(baos);
} catch (XMLStreamException e) {
- // can not throw out an exception here. Can't do anything other than logging
- // and swallowing this :(
- logger.error("Can not serialize OM Element " + this.getLocalName(), e);
+ throw new RuntimeException("Can not serialize OM Element " + this.getLocalName(), e);
}
-
return new String(baos.toByteArray());
}
@@ -857,16 +850,5 @@
OMElement clonedElement = new StAXOMBuilder(this.getXMLStreamReader(true)).getDocumentElement();
clonedElement.build();
return clonedElement;
- }
-
- public Log getLogger() {
- if (logger == null) {
- if (parent != null && parent instanceof OMElementImpl) {
- logger = ((OMElementImpl) parent).getLogger();
- }else {
- logger = LogFactory.getLog(getClass());
- }
- }
- return logger;
}
}