You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ni...@apache.org on 2008/03/27 12:00:03 UTC
svn commit: r641781 - in /activemq/camel/trunk/camel-core/src:
main/java/org/apache/camel/component/dataset/
main/java/org/apache/camel/model/ main/java/org/apache/camel/processor/
test/java/org/apache/camel/builder/ test/java/org/apache/camel/processor/
Author: ningjiang
Date: Thu Mar 27 03:59:45 2008
New Revision: 641781
URL: http://svn.apache.org/viewvc?rev=641781&view=rev
Log:
Fixed the CS errors in camel-core
Modified:
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/dataset/DataSetConsumer.java
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/TryType.java
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/TryProcessor.java
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/BuilderWithScopesTest.java
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ValidationWithFinallyBlockPipelineTest.java
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ValidationWithNestedFinallyBlockPipelineTest.java
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/dataset/DataSetConsumer.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/dataset/DataSetConsumer.java?rev=641781&r1=641780&r2=641781&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/dataset/DataSetConsumer.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/dataset/DataSetConsumer.java Thu Mar 27 03:59:45 2008
@@ -56,14 +56,12 @@
if (delay > 0) {
try {
Thread.sleep(delay);
- }
- catch (InterruptedException e) {
+ } catch (InterruptedException e) {
LOG.debug(e);
}
}
}
- }
- catch (Exception e) {
+ } catch (Exception e) {
LOG.error(e);
}
}
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/TryType.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/TryType.java?rev=641781&r1=641780&r2=641781&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/TryType.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/TryType.java Thu Mar 27 03:59:45 2008
@@ -83,9 +83,9 @@
*/
@Deprecated
public TryType handleAll() {
- return finallyBlock();
+ return finallyBlock();
}
-
+
public TryType finallyBlock() {
popBlock();
FinallyType answer = new FinallyType();
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/TryProcessor.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/TryProcessor.java?rev=641781&r1=641780&r2=641781&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/TryProcessor.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/TryProcessor.java Thu Mar 27 03:59:45 2008
@@ -29,7 +29,7 @@
/**
* Implements try/catch/finally type processing
- *
+ *
* @version $Revision$
*/
public class TryProcessor extends ServiceSupport implements Processor {
@@ -70,14 +70,14 @@
Exception unexpected = null;
try {
if (e != null) {
- LOG.info("Caught exception while processing exchange.", e);
+ LOG.info("Caught exception while processing exchange.", e);
handleException(exchange, e);
}
processFinally(exchange);
} catch (Exception ex) {
- unexpected = ex;
+ unexpected = ex;
} catch (Throwable ex) {
- unexpected = new RuntimeCamelException(ex);
+ unexpected = new RuntimeCamelException(ex);
}
if (unexpected != null) {
@@ -118,7 +118,7 @@
exchange.setException(null);
// do not catch any exception here, let it propagate up
- finallyProcessor.process(exchange);
+ finallyProcessor.process(exchange);
if (exchange.getException() == null) {
exchange.setException(lastException);
}
Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/BuilderWithScopesTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/BuilderWithScopesTest.java?rev=641781&r1=641780&r2=641781&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/BuilderWithScopesTest.java (original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/BuilderWithScopesTest.java Thu Mar 27 03:59:45 2008
@@ -291,7 +291,7 @@
protected RouteBuilder createTryCatchFinallyNoEnd() {
return new RouteBuilder() {
public void configure() {
- errorHandler(deadLetterChannel().maximumRedeliveries(2));
+ errorHandler(deadLetterChannel().maximumRedeliveries(2));
from("direct:a").tryBlock().process(validator).process(toProcessor)
.handle(ValidationException.class).process(orderProcessor).finallyBlock()
.process(orderProcessor2).process(orderProcessor3); // continuation of the finallyBlock clause
@@ -335,7 +335,7 @@
protected RouteBuilder createTryCatchFinallyEnd() {
return new RouteBuilder() {
public void configure() {
- errorHandler(deadLetterChannel().maximumRedeliveries(2));
+ errorHandler(deadLetterChannel().maximumRedeliveries(2));
from("direct:a").tryBlock().process(validator).process(toProcessor)
.handle(ValidationException.class).process(orderProcessor).finallyBlock()
.process(orderProcessor2).end().process(orderProcessor3);
@@ -371,7 +371,7 @@
expected.add("VALIDATE");
expected.add("INVOKED2");
// orderProcessor3 will not be invoked past end() with an uncaught exception
-
+
runTest(createTryCatchFinallyEnd(), expected);
}
}
Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ValidationWithFinallyBlockPipelineTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ValidationWithFinallyBlockPipelineTest.java?rev=641781&r1=641780&r2=641781&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ValidationWithFinallyBlockPipelineTest.java (original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ValidationWithFinallyBlockPipelineTest.java Thu Mar 27 03:59:45 2008
@@ -1,5 +1,18 @@
/**
- *
+ * 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.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (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
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package org.apache.camel.processor;
@@ -8,9 +21,9 @@
/**
* The handle catch clause has a pipeline processing the exception.
- *
+ *
* @author <a href="mailto:nsandhu">nsandhu</a>
- *
+ *
*/
public class ValidationWithFinallyBlockPipelineTest extends ValidationTest {
protected RouteBuilder createRouteBuilder() {
Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ValidationWithNestedFinallyBlockPipelineTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ValidationWithNestedFinallyBlockPipelineTest.java?rev=641781&r1=641780&r2=641781&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ValidationWithNestedFinallyBlockPipelineTest.java (original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ValidationWithNestedFinallyBlockPipelineTest.java Thu Mar 27 03:59:45 2008
@@ -1,5 +1,18 @@
/**
- *
+ * 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.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (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
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package org.apache.camel.processor;
@@ -8,9 +21,9 @@
/**
* The handle catch clause has a pipeline processing the exception.
- *
+ *
* @author <a href="mailto:nsandhu">nsandhu</a>
- *
+ *
*/
public class ValidationWithNestedFinallyBlockPipelineTest extends ValidationTest {
protected RouteBuilder createRouteBuilder() {
@@ -21,7 +34,7 @@
.to("direct:embedded")
.handle(ValidationException.class)
.to("mock:invalid");
-
+
from("direct:embedded")
.errorHandler(noErrorHandler())
.tryBlock()