You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-commits@axis.apache.org by ve...@apache.org on 2010/11/12 23:31:21 UTC

svn commit: r1034587 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/AxisDescription.java

Author: veithen
Date: Fri Nov 12 22:31:21 2010
New Revision: 1034587

URL: http://svn.apache.org/viewvc?rev=1034587&view=rev
Log:
Eliminated another deprecation warning caused by the usage of OMNode#serialize(Writer) [the serialize(Writer) method is only meaningful for OMContainers].

Modified:
    axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/AxisDescription.java

Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/AxisDescription.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/AxisDescription.java?rev=1034587&r1=1034586&r2=1034587&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/AxisDescription.java (original)
+++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/AxisDescription.java Fri Nov 12 22:31:21 2010
@@ -183,13 +183,13 @@ public abstract class AxisDescription im
 
     public String getDocumentation() {
         if (documentation != null) {
-            if (documentation.getType() == OMNode.TEXT_NODE) {
+            if (documentation instanceof OMText) {
                 return ((OMText)documentation).getText();
-            } else {
+            } else if (documentation instanceof OMElement) {
                 StringWriter writer = new StringWriter();
                 documentation.build();
                 try {
-                    documentation.serialize(writer);
+                    ((OMElement)documentation).serialize(writer);
                 } catch (XMLStreamException e) {
                     log.error(e);
                 }