You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by sc...@apache.org on 2007/09/13 22:18:12 UTC

svn commit: r575433 - in /webservices/commons/trunk/modules/axiom/modules: axiom-api/src/main/java/org/apache/axiom/om/util/CopyUtils.java axiom-tests/src/test/java/org/apache/axiom/om/util/CopyUtilsTest.java

Author: scheu
Date: Thu Sep 13 13:18:10 2007
New Revision: 575433

URL: http://svn.apache.org/viewvc?rev=575433&view=rev
Log:
WSCOMMONS-244
Contributor:Michal Stochmialek
CopyUtils code was using a JDK 1.5 method

Modified:
    webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/util/CopyUtils.java
    webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/util/CopyUtilsTest.java

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/util/CopyUtils.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/util/CopyUtils.java?rev=575433&r1=575432&r2=575433&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/util/CopyUtils.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/util/CopyUtils.java Thu Sep 13 13:18:10 2007
@@ -166,7 +166,7 @@
             copyOMComment(factory, targetParent, (OMComment) sourceNode);
         } else {
             throw new OMException("Internal Failure: Cannot make a copy of "
-                    + sourceNode.getClass().getCanonicalName());
+                    + sourceNode.getClass().getName());
         }
     }
 
@@ -325,7 +325,7 @@
             copyOMComment(factory, targetFault, (OMComment) sourceNode);
         } else {
             throw new OMException("Internal Failure: Cannot make a copy of "
-                    + sourceNode.getClass().getCanonicalName() + " object found in a SOAPFault.");
+                    + sourceNode.getClass().getName() + " object found in a SOAPFault.");
         }
     }
 

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/util/CopyUtilsTest.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/util/CopyUtilsTest.java?rev=575433&r1=575432&r2=575433&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/util/CopyUtilsTest.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/util/CopyUtilsTest.java Thu Sep 13 13:18:10 2007
@@ -142,12 +142,12 @@
      * @param depth
      */
     protected void identityCheck(OMNode source, OMNode target, String depth) {
-        // System.out.println(depth + source.getClass().getCanonicalName());
+        // System.out.println(depth + source.getClass().getName());
         if (source instanceof OMElement) {
             
             if (source instanceof OMSourcedElement) {
-                assertTrue("Source = " + source.getClass().getCanonicalName() + 
-                           "Target = " + target.getClass().getCanonicalName(),
+                assertTrue("Source = " + source.getClass().getName() + 
+                           "Target = " + target.getClass().getName(),
                            target instanceof OMSourcedElement);
                 assertTrue("Source Expansion = " +((OMSourcedElement)source).isExpanded() +
                            "Target Expansion = " + ((OMSourcedElement)target).isExpanded(),
@@ -165,10 +165,10 @@
                                i.hasNext() == j.hasNext());
                 }
             } else {
-                assertTrue("Source = " + source.getClass().getCanonicalName() + 
-                           "Target = " + target.getClass().getCanonicalName(),
-                           source.getClass().getCanonicalName().equals(
-                           target.getClass().getCanonicalName()));
+                assertTrue("Source = " + source.getClass().getName() + 
+                           "Target = " + target.getClass().getName(),
+                           source.getClass().getName().equals(
+                           target.getClass().getName()));
                 Iterator i = ((OMElement) source).getChildren();
                 Iterator j = ((OMElement) target).getChildren();
                 while(i.hasNext() && j.hasNext()) {
@@ -180,10 +180,10 @@
                            i.hasNext() == j.hasNext());
             }
         } else {
-            assertTrue("Source = " + source.getClass().getCanonicalName() + 
-                   "Target = " + target.getClass().getCanonicalName(),
-                   source.getClass().getCanonicalName().equals(
-                   target.getClass().getCanonicalName()));
+            assertTrue("Source = " + source.getClass().getName() + 
+                   "Target = " + target.getClass().getName(),
+                   source.getClass().getName().equals(
+                   target.getClass().getName()));
         }
     }
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org