Author: ningjiang
Date: Sun May 11 03:37:45 2008
New Revision: 655296
URL: http://svn.apache.org/viewvc?rev=655296&view=rev
Log:
Fix the CS errors
Modified:
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/FileConsumer.java
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/MoveFilesToDirectoryTest.java
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/MoveFilesToDirectoryWithNoopTest.java
activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsProducer.java
activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConfiguration.java
activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConsumer.java
activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailEndpoint.java
activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/security/DummySSLSocketFactory.java
activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/security/DummyTrustManager.java
activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailDefaultDelayForMailConsumeTest.java
activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/SpringCamelContext.java
activemq/camel/trunk/components/camel-spring/src/main/resources/META-INF/spring.schemas
activemq/camel/trunk/components/camel-velocity/src/main/java/org/apache/camel/component/velocity/VelocityEndpoint.java
activemq/camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/jms/JmsMediumQueuePerformanceTest.java
activemq/camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/jms/JmsPerformanceTest.java
activemq/camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/jms/StopWatch.java
Modified:
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/FileConsumer.java
URL:
http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/FileConsumer.java?rev=655296&r1=655295&r2=655296&view=diff
==============================================================================
---
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/FileConsumer.java
(original)
+++
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/FileConsumer.java
Sun May 11 03:37:45 2008
@@ -45,7 +45,7 @@
private long lastPollTime;
private int unchangedDelay;
private boolean unchangedSize;
-
+
public FileConsumer(final FileEndpoint endpoint, Processor processor) {
super(endpoint, processor);
@@ -191,8 +191,7 @@
Long value = fileSizes.get(file);
if (value == null) {
sizeCheck = true;
- }
- else {
+ } else {
sizeCheck = file.length() != value;
}
}
Modified:
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/MoveFilesToDirectoryTest.java
URL:
http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/MoveFilesToDirectoryTest.java?rev=655296&r1=655295&r2=655296&view=diff
==============================================================================
---
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/MoveFilesToDirectoryTest.java
(original)
+++
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/MoveFilesToDirectoryTest.java
Sun May 11 03:37:45 2008
@@ -31,7 +31,7 @@
protected String outputDirectory = testDirectory + "/output";
protected String fileName = "foo.txt";
protected Object expectedBody = "Hello there!";
- protected boolean noop = false;
+ protected boolean noop;
public void testFileRoute() throws Exception {
template.sendBodyAndHeader("file:" + inputDirectory, expectedBody,
FileComponent.HEADER_FILE_NAME, fileName);
@@ -53,7 +53,7 @@
File outDir = new File(outputDirectory);
outDir.mkdirs();
-
+
File newFile = new File(outDir, fileName);
assertFileExists(file);
Modified:
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/MoveFilesToDirectoryWithNoopTest.java
URL:
http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/MoveFilesToDirectoryWithNoopTest.java?rev=655296&r1=655295&r2=655296&view=diff
==============================================================================
---
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/MoveFilesToDirectoryWithNoopTest.java
(original)
+++
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/MoveFilesToDirectoryWithNoopTest.java
Sun May 11 03:37:45 2008
@@ -1,5 +1,4 @@
/**
- *
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
@@ -7,7 +6,7 @@
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
Modified:
activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsProducer.java
URL:
http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsProducer.java?rev=655296&r1=655295&r2=655296&view=diff
==============================================================================
---
activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsProducer.java
(original)
+++
activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsProducer.java
Sun May 11 03:37:45 2008
@@ -94,30 +94,31 @@
protected void testAndSetRequestor() throws RuntimeCamelException {
if (!started.get()) {
synchronized (this) {
- if (!started.get()) {
- try {
- JmsConfiguration c = endpoint.getConfiguration();
- if (c.getReplyTo() != null) {
- requestor = new
PersistentReplyToRequestor(endpoint.getConfiguration(),
-
endpoint.getExecutorService());
+ if (started.get()) {
+ return;
+ }
+ try {
+ JmsConfiguration c = endpoint.getConfiguration();
+ if (c.getReplyTo() != null) {
+ requestor = new
PersistentReplyToRequestor(endpoint.getConfiguration(), endpoint
+ .getExecutorService());
+ requestor.start();
+ } else {
+ if (affinity == RequestorAffinity.PER_PRODUCER) {
+ requestor = new
Requestor(endpoint.getConfiguration(), endpoint
+ .getExecutorService());
requestor.start();
- } else {
- if (affinity == RequestorAffinity.PER_PRODUCER) {
- requestor = new
Requestor(endpoint.getConfiguration(),
-
endpoint.getExecutorService());
- requestor.start();
- } else if (affinity ==
RequestorAffinity.PER_ENDPOINT) {
- requestor = endpoint.getRequestor();
- } else if (affinity ==
RequestorAffinity.PER_COMPONENT) {
- requestor =
((JmsComponent)endpoint.getComponent()).getRequestor();
- }
+ } else if (affinity == RequestorAffinity.PER_ENDPOINT)
{
+ requestor = endpoint.getRequestor();
+ } else if (affinity ==
RequestorAffinity.PER_COMPONENT) {
+ requestor =
((JmsComponent)endpoint.getComponent()).getRequestor();
}
- } catch (Exception e) {
- throw new FailedToCreateProducerException(endpoint, e);
}
- deferredRequestReplyMap =
requestor.getDeferredRequestReplyMap(this);
- started.set(true);
+ } catch (Exception e) {
+ throw new FailedToCreateProducerException(endpoint, e);
}
+ deferredRequestReplyMap =
requestor.getDeferredRequestReplyMap(this);
+ started.set(true);
}
}
}
Modified:
activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConfiguration.java
URL:
http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConfiguration.java?rev=655296&r1=655295&r2=655296&view=diff
==============================================================================
---
activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConfiguration.java
(original)
+++
activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConfiguration.java
Sun May 11 03:37:45 2008
@@ -20,10 +20,11 @@
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
+
+import javax.mail.Authenticator;
import javax.mail.Message;
-import javax.mail.Session;
import javax.mail.PasswordAuthentication;
-import javax.mail.Authenticator;
+import javax.mail.Session;
import org.apache.camel.component.mail.security.DummySSLSocketFactory;
import org.springframework.mail.javamail.JavaMailSenderImpl;
Modified:
activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConsumer.java
URL:
http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConsumer.java?rev=655296&r1=655295&r2=655296&view=diff
==============================================================================
---
activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConsumer.java
(original)
+++
activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConsumer.java
Sun May 11 03:37:45 2008
@@ -37,8 +37,8 @@
* @version $Revision$
*/
public class MailConsumer extends ScheduledPollConsumer<MailExchange> {
- private static final transient Log LOG =
LogFactory.getLog(MailConsumer.class);
public static final long DEFAULT_CONSUMER_DELAY = 60 * 1000L;
+ private static final transient Log LOG =
LogFactory.getLog(MailConsumer.class);
private final MailEndpoint endpoint;
private final JavaMailSenderImpl sender;
@@ -72,8 +72,8 @@
ensureIsConnected();
if (store == null || folder == null) {
- throw new IllegalStateException("MailConsumer did not connect
properly to the MailStore: " +
- endpoint.getConfiguration().getMailStoreLogInformation());
+ throw new IllegalStateException("MailConsumer did not connect
properly to the MailStore: "
+ +
endpoint.getConfiguration().getMailStoreLogInformation());
}
if (LOG.isDebugEnabled()) {
Modified:
activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailEndpoint.java
URL:
http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailEndpoint.java?rev=655296&r1=655295&r2=655296&view=diff
==============================================================================
---
activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailEndpoint.java
(original)
+++
activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailEndpoint.java
Sun May 11 03:37:45 2008
@@ -54,8 +54,8 @@
public Consumer<MailExchange> createConsumer(Processor processor) throws
Exception {
if (configuration.getProtocol().startsWith("smtp")) {
- throw new IllegalArgumentException("Protocol " +
configuration.getProtocol() +
- " can not be used for a MailConsumer. Please use another
protocol such as pop3 or imap.");
+ throw new IllegalArgumentException("Protocol " +
configuration.getProtocol()
+ + " can not be used for a MailConsumer. Please use another
protocol such as pop3 or imap.");
}
JavaMailSenderImpl sender = configuration.createJavaMailSender();
Modified:
activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/security/DummySSLSocketFactory.java
URL:
http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/security/DummySSLSocketFactory.java?rev=655296&r1=655295&r2=655296&view=diff
==============================================================================
---
activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/security/DummySSLSocketFactory.java
(original)
+++
activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/security/DummySSLSocketFactory.java
Sun May 11 03:37:45 2008
@@ -41,7 +41,7 @@
public DummySSLSocketFactory() {
try {
SSLContext sslContext = SSLContext.getInstance("TLS");
- TrustManager[] trustManagers = new TrustManager[] { new
DummyTrustManager()};
+ TrustManager[] trustManagers = new TrustManager[] {new
DummyTrustManager()};
sslContext.init(null, trustManagers, new
java.security.SecureRandom());
factory = sslContext.getSocketFactory();
} catch (Exception e) {
Modified:
activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/security/DummyTrustManager.java
URL:
http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/security/DummyTrustManager.java?rev=655296&r1=655295&r2=655296&view=diff
==============================================================================
---
activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/security/DummyTrustManager.java
(original)
+++
activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/security/DummyTrustManager.java
Sun May 11 03:37:45 2008
@@ -16,12 +16,13 @@
*/
package org.apache.camel.component.mail.security;
-import java.security.cert.X509Certificate;
import java.security.cert.CertificateException;
+import java.security.cert.X509Certificate;
+
import javax.net.ssl.X509TrustManager;
-import org.apache.commons.logging.LogFactory;
import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
/**
* DummyTrustManager that accepts any given certificate - <b>NOT SECURE</b>.
@@ -42,7 +43,7 @@
public X509Certificate[] getAcceptedIssuers() {
// everything is trusted
- return new X509Certificate[0];
+ return new X509Certificate[0];
}
private static void logCertificateChain(String type, X509Certificate[]
chain) {
Modified:
activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailDefaultDelayForMailConsumeTest.java
URL:
http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailDefaultDelayForMailConsumeTest.java?rev=655296&r1=655295&r2=655296&view=diff
==============================================================================
---
activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailDefaultDelayForMailConsumeTest.java
(original)
+++
activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailDefaultDelayForMailConsumeTest.java
Sun May 11 03:37:45 2008
@@ -17,8 +17,8 @@
package org.apache.camel.component.mail;
import org.apache.camel.ContextTestSupport;
-import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
/**
* Unit test for testing mail polling is happening according to the default
poll interval.
Modified:
activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/SpringCamelContext.java
URL:
http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/SpringCamelContext.java?rev=655296&r1=655295&r2=655296&view=diff
==============================================================================
---
activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/SpringCamelContext.java
(original)
+++
activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/SpringCamelContext.java
Sun May 11 03:37:45 2008
@@ -76,6 +76,7 @@
answer.afterPropertiesSet();
return answer;
}
+
public static SpringCamelContext springCamelContext(String
configLocations) throws Exception {
return springCamelContext(new
ClassPathXmlApplicationContext(configLocations));
Modified:
activemq/camel/trunk/components/camel-spring/src/main/resources/META-INF/spring.schemas
URL:
http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-spring/src/main/resources/META-INF/spring.schemas?rev=655296&r1=655295&r2=655296&view=diff
==============================================================================
---
activemq/camel/trunk/components/camel-spring/src/main/resources/META-INF/spring.schemas
(original)
+++
activemq/camel/trunk/components/camel-spring/src/main/resources/META-INF/spring.schemas
Sun May 11 03:37:45 2008
@@ -20,4 +20,5 @@
http\://activemq.apache.org/camel/schema/spring/camel-spring-1.0.0.xsd=camel-spring.xsd
http\://activemq.apache.org/camel/schema/spring/camel-spring-1.1.0.xsd=camel-spring.xsd
http\://activemq.apache.org/camel/schema/spring/camel-spring-1.2.0.xsd=camel-spring.xsd
+http\://activemq.apache.org/camel/schema/spring/camel-spring-1.3.0.xsd=camel-spring.xsd
http\://activemq.apache.org/camel/schema/spring/camel-spring-${pom.version}.xsd=camel-spring.xsd
Modified:
activemq/camel/trunk/components/camel-velocity/src/main/java/org/apache/camel/component/velocity/VelocityEndpoint.java
URL:
http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-velocity/src/main/java/org/apache/camel/component/velocity/VelocityEndpoint.java?rev=655296&r1=655295&r2=655296&view=diff
==============================================================================
---
activemq/camel/trunk/components/camel-velocity/src/main/java/org/apache/camel/component/velocity/VelocityEndpoint.java
(original)
+++
activemq/camel/trunk/components/camel-velocity/src/main/java/org/apache/camel/component/velocity/VelocityEndpoint.java
Sun May 11 03:37:45 2008
@@ -27,8 +27,8 @@
import org.apache.camel.component.ResourceBasedEndpoint;
import org.apache.camel.util.ExchangeHelper;
import org.apache.velocity.VelocityContext;
-import org.apache.velocity.app.VelocityEngine;
import org.apache.velocity.app.Velocity;
+import org.apache.velocity.app.VelocityEngine;
import org.apache.velocity.context.Context;
/**
Modified:
activemq/camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/jms/JmsMediumQueuePerformanceTest.java
URL:
http://svn.apache.org/viewvc/activemq/camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/jms/JmsMediumQueuePerformanceTest.java?rev=655296&r1=655295&r2=655296&view=diff
==============================================================================
---
activemq/camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/jms/JmsMediumQueuePerformanceTest.java
(original)
+++
activemq/camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/jms/JmsMediumQueuePerformanceTest.java
Sun May 11 03:37:45 2008
@@ -1,5 +1,4 @@
/**
- *
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
@@ -7,7 +6,7 @@
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -35,7 +34,7 @@
Thread.sleep(2000);
// TODO now start the route!
-
+
System.out.println("Now testing!");
timedSendLoop(mediumQueueCount, expected);
Modified:
activemq/camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/jms/JmsPerformanceTest.java
URL:
http://svn.apache.org/viewvc/activemq/camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/jms/JmsPerformanceTest.java?rev=655296&r1=655295&r2=655296&view=diff
==============================================================================
---
activemq/camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/jms/JmsPerformanceTest.java
(original)
+++
activemq/camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/jms/JmsPerformanceTest.java
Sun May 11 03:37:45 2008
@@ -36,7 +36,7 @@
protected MyBean myBean = new MyBean();
protected int messageCount = 1000;
protected CountDownLatch receivedCountDown = new
CountDownLatch(messageCount);
- protected long consumerSleep = 0L;
+ protected long consumerSleep;
protected int expectedMessageCount;
protected ClassPathXmlApplicationContext applicationContext;
protected boolean useLocalBroker = true;
@@ -130,8 +130,7 @@
if (consumerSleep > 0) {
try {
Thread.sleep(consumerSleep);
- }
- catch (InterruptedException e) {
+ } catch (InterruptedException e) {
LOG.warn("Caught: " + e, e);
}
}
Modified:
activemq/camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/jms/StopWatch.java
URL:
http://svn.apache.org/viewvc/activemq/camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/jms/StopWatch.java?rev=655296&r1=655295&r2=655296&view=diff
==============================================================================
---
activemq/camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/jms/StopWatch.java
(original)
+++
activemq/camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/jms/StopWatch.java
Sun May 11 03:37:45 2008
@@ -1,5 +1,4 @@
/**
- *
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
@@ -7,7 +6,7 @@
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,