You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by ga...@apache.org on 2008/01/25 19:05:17 UTC

svn commit: r615290 - /geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-schema/src/main/java/org/apache/geronimo/schema/SchemaConversionUtils.java

Author: gawor
Date: Fri Jan 25 10:05:16 2008
New Revision: 615290

URL: http://svn.apache.org/viewvc?rev=615290&view=rev
Log:
a fix for a fix (GERONIMO-3782)

Modified:
    geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-schema/src/main/java/org/apache/geronimo/schema/SchemaConversionUtils.java

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-schema/src/main/java/org/apache/geronimo/schema/SchemaConversionUtils.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-schema/src/main/java/org/apache/geronimo/schema/SchemaConversionUtils.java?rev=615290&r1=615289&r2=615290&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-schema/src/main/java/org/apache/geronimo/schema/SchemaConversionUtils.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-schema/src/main/java/org/apache/geronimo/schema/SchemaConversionUtils.java Fri Jan 25 10:05:16 2008
@@ -292,8 +292,6 @@
         moveElements("validator-class", namespace, moveable, cursor);
         moveElements("init-param", namespace, moveable, cursor);
         
-        cursor.toParent();
-        cursor.toFirstChild();
         do {
             String name = cursor.getName().getLocalPart();
             if ("init-param".equals(name)) {
@@ -302,7 +300,7 @@
                 convertToTldInitParam(namespace, cursor, moveable);
                 cursor.pop();
             }
-        } while (cursor.toNextSibling());        
+        } while (cursor.toPrevSibling());      
     }
 
     public static void convertToTldVariable(String namespace, XmlCursor cursor, XmlCursor moveable) {
@@ -315,26 +313,24 @@
         moveElements("scope", namespace, moveable, cursor);
     }
 
-    public static void convertToJNDIEnvironmentRefsGroup(String namespace, XmlCursor cursor, XmlCursor moveable) {
+    public static void convertToJNDIEnvironmentRefsGroup(String namespace, XmlCursor cursor, XmlCursor moveable) {       
         moveElements("env-entry", namespace, moveable, cursor);
         moveElements("ejb-ref", namespace, moveable, cursor);
         moveElements("ejb-local-ref", namespace, moveable, cursor);
         moveElements("resource-ref", namespace, moveable, cursor);
         moveElements("resource-env-ref", namespace, moveable, cursor);
         moveElements("message-destination-ref", namespace, moveable, cursor);
-        
-        cursor.toParent();
-        cursor.toFirstChild();
+                
         do {
-            String name = cursor.getName().getLocalPart();            
-            if ("env-entry".equals(name)) {                
+            String name = cursor.getName().getLocalPart();
+            if ("env-entry".equals(name)) {
                 cursor.push();
                 cursor.toFirstChild();
                 convertToDescriptionGroup(namespace, cursor, moveable);
                 convertToEnvEntryGroup(namespace, cursor, moveable);
                 cursor.pop();
             }
-        } while (cursor.toNextSibling());        
+        } while (cursor.toPrevSibling());      
     }
 
     public static void convertToEnvEntryGroup(String namespace, XmlCursor cursor, XmlCursor moveable) {