camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r1227217 - in /camel/branches/camel-2.9.x: ./ camel-core/src/main/java/org/apache/camel/builder/ camel-core/src/main/java/org/apache/camel/builder/xml/ camel-core/src/main/java/org/apache/camel/impl/osgi/tracker/ camel-core/src/main/java/or...
Date Wed, 04 Jan 2012 16:44:36 GMT
Author: davsclaus
Date: Wed Jan  4 16:44:34 2012
New Revision: 1227217

URL: http://svn.apache.org/viewvc?rev=1227217&view=rev
Log:
CAMEL-4796: Applied the for loop patch. Thanks to Babak for the patch.

Modified:
    camel/branches/camel-2.9.x/   (props changed)
    camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/builder/NotifyBuilder.java
    camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/builder/xml/DefaultNamespaceContext.java
    camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/impl/osgi/tracker/BundleTracker.java
    camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/util/jndi/JndiContext.java
    camel/branches/camel-2.9.x/camel-core/src/test/java/org/apache/camel/TestSupport.java
    camel/branches/camel-2.9.x/components/camel-core-xml/src/main/java/org/apache/camel/core/xml/scan/AntPathMatcher.java
    camel/branches/camel-2.9.x/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/HdfsConfiguration.java
    camel/branches/camel-2.9.x/components/camel-http/   (props changed)
    camel/branches/camel-2.9.x/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaProducer.java
    camel/branches/camel-2.9.x/components/camel-ldap/src/main/java/org/apache/camel/component/ldap/LdapProducer.java
    camel/branches/camel-2.9.x/components/camel-lucene/src/main/java/org/apache/camel/component/lucene/LuceneIndexer.java
    camel/branches/camel-2.9.x/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailUtils.java
    camel/branches/camel-2.9.x/components/camel-rmi/src/test/java/org/apache/camel/component/rmi/RmiConcurrencyTest.java
    camel/branches/camel-2.9.x/components/camel-rmi/src/test/java/org/apache/camel/component/rmi/RmiRouteTest.java
    camel/branches/camel-2.9.x/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppSubmitMultiCommand.java
    camel/branches/camel-2.9.x/components/camel-soap/src/main/java/org/apache/camel/dataformat/soap/SoapJaxbDataFormat.java
    camel/branches/camel-2.9.x/components/camel-soap/src/main/java/org/apache/camel/dataformat/soap/name/MethodInfo.java
    camel/branches/camel-2.9.x/components/camel-soap/src/main/java/org/apache/camel/dataformat/soap/name/ServiceInterfaceStrategy.java
    camel/branches/camel-2.9.x/components/camel-spring-security/src/test/java/org/apache/camel/component/spring/security/SpringSecurityAuthorizationPolicyTest.java
    camel/branches/camel-2.9.x/components/camel-test/src/main/java/org/apache/camel/test/TestSupport.java
    camel/branches/camel-2.9.x/components/camel-test/src/main/java/org/apache/camel/test/junit4/TestSupport.java
    camel/branches/camel-2.9.x/components/camel-testng/src/main/java/org/apache/camel/testng/TestSupport.java
    camel/branches/camel-2.9.x/examples/camel-example-reportincident-wssecurity/src/main/java/org/apache/camel/example/reportincident/UTPasswordCallback.java
    camel/branches/camel-2.9.x/tests/camel-itest/src/test/java/org/apache/camel/itest/http/HttpTestServer.java
    camel/branches/camel-2.9.x/tests/camel-itest/src/test/java/org/apache/camel/itest/security/KeystorePasswordCallback.java
    camel/branches/camel-2.9.x/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/DotMojo.java
    camel/branches/camel-2.9.x/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/RunMojo.java
    camel/branches/camel-2.9.x/tooling/maven/guice-maven-plugin/src/main/java/org/apache/camel/guice/maven/DotMojo.java
    camel/branches/camel-2.9.x/tooling/maven/guice-maven-plugin/src/main/java/org/apache/camel/guice/maven/RunMojo.java
    camel/branches/camel-2.9.x/tooling/maven/maven-html-to-pdf/src/main/java/org/apache/camel/maven/HtmlToPdfMojo.java

Propchange: camel/branches/camel-2.9.x/
------------------------------------------------------------------------------
    svn:mergeinfo = /camel/trunk:1227209

Propchange: camel/branches/camel-2.9.x/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed Jan  4 16:44:34 2012
@@ -1 +1 @@
-/camel/trunk:1-1227196
+/camel/trunk:1-1227196,1227209

Modified: camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/builder/NotifyBuilder.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/builder/NotifyBuilder.java?rev=1227217&r1=1227216&r2=1227217&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/builder/NotifyBuilder.java
(original)
+++ camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/builder/NotifyBuilder.java
Wed Jan  4 16:44:34 2012
@@ -19,7 +19,6 @@ package org.apache.camel.builder;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.EventObject;
-import java.util.Iterator;
 import java.util.List;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.TimeUnit;
