You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by bv...@apache.org on 2012/02/11 11:43:46 UTC

svn commit: r1243024 - /camel/trunk/components/camel-spring-ws/src/main/java/org/apache/camel/component/spring/ws/SpringWebserviceProducer.java

Author: bvahdat
Date: Sat Feb 11 10:43:46 2012
New Revision: 1243024

URL: http://svn.apache.org/viewvc?rev=1243024&view=rev
Log:
CAMEL-4998: Optimized the CamelHttpsUrlConnectionMessageSender constructor.

Modified:
    camel/trunk/components/camel-spring-ws/src/main/java/org/apache/camel/component/spring/ws/SpringWebserviceProducer.java

Modified: camel/trunk/components/camel-spring-ws/src/main/java/org/apache/camel/component/spring/ws/SpringWebserviceProducer.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring-ws/src/main/java/org/apache/camel/component/spring/ws/SpringWebserviceProducer.java?rev=1243024&r1=1243023&r2=1243024&view=diff
==============================================================================
--- camel/trunk/components/camel-spring-ws/src/main/java/org/apache/camel/component/spring/ws/SpringWebserviceProducer.java (original)
+++ camel/trunk/components/camel-spring-ws/src/main/java/org/apache/camel/component/spring/ws/SpringWebserviceProducer.java Sat Feb 11 10:43:46 2012
@@ -160,27 +160,29 @@ public class SpringWebserviceProducer ex
 
                 @Override
                 public void doWith(Field field) throws IllegalArgumentException, IllegalAccessException {
-                    if (!Modifier.isStatic(field.getModifiers())) {
-                        String fieldName = field.getName();
-                        if ("logger".equals(fieldName) || "acceptGzipEncoding".equals(fieldName)) {
-                            // skip them
-                            return;
-                        }
-
-                        field.setAccessible(true);
-                        Object value = field.get(webServiceMessageSender);
-
-                        Field inheritedField;
-                        try {
-                            inheritedField = CamelHttpsUrlConnectionMessageSender.this.getClass().getSuperclass().getDeclaredField(fieldName);
-                        } catch (NoSuchFieldException e) {
-                            throw new IllegalArgumentException("Unexpected exception!", e);
-                        }
-
-                        inheritedField.setAccessible(true);
-                        inheritedField.set(CamelHttpsUrlConnectionMessageSender.this, value);
-                        LOG.trace("Populated the field {} with the value {}", value, fieldName);
+                    if (Modifier.isStatic(field.getModifiers())) {
+                        return;
                     }
+
+                    String fieldName = field.getName();
+                    if ("logger".equals(fieldName) || "acceptGzipEncoding".equals(fieldName)) {
+                        // skip them
+                        return;
+                    }
+
+                    field.setAccessible(true);
+                    Object value = field.get(webServiceMessageSender);
+
+                    Field inheritedField;
+                    try {
+                        inheritedField = CamelHttpsUrlConnectionMessageSender.this.getClass().getSuperclass().getDeclaredField(fieldName);
+                    } catch (NoSuchFieldException e) {
+                        throw new IllegalArgumentException("Unexpected exception!", e);
+                    }
+
+                    inheritedField.setAccessible(true);
+                    inheritedField.set(CamelHttpsUrlConnectionMessageSender.this, value);
+                    LOG.trace("Populated the field {} with the value {}", fieldName, value);
                 }
 
             });