cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1332730 - in /cxf/branches/2.4.x-fixes: ./ common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
Date Tue, 01 May 2012 16:14:14 GMT
Author: dkulp
Date: Tue May  1 16:14:13 2012
New Revision: 1332730

URL: http://svn.apache.org/viewvc?rev=1332730&view=rev
Log:
Merged revisions 1332721 via  svn merge from
https://svn.apache.org/repos/asf/cxf/branches/2.5.x-fixes

........
  r1332721 | dkulp | 2012-05-01 12:09:13 -0400 (Tue, 01 May 2012) | 10 lines
  
  Merged revisions 1331472 via  git cherry-pick from
  https://svn.apache.org/repos/asf/cxf/trunk
  
  ........
    r1331472 | dkulp | 2012-04-27 11:38:28 -0400 (Fri, 27 Apr 2012) | 3 lines
  
    Use a singleton for another stateless object to avoid 100's of them
    being created.
  
  ........
........

Modified:
    cxf/branches/2.4.x-fixes/   (props changed)
    cxf/branches/2.4.x-fixes/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java

Propchange: cxf/branches/2.4.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.4.x-fixes/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java?rev=1332730&r1=1332729&r2=1332730&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
(original)
+++ cxf/branches/2.4.x-fixes/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
Tue May  1 16:14:13 2012
@@ -1129,13 +1129,7 @@ public final class StaxUtils {
                             return sysId;
                         }
                     };
-                    node.setUserData("location", loc2, new UserDataHandler() {
-                        public void handle(short operation, String key, Object data, Node
src, Node dst) {
-                            if (operation == NODE_CLONED) {
-                                dst.setUserData(key, data, this);
-                            }
-                        }
-                    });
+                    node.setUserData("location", loc2, LocationUserDataHandler.INSTANCE);
                 } catch (Exception ex) {
                     //possibly not DOM level 3, won't be able to record this then
                     return false;
@@ -1144,6 +1138,16 @@ public final class StaxUtils {
         }
         return recordLoc;
     }
+    
+    private static class LocationUserDataHandler implements UserDataHandler {
+        public static final LocationUserDataHandler INSTANCE = new LocationUserDataHandler();
+        
+        public void handle(short operation, String key, Object data, Node src, Node dst)
{
+            if (operation == NODE_CLONED) {
+                dst.setUserData(key, data, this);
+            }
+        }
+    }
 
     private static void declare(Element node, String uri, String prefix) {
         String qualname;



Mime
View raw message