@@ -1256,11 +1255,11 @@ public class NotifyBuilder {
     @Override
     public String toString() {
         StringBuilder sb = new StringBuilder();
-        for (Iterator<EventPredicateHolder> it = predicates.iterator(); it.hasNext();)
{
+        for (EventPredicateHolder eventPredicateHolder : predicates) {
             if (sb.length() > 0) {
                 sb.append(".");
             }
-            sb.append(it.next().toString());
+            sb.append(eventPredicateHolder.toString());
         }
         // a crude way of skipping the first invisible operation
         return ObjectHelper.after(sb.toString(), "().");
@@ -1609,11 +1608,11 @@ public class NotifyBuilder {
         @Override
         public String toString() {
             StringBuilder sb = new StringBuilder();
-            for (Iterator<EventPredicate> it = predicates.iterator(); it.hasNext();)
{
+            for (EventPredicate eventPredicate : predicates) {
                 if (sb.length() > 0) {
                     sb.append(".");
                 }
-                sb.append(it.next().toString());
+                sb.append(eventPredicate.toString());
             }
             return sb.toString();
         }

Modified: camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/builder/xml/DefaultNamespaceContext.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/builder/xml/DefaultNamespaceContext.java?rev=1227217&r1=1227216&r2=1227217&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/builder/xml/DefaultNamespaceContext.java
(original)
+++ camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/builder/xml/DefaultNamespaceContext.java
Wed Jan  4 16:44:34 2012
@@ -68,8 +68,7 @@ public class DefaultNamespaceContext imp
     }
 
     public String getPrefix(String namespaceURI) {
-        for (Iterator<Map.Entry<String, String>> iter = map.entrySet().iterator();
iter.hasNext();) {
-            Map.Entry<String, String> entry = iter.next();
+        for (Entry<String, String> entry : map.entrySet()) {
             if (namespaceURI.equals(entry.getValue())) {
                 return entry.getKey();
             }
@@ -82,8 +81,7 @@ public class DefaultNamespaceContext imp
 
     public Iterator<String> getPrefixes(String namespaceURI) {
         Set<String> set = new HashSet<String>();
-        for (Iterator<Map.Entry<String, String>> iter = map.entrySet().iterator();
iter.hasNext();) {
-            Map.Entry<String, String> entry = iter.next();
+        for (Entry<String, String> entry : map.entrySet()) {
             if (namespaceURI.equals(entry.getValue())) {
                 set.add(entry.getKey());
             }

Modified: camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/impl/osgi/tracker/BundleTracker.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/impl/osgi/tracker/BundleTracker.java?rev=1227217&r1=1227216&r2=1227217&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/impl/osgi/tracker/BundleTracker.java
(original)
+++ camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/impl/osgi/tracker/BundleTracker.java
Wed Jan  4 16:44:34 2012
@@ -204,8 +204,8 @@ public class BundleTracker implements Bu
             }
         }
         if (bundles != null) {
-            for (int i = 0; i < bundles.length; i++) {
-                outgoing.untrack(bundles[i], null);
+            for (Bundle bundle : bundles) {
+                outgoing.untrack(bundle, null);
             }
         }
     }

Modified: camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/util/jndi/JndiContext.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/util/jndi/JndiContext.java?rev=1227217&r1=1227216&r2=1227217&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/util/jndi/JndiContext.java
(original)
+++ camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/util/jndi/JndiContext.java
Wed Jan  4 16:44:34 2012
@@ -21,6 +21,7 @@ import java.util.HashMap;
 import java.util.Hashtable;
 import java.util.Iterator;
 import java.util.Map;
+import java.util.Map.Entry;
 
 import javax.naming.Binding;
 import javax.naming.CompositeName;
@@ -170,8 +171,7 @@ public class JndiContext implements Cont
             JndiContext defaultContext = (JndiContext)o;
             String remainder = name.substring(pos + 1);
             Map<String, Object> subBindings = defaultContext.internalBind(remainder,
value);
-            for (Iterator<Map.Entry<String, Object>> iterator = subBindings.entrySet().iterator();
iterator.hasNext();) {
-                Map.Entry<String, Object> entry = iterator.next();
+            for (Entry<String, Object> entry : subBindings.entrySet()) {
                 String subName = segment + "/" + entry.getKey();
                 Object bound = entry.getValue();
                 treeBindings.put(subName, bound);

Modified: camel/branches/camel-2.9.x/camel-core/src/test/java/org/apache/camel/TestSupport.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/camel-core/src/test/java/org/apache/camel/TestSupport.java?rev=1227217&r1=1227216&r2=1227217&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/camel-core/src/test/java/org/apache/camel/TestSupport.java
(original)
+++ camel/branches/camel-2.9.x/camel-core/src/test/java/org/apache/camel/TestSupport.java
Wed Jan  4 16:44:34 2012
@@ -423,8 +423,8 @@ public abstract class TestSupport extend
     public static void deleteDirectory(File file) {
         if (file.isDirectory()) {
             File[] files = file.listFiles();
-            for (int i = 0; i < files.length; i++) {
-                deleteDirectory(files[i]);
+            for (File child : files) {
+                deleteDirectory(child);
             }
         }
 

Modified: camel/branches/camel-2.9.x/components/camel-core-xml/src/main/java/org/apache/camel/core/xml/scan/AntPathMatcher.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/components/camel-core-xml/src/main/java/org/apache/camel/core/xml/scan/AntPathMatcher.java?rev=1227217&r1=1227216&r2=1227217&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/components/camel-core-xml/src/main/java/org/apache/camel/core/xml/scan/AntPathMatcher.java
(original)
+++ camel/branches/camel-2.9.x/components/camel-core-xml/src/main/java/org/apache/camel/core/xml/scan/AntPathMatcher.java
Wed Jan  4 16:44:34 2012
@@ -238,8 +238,8 @@ public class AntPathMatcher {
         char ch;
 
         boolean containsStar = false;
-        for (int i = 0; i < patArr.length; i++) {
-            if (patArr[i] == '*') {
+        for (char c : patArr) {
+            if (c == '*') {
                 containsStar = true;
                 break;
             }

Modified: camel/branches/camel-2.9.x/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/HdfsConfiguration.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/HdfsConfiguration.java?rev=1227217&r1=1227216&r2=1227217&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/HdfsConfiguration.java
(original)
+++ camel/branches/camel-2.9.x/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/HdfsConfiguration.java
Wed Jan  4 16:44:34 2012
@@ -147,8 +147,7 @@ public class HdfsConfiguration {
                 String eit = (String) hdfsSettings.get(key);
                 if (eit != null) {
                     String[] strstrategies = eit.split(",");
-                    for (int i = 0; i < strstrategies.length; i++) {
-                        String strstrategy = strstrategies[i];
+                    for (String strstrategy : strstrategies) {
                         String tokens[] = strstrategy.split(":");
                         if (tokens.length != 2) {
                             throw new IllegalArgumentException("Wrong Split Strategy " +
key + "=" + eit);

Propchange: camel/branches/camel-2.9.x/components/camel-http/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jan  4 16:44:34 2012
@@ -1 +1 @@
-/camel/trunk/components/camel-http:917526
+/camel/trunk/components/camel-http:917526,1227209

Modified: camel/branches/camel-2.9.x/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaProducer.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaProducer.java?rev=1227217&r1=1227216&r2=1227217&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaProducer.java
(original)
+++ camel/branches/camel-2.9.x/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaProducer.java
Wed Jan  4 16:44:34 2012
@@ -18,7 +18,6 @@ package org.apache.camel.component.jpa;
 
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.Iterator;
 import java.util.List;
 
 import javax.persistence.EntityManager;
@@ -63,8 +62,8 @@ public class JpaProducer extends Default
                         @SuppressWarnings("unchecked")
                         Collection<Object> collection = (Collection<Object>)
values;
                         List<Object> managedEntities = new ArrayList<Object>();
-                        for (Iterator<?> iter = collection.iterator(); iter.hasNext();)
{
-                            Object managedEntity = save(iter.next(), entityManager);
+                        for (Object entity : collection) {
+                            Object managedEntity = save(entity, entityManager);
                             managedEntities.add(managedEntity);
                         }
                         if (!endpoint.isUsePersist()) {

Modified: camel/branches/camel-2.9.x/components/camel-ldap/src/main/java/org/apache/camel/component/ldap/LdapProducer.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/components/camel-ldap/src/main/java/org/apache/camel/component/ldap/LdapProducer.java?rev=1227217&r1=1227216&r2=1227217&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/components/camel-ldap/src/main/java/org/apache/camel/component/ldap/LdapProducer.java
(original)
+++ camel/branches/camel-2.9.x/components/camel-ldap/src/main/java/org/apache/camel/component/ldap/LdapProducer.java
Wed Jan  4 16:44:34 2012
@@ -129,9 +129,9 @@ public class LdapProducer extends Defaul
 
         byte[] cookie = null;
         if (responseControls != null) {
-            for (int i = 0; i < responseControls.length; i++) {
-                if (responseControls[i] instanceof PagedResultsResponseControl) {
-                    PagedResultsResponseControl prrc = (PagedResultsResponseControl) responseControls[i];
+            for (Control responseControl : responseControls) {
+                if (responseControl instanceof PagedResultsResponseControl) {
+                    PagedResultsResponseControl prrc = (PagedResultsResponseControl) responseControl;
                     cookie = prrc.getCookie();
                 }
             }

Modified: camel/branches/camel-2.9.x/components/camel-lucene/src/main/java/org/apache/camel/component/lucene/LuceneIndexer.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/components/camel-lucene/src/main/java/org/apache/camel/component/lucene/LuceneIndexer.java?rev=1227217&r1=1227216&r2=1227217&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/components/camel-lucene/src/main/java/org/apache/camel/component/lucene/LuceneIndexer.java
(original)
+++ camel/branches/camel-2.9.x/components/camel-lucene/src/main/java/org/apache/camel/component/lucene/LuceneIndexer.java
Wed Jan  4 16:44:34 2012
@@ -119,8 +119,8 @@ public class LuceneIndexer {
                 String[] files = file.list();
 
                 if (files != null) {
-                    for (int i = 0; i < files.length; i++) {
-                        add(new File(file.getAbsolutePath() + "/" + files[i]));
+                    for (String child : files) {
+                        add(new File(file.getAbsolutePath() + "/" + child));
                     }
                 }
             } else {

Modified: camel/branches/camel-2.9.x/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailUtils.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailUtils.java?rev=1227217&r1=1227216&r2=1227217&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailUtils.java
(original)
+++ camel/branches/camel-2.9.x/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailUtils.java
Wed Jan  4 16:44:34 2012
@@ -174,8 +174,7 @@ public final class MailUtils {
         boolean replaced = false;
         StringBuilder sb = new StringBuilder();
         String[] parts = contentType.split(";");
-        for (int i = 0; i < parts.length; i++) {
-            String part = parts[i];
+        for (String part : parts) {
             part = part.trim();
             if (!part.startsWith("charset")) {
                 part = part.trim();
@@ -218,8 +217,7 @@ public final class MailUtils {
         }
 
         String[] parts = contentType.split(";");
-        for (int i = 0; i < parts.length; i++) {
-            String part = parts[i];
+        for (String part : parts) {
             part = part.trim();
             if (part.startsWith("charset")) {
                 return ObjectHelper.after(part, "charset=");

Modified: camel/branches/camel-2.9.x/components/camel-rmi/src/test/java/org/apache/camel/component/rmi/RmiConcurrencyTest.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/components/camel-rmi/src/test/java/org/apache/camel/component/rmi/RmiConcurrencyTest.java?rev=1227217&r1=1227216&r2=1227217&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/components/camel-rmi/src/test/java/org/apache/camel/component/rmi/RmiConcurrencyTest.java
(original)
+++ camel/branches/camel-2.9.x/components/camel-rmi/src/test/java/org/apache/camel/component/rmi/RmiConcurrencyTest.java
Wed Jan  4 16:44:34 2012
@@ -110,8 +110,8 @@ public class RmiConcurrencyTest extends 
         if (cl instanceof URLClassLoader) {
             URLClassLoader ucl = (URLClassLoader)cl;
             URL[] urls = ucl.getURLs();
-            for (int i = 0; i < urls.length; i++) {
-                if (urls[i].getPath().contains(" ")) {
+            for (URL url : urls) {
+                if (url.getPath().contains(" ")) {
                     System.err.println("=======================================================================");
                     System.err.println(" TEST Skipped: " + this.getClass().getName());
                     System.err.println("   Your probably on windows.  We detected that the
classpath");

Modified: camel/branches/camel-2.9.x/components/camel-rmi/src/test/java/org/apache/camel/component/rmi/RmiRouteTest.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/components/camel-rmi/src/test/java/org/apache/camel/component/rmi/RmiRouteTest.java?rev=1227217&r1=1227216&r2=1227217&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/components/camel-rmi/src/test/java/org/apache/camel/component/rmi/RmiRouteTest.java
(original)
+++ camel/branches/camel-2.9.x/components/camel-rmi/src/test/java/org/apache/camel/component/rmi/RmiRouteTest.java
Wed Jan  4 16:44:34 2012
@@ -90,8 +90,8 @@ public class RmiRouteTest extends Assert
         if (cl instanceof URLClassLoader) {
             URLClassLoader ucl = (URLClassLoader)cl;
             URL[] urls = ucl.getURLs();
-            for (int i = 0; i < urls.length; i++) {
-                if (urls[i].getPath().contains(" ")) {
+            for (URL url : urls) {
+                if (url.getPath().contains(" ")) {
                     System.err.println("=======================================================================");
                     System.err.println(" TEST Skipped: " + this.getClass().getName());
                     System.err.println("   Your probably on windows.  We detected that the
classpath");

Modified: camel/branches/camel-2.9.x/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppSubmitMultiCommand.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppSubmitMultiCommand.java?rev=1227217&r1=1227216&r2=1227217&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppSubmitMultiCommand.java
(original)
+++ camel/branches/camel-2.9.x/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppSubmitMultiCommand.java
Wed Jan  4 16:44:34 2012
@@ -56,8 +56,7 @@ public class SmppSubmitMultiCommand exte
         SubmitMulti[] submitMulties = createSubmitMulti(exchange);
         List<SubmitMultiResult> results = new ArrayList<SubmitMultiResult>(submitMulties.length);
         
-        for (int i = 0; i < submitMulties.length; i++) {
-            SubmitMulti submitMulti = submitMulties[i];
+        for (SubmitMulti submitMulti : submitMulties) {
             SubmitMultiResult result;
             log.debug("Sending multiple short messages for exchange id '{}'...", exchange.getExchangeId());
             

Modified: camel/branches/camel-2.9.x/components/camel-soap/src/main/java/org/apache/camel/dataformat/soap/SoapJaxbDataFormat.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/components/camel-soap/src/main/java/org/apache/camel/dataformat/soap/SoapJaxbDataFormat.java?rev=1227217&r1=1227216&r2=1227217&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/components/camel-soap/src/main/java/org/apache/camel/dataformat/soap/SoapJaxbDataFormat.java
(original)
+++ camel/branches/camel-2.9.x/components/camel-soap/src/main/java/org/apache/camel/dataformat/soap/SoapJaxbDataFormat.java
Wed Jan  4 16:44:34 2012
@@ -237,10 +237,8 @@ public class SoapJaxbDataFormat extends 
             Annotation[][] annotations = bi.getMethod().getParameterAnnotations();
 
             List<WebParam> webParams = new ArrayList<WebParam>();
-            for (int i = 0; i < annotations.length; i++) {
-                Annotation[] singleParameterAnnotations = annotations[i];
-                for (int j = 0; j < singleParameterAnnotations.length; j++) {
-                    Annotation annotation = singleParameterAnnotations[j];
+            for (Annotation[] singleParameterAnnotations : annotations) {
+                for (Annotation annotation : singleParameterAnnotations) {
                     if (annotation instanceof WebParam) {
                         webParams.add((WebParam)annotation);
                     }

Modified: camel/branches/camel-2.9.x/components/camel-soap/src/main/java/org/apache/camel/dataformat/soap/name/MethodInfo.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/components/camel-soap/src/main/java/org/apache/camel/dataformat/soap/name/MethodInfo.java?rev=1227217&r1=1227216&r2=1227217&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/components/camel-soap/src/main/java/org/apache/camel/dataformat/soap/name/MethodInfo.java
(original)
+++ camel/branches/camel-2.9.x/components/camel-soap/src/main/java/org/apache/camel/dataformat/soap/name/MethodInfo.java
Wed Jan  4 16:44:34 2012
@@ -50,17 +50,16 @@ public final class MethodInfo {
         this.out = out;
         
         this.inTypeMap = new HashMap<String, TypeInfo>();
-        for (int i = 0; i < in.length; i++) {
-            TypeInfo ti = in[i];
-            if (inTypeMap.containsKey(ti.getTypeName())
-                && (!(ti.getTypeName().equals("javax.xml.ws.Holder")))
-                && (!(inTypeMap.get(ti.getTypeName()).equals(ti.getElName())))) {
+        for (TypeInfo typeInfo : in) {
+            if (inTypeMap.containsKey(typeInfo.getTypeName())
+                && (!(typeInfo.getTypeName().equals("javax.xml.ws.Holder")))
+                && (!(inTypeMap.get(typeInfo.getTypeName()).equals(typeInfo.getElName()))))
{
                 throw new RuntimeCamelException("Ambiguous QName mapping. The type [ "
-                                                  + ti.getTypeName()
+                                                  + typeInfo.getTypeName()
                                                   + " ] is already mapped to a QName in this
method."
                                                   + " This is not supported.");         
         
             }
-            inTypeMap.put(in[i].getTypeName(), in[i]);
+            inTypeMap.put(typeInfo.getTypeName(), typeInfo);
         }
     }
 

Modified: camel/branches/camel-2.9.x/components/camel-soap/src/main/java/org/apache/camel/dataformat/soap/name/ServiceInterfaceStrategy.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/components/camel-soap/src/main/java/org/apache/camel/dataformat/soap/name/ServiceInterfaceStrategy.java?rev=1227217&r1=1227216&r2=1227217&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/components/camel-soap/src/main/java/org/apache/camel/dataformat/soap/name/ServiceInterfaceStrategy.java
(original)
+++ camel/branches/camel-2.9.x/components/camel-soap/src/main/java/org/apache/camel/dataformat/soap/name/ServiceInterfaceStrategy.java
Wed Jan  4 16:44:34 2012
@@ -110,10 +110,8 @@ public class ServiceInterfaceStrategy im
 
         List<WebParam> webParams = new ArrayList<WebParam>();
 
-        for (int i = 0; i < annotations.length; i++) {
-            Annotation[] singleParameterAnnotations = annotations[i];
-            for (int j = 0; j < singleParameterAnnotations.length; j++) {
-                Annotation annotation = singleParameterAnnotations[j];
+        for (Annotation[] singleParameterAnnotations : annotations) {
+            for (Annotation annotation : singleParameterAnnotations) {
                 if (annotation instanceof WebParam) {                   
                     webParams.add((WebParam) annotation);
                 }

Modified: camel/branches/camel-2.9.x/components/camel-spring-security/src/test/java/org/apache/camel/component/spring/security/SpringSecurityAuthorizationPolicyTest.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/components/camel-spring-security/src/test/java/org/apache/camel/component/spring/security/SpringSecurityAuthorizationPolicyTest.java?rev=1227217&r1=1227216&r2=1227217&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/components/camel-spring-security/src/test/java/org/apache/camel/component/spring/security/SpringSecurityAuthorizationPolicyTest.java
(original)
+++ camel/branches/camel-2.9.x/components/camel-spring-security/src/test/java/org/apache/camel/component/spring/security/SpringSecurityAuthorizationPolicyTest.java
Wed Jan  4 16:44:34 2012
@@ -89,8 +89,8 @@ public class SpringSecurityAuthorization
         Authentication authToken;
         if (roles != null && roles.length > 0) {
             List<GrantedAuthority> authorities = new ArrayList<GrantedAuthority>(roles.length);
-            for (int i = 0; i < roles.length; i++) {
-                authorities.add(new GrantedAuthorityImpl(roles[i]));
+            for (String role : roles) {
+                authorities.add(new GrantedAuthorityImpl(role));
             }
             authToken = new UsernamePasswordAuthenticationToken(username, password, authorities);
         } else {

Modified: camel/branches/camel-2.9.x/components/camel-test/src/main/java/org/apache/camel/test/TestSupport.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/components/camel-test/src/main/java/org/apache/camel/test/TestSupport.java?rev=1227217&r1=1227216&r2=1227217&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/components/camel-test/src/main/java/org/apache/camel/test/TestSupport.java
(original)
+++ camel/branches/camel-2.9.x/components/camel-test/src/main/java/org/apache/camel/test/TestSupport.java
Wed Jan  4 16:44:34 2012
@@ -423,8 +423,8 @@ public abstract class TestSupport extend
     public static void deleteDirectory(File file) {
         if (file.isDirectory()) {
             File[] files = file.listFiles();
-            for (int i = 0; i < files.length; i++) {
-                deleteDirectory(files[i]);
+            for (File child : files) {
+                deleteDirectory(child);
             }
         }
 

Modified: camel/branches/camel-2.9.x/components/camel-test/src/main/java/org/apache/camel/test/junit4/TestSupport.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/components/camel-test/src/main/java/org/apache/camel/test/junit4/TestSupport.java?rev=1227217&r1=1227216&r2=1227217&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/components/camel-test/src/main/java/org/apache/camel/test/junit4/TestSupport.java
(original)
+++ camel/branches/camel-2.9.x/components/camel-test/src/main/java/org/apache/camel/test/junit4/TestSupport.java
Wed Jan  4 16:44:34 2012
@@ -437,8 +437,8 @@ public abstract class TestSupport extend
         
         if (file.isDirectory()) {
             File[] files = file.listFiles();
-            for (int i = 0; i < files.length; i++) {
-                recursivelyDeleteDirectory(files[i]);
+            for (File child : files) {
+                recursivelyDeleteDirectory(child);
             }
         }
         boolean success = file.delete();

Modified: camel/branches/camel-2.9.x/components/camel-testng/src/main/java/org/apache/camel/testng/TestSupport.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/components/camel-testng/src/main/java/org/apache/camel/testng/TestSupport.java?rev=1227217&r1=1227216&r2=1227217&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/components/camel-testng/src/main/java/org/apache/camel/testng/TestSupport.java
(original)
+++ camel/branches/camel-2.9.x/components/camel-testng/src/main/java/org/apache/camel/testng/TestSupport.java
Wed Jan  4 16:44:34 2012
@@ -402,8 +402,8 @@ public abstract class TestSupport extend
     public static void deleteDirectory(File file) {
         if (file.isDirectory()) {
             File[] files = file.listFiles();
-            for (int i = 0; i < files.length; i++) {
-                deleteDirectory(files[i]);
+            for (File child : files) {
+                deleteDirectory(child);
             }
         }
 

Modified: camel/branches/camel-2.9.x/examples/camel-example-reportincident-wssecurity/src/main/java/org/apache/camel/example/reportincident/UTPasswordCallback.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/examples/camel-example-reportincident-wssecurity/src/main/java/org/apache/camel/example/reportincident/UTPasswordCallback.java?rev=1227217&r1=1227216&r2=1227217&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/examples/camel-example-reportincident-wssecurity/src/main/java/org/apache/camel/example/reportincident/UTPasswordCallback.java
(original)
+++ camel/branches/camel-2.9.x/examples/camel-example-reportincident-wssecurity/src/main/java/org/apache/camel/example/reportincident/UTPasswordCallback.java
Wed Jan  4 16:44:34 2012
@@ -46,8 +46,8 @@ public class UTPasswordCallback implemen
 
         String user = "";
 
-        for (int i = 0; i < callbacks.length; i++) {
-            WSPasswordCallback pc = (WSPasswordCallback) callbacks[i];
+        for (Callback callback : callbacks) {
+            WSPasswordCallback pc = (WSPasswordCallback) callback;
             user = pc.getIdentifier();
 
             String pass = passwords.get(user);

Modified: camel/branches/camel-2.9.x/tests/camel-itest/src/test/java/org/apache/camel/itest/http/HttpTestServer.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/tests/camel-itest/src/test/java/org/apache/camel/itest/http/HttpTestServer.java?rev=1227217&r1=1227216&r2=1227217&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/tests/camel-itest/src/test/java/org/apache/camel/itest/http/HttpTestServer.java
(original)
+++ camel/branches/camel-2.9.x/tests/camel-itest/src/test/java/org/apache/camel/itest/http/HttpTestServer.java
Wed Jan  4 16:44:34 2012
@@ -22,7 +22,6 @@ import java.net.ServerSocket;
 import java.net.Socket;
 import java.util.Collections;
 import java.util.HashSet;
-import java.util.Iterator;
 import java.util.Set;
 import java.util.concurrent.atomic.AtomicInteger;
 
@@ -279,8 +278,7 @@ public class HttpTestServer {
             t.shutdown();
         }
         synchronized (workers) {
-            for (Iterator<Worker> it = workers.iterator(); it.hasNext();) {
-                Worker worker = it.next();
+            for (Worker worker : workers) {
                 worker.shutdown();
             }
         }

Modified: camel/branches/camel-2.9.x/tests/camel-itest/src/test/java/org/apache/camel/itest/security/KeystorePasswordCallback.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/tests/camel-itest/src/test/java/org/apache/camel/itest/security/KeystorePasswordCallback.java?rev=1227217&r1=1227216&r2=1227217&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/tests/camel-itest/src/test/java/org/apache/camel/itest/security/KeystorePasswordCallback.java
(original)
+++ camel/branches/camel-2.9.x/tests/camel-itest/src/test/java/org/apache/camel/itest/security/KeystorePasswordCallback.java
Wed Jan  4 16:44:34 2012
@@ -45,8 +45,8 @@ public class KeystorePasswordCallback im
      * alias/passwords map.
      */
     public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException
{
-        for (int i = 0; i < callbacks.length; i++) {
-            WSPasswordCallback pc = (WSPasswordCallback)callbacks[i];
+        for (Callback callback : callbacks) {
+            WSPasswordCallback pc = (WSPasswordCallback)callback;
             String pass = passwords.get(pc.getIdentifier());
             String type = getPasswordType(pc);
             if (WSConstants.PASSWORD_DIGEST.equals(type)) {

Modified: camel/branches/camel-2.9.x/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/DotMojo.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/DotMojo.java?rev=1227217&r1=1227216&r2=1227217&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/DotMojo.java
(original)
+++ camel/branches/camel-2.9.x/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/DotMojo.java
Wed Jan  4 16:44:34 2012
@@ -324,8 +324,7 @@ public class DotMojo extends AbstractMav
         PrintWriter out = new PrintWriter(buffer);
         printHtmlHeader(out, contextName);
         printHtmlFileHeader(out, file);
-        for (int j = 0; j < graphvizOutputTypes.length; j++) {
-            String format = graphvizOutputTypes[j];
+        for (String format : graphvizOutputTypes) {
             String generated = convertFile(file, format);
 
             if (format.equals("cmapx") && generated != null) {

Modified: camel/branches/camel-2.9.x/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/RunMojo.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/RunMojo.java?rev=1227217&r1=1227216&r2=1227217&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/RunMojo.java
(original)
+++ camel/branches/camel-2.9.x/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/RunMojo.java
Wed Jan  4 16:44:34 2012
@@ -532,15 +532,13 @@ public class RunMojo extends AbstractExe
             // Interrupt all threads we know about as of this instant (harmless
             // if spuriously went dead (! isAlive())
             // or if something else interrupted it ( isInterrupted() ).
-            for (Iterator iter = threads.iterator(); iter.hasNext();) {
-                Thread thread = (Thread)iter.next();
+            for (Thread thread : threads) {
                 getLog().debug("interrupting thread " + thread);
                 thread.interrupt();
             }
             // Now join with a timeout and call stop() (assuming flags are set
             // right)
-            for (Iterator iter = threads.iterator(); iter.hasNext();) {
-                Thread thread = (Thread)iter.next();
+            for (Thread thread : threads) {
                 if (!thread.isAlive()) {
                     continue; // and, presumably it won't show up in
                     // getActiveThreads() next iteration
@@ -603,8 +601,7 @@ public class RunMojo extends AbstractExe
     private void setSystemProperties() {
         if (systemProperties != null) {
             originalSystemProperties = System.getProperties();
-            for (int i = 0; i < systemProperties.length; i++) {
-                Property systemProperty = systemProperties[i];
+            for (Property systemProperty : systemProperties) {
                 String value = systemProperty.getValue();
                 System.setProperty(systemProperty.getKey(), value == null ? "" : value);
             }
@@ -697,8 +694,7 @@ public class RunMojo extends AbstractExe
     private Collection<Artifact> getAllNonTestScopedDependencies() throws MojoExecutionException
{
         List<Artifact> answer = new ArrayList<Artifact>();
 
-        for (Iterator artifacts = getAllDependencies().iterator(); artifacts.hasNext();)
{
-            Artifact artifact = (Artifact)artifacts.next();
+        for (Artifact artifact : getAllDependencies()) {
 
             // do not add test artifacts
             if (!artifact.getScope().equals(Artifact.SCOPE_TEST)) {
@@ -808,8 +804,7 @@ public class RunMojo extends AbstractExe
         // this.getExecutableToolAssembly();
 
         Artifact executableTool = null;
-        for (Iterator iter = this.pluginDependencies.iterator(); iter.hasNext();) {
-            Artifact pluginDep = (Artifact)iter.next();
+        for (Artifact pluginDep : this.pluginDependencies) {
             if (this.executableDependency.matches(pluginDep)) {
                 executableTool = pluginDep;
                 break;

Modified: camel/branches/camel-2.9.x/tooling/maven/guice-maven-plugin/src/main/java/org/apache/camel/guice/maven/DotMojo.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/tooling/maven/guice-maven-plugin/src/main/java/org/apache/camel/guice/maven/DotMojo.java?rev=1227217&r1=1227216&r2=1227217&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/tooling/maven/guice-maven-plugin/src/main/java/org/apache/camel/guice/maven/DotMojo.java
(original)
+++ camel/branches/camel-2.9.x/tooling/maven/guice-maven-plugin/src/main/java/org/apache/camel/guice/maven/DotMojo.java
Wed Jan  4 16:44:34 2012
@@ -311,8 +311,7 @@ public class DotMojo extends AbstractMav
         PrintWriter out = new PrintWriter(buffer);
         printHtmlHeader(out, contextName);
         printHtmlFileHeader(out, file);
-        for (int j = 0; j < graphvizOutputTypes.length; j++) {
-            String format = graphvizOutputTypes[j];
+        for (String format : graphvizOutputTypes) {
             String generated = convertFile(file, format);
 
             if (format.equals("cmapx") && generated != null) {

Modified: camel/branches/camel-2.9.x/tooling/maven/guice-maven-plugin/src/main/java/org/apache/camel/guice/maven/RunMojo.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/tooling/maven/guice-maven-plugin/src/main/java/org/apache/camel/guice/maven/RunMojo.java?rev=1227217&r1=1227216&r2=1227217&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/tooling/maven/guice-maven-plugin/src/main/java/org/apache/camel/guice/maven/RunMojo.java
(original)
+++ camel/branches/camel-2.9.x/tooling/maven/guice-maven-plugin/src/main/java/org/apache/camel/guice/maven/RunMojo.java
Wed Jan  4 16:44:34 2012
@@ -486,15 +486,13 @@ public class RunMojo extends AbstractExe
             // Interrupt all threads we know about as of this instant (harmless
             // if spuriously went dead (! isAlive())
             // or if something else interrupted it ( isInterrupted() ).
-            for (Iterator iter = threads.iterator(); iter.hasNext();) {
-                Thread thread = (Thread)iter.next();
+            for (Thread thread : threads) {
                 getLog().debug("interrupting thread " + thread);
                 thread.interrupt();
             }
             // Now join with a timeout and call stop() (assuming flags are set
             // right)
-            for (Iterator iter = threads.iterator(); iter.hasNext();) {
-                Thread thread = (Thread)iter.next();
+            for (Thread thread : threads) {
                 if (!thread.isAlive()) {
                     continue; // and, presumably it won't show up in
                     // getActiveThreads() next iteration
@@ -557,8 +555,7 @@ public class RunMojo extends AbstractExe
     private void setSystemProperties() {
         if (systemProperties != null) {
             originalSystemProperties = System.getProperties();
-            for (int i = 0; i < systemProperties.length; i++) {
-                Property systemProperty = systemProperties[i];
+            for (Property systemProperty : systemProperties) {
                 String value = systemProperty.getValue();
                 System.setProperty(systemProperty.getKey(), value == null ? "" : value);
             }
@@ -651,8 +648,7 @@ public class RunMojo extends AbstractExe
     private Collection<Artifact> getAllNonTestScopedDependencies() throws MojoExecutionException
{
         List<Artifact> answer = new ArrayList<Artifact>();
 
-        for (Iterator artifacts = getAllDependencies().iterator(); artifacts.hasNext();)
{
-            Artifact artifact = (Artifact)artifacts.next();
+        for (Artifact artifact : getAllDependencies()) {
 
             // do not add test artifacts
             if (!artifact.getScope().equals(Artifact.SCOPE_TEST)) {
@@ -762,8 +758,7 @@ public class RunMojo extends AbstractExe
         // this.getExecutableToolAssembly();
 
         Artifact executableTool = null;
-        for (Iterator iter = this.pluginDependencies.iterator(); iter.hasNext();) {
-            Artifact pluginDep = (Artifact)iter.next();
+        for (Artifact pluginDep : this.pluginDependencies) {
             if (this.executableDependency.matches(pluginDep)) {
                 executableTool = pluginDep;
                 break;

Modified: camel/branches/camel-2.9.x/tooling/maven/maven-html-to-pdf/src/main/java/org/apache/camel/maven/HtmlToPdfMojo.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/tooling/maven/maven-html-to-pdf/src/main/java/org/apache/camel/maven/HtmlToPdfMojo.java?rev=1227217&r1=1227216&r2=1227217&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/tooling/maven/maven-html-to-pdf/src/main/java/org/apache/camel/maven/HtmlToPdfMojo.java
(original)
+++ camel/branches/camel-2.9.x/tooling/maven/maven-html-to-pdf/src/main/java/org/apache/camel/maven/HtmlToPdfMojo.java
Wed Jan  4 16:44:34 2012
@@ -194,9 +194,9 @@ public class HtmlToPdfMojo extends Abstr
         Argument arg;
 
         if (princeArgs != null) {
-            for (int i = 0; i < princeArgs.length; i++) {
+            for (String princeArg : princeArgs) {
                 arg = new Argument();
-                arg.setValue(princeArgs[i]);
+                arg.setValue(princeArg);
                 cl.addArg(arg);
             }
         }
@@ -259,8 +259,8 @@ public class HtmlToPdfMojo extends Abstr
             out.println(head);
         }
         if (styleSheets != null) {
-            for (int i = 0; i < styleSheets.length; i++) {
-                out.println("   <link href=\"" + styleSheets[i] + "\" rel=\"stylesheet\"
type=\"text/css\"/>");
+            for (String styleSheet : styleSheets) {
+                out.println("   <link href=\"" + styleSheet + "\" rel=\"stylesheet\" type=\"text/css\"/>");
             }
         }
         out.println("</head>");



Mime
View raw message