cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r834646 - in /cxf/branches/2.2.x-fixes: ./ rt/core/src/main/java/org/apache/cxf/interceptor/FIStaxOutInterceptor.java rt/core/src/main/java/org/apache/cxf/interceptor/WrappedOutInterceptor.java
Date Tue, 10 Nov 2009 20:13:03 GMT
Author: dkulp
Date: Tue Nov 10 20:13:03 2009
New Revision: 834646

URL: http://svn.apache.org/viewvc?rev=834646&view=rev
Log:
Merged revisions 834644 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r834644 | dkulp | 2009-11-10 15:09:46 -0500 (Tue, 10 Nov 2009) | 2 lines
  
  [CXF-2530] Try some pre-interned strings first to avoid StringBuilder
  creation and concats and such.
........

Modified:
    cxf/branches/2.2.x-fixes/   (props changed)
    cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/FIStaxOutInterceptor.java
    cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/WrappedOutInterceptor.java

Propchange: cxf/branches/2.2.x-fixes/
            ('svn:mergeinfo' removed)

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

Modified: cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/FIStaxOutInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/FIStaxOutInterceptor.java?rev=834646&r1=834645&r2=834646&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/FIStaxOutInterceptor.java
(original)
+++ cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/FIStaxOutInterceptor.java
Tue Nov 10 20:13:03 2009
@@ -53,10 +53,6 @@
         this();
         force = f;
     }
-    protected boolean isRequestor(Message message) {
-        return Boolean.TRUE.equals(message.containsKey(Message.REQUESTOR_ROLE));
-    }
-    
     
     public void handleMessage(Message message) {
         XMLStreamWriter writer = message.getContent(XMLStreamWriter.class);

Modified: cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/WrappedOutInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/WrappedOutInterceptor.java?rev=834646&r1=834645&r2=834646&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/WrappedOutInterceptor.java
(original)
+++ cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/WrappedOutInterceptor.java
Tue Nov 10 20:13:03 2009
@@ -36,6 +36,11 @@
 
 public class WrappedOutInterceptor extends AbstractOutDatabindingInterceptor {
     private static final ResourceBundle BUNDLE = BundleUtils.getBundle(WrappedOutInterceptor.class);
+    private static final String DEF_PREFIXES[] = new String[] {
+        "ns1".intern(), "ns2".intern(), "ns3".intern(),
+        "ns4".intern(), "ns5".intern(), "ns6".intern(),
+        "ns7".intern(), "ns8".intern(), "ns9".intern()
+    };
 
     private WrappedOutEndingInterceptor ending = new WrappedOutEndingInterceptor();
     
@@ -70,12 +75,21 @@
                     pfx = service.getDataBinding().getDeclaredNamespaceMappings().get(name.getNamespaceURI());
                 }
                 if (pfx == null) {
-                    int x = 1;
-                    while (!StringUtils.isEmpty(xmlWriter.getNamespaceContext()
-                                                     .getNamespaceURI("ns" + x))) {
-                        x++;
+                    for (String t : DEF_PREFIXES) {
+                        if (!StringUtils.isEmpty(xmlWriter.getNamespaceContext()
+                                                     .getNamespaceURI(t))) {
+                            pfx = t;
+                            break;
+                        }
+                    }
+                    if (pfx == null) {    
+                        int x = 10;
+                        while (!StringUtils.isEmpty(xmlWriter.getNamespaceContext()
+                                                         .getNamespaceURI("ns" + x))) {
+                            x++;
+                        }
+                        pfx = "ns" + x;
                     }
-                    pfx = "ns" + x;
                 }
                 xmlWriter.setPrefix(pfx, name.getNamespaceURI());
                 xmlWriter.writeStartElement(pfx, name.getLocalPart(), name.getNamespaceURI());



Mime
View raw message