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 2013/10/21 13:27:29 UTC

git commit: CAMEL-6877: For Camel Converter POJOs better prefer static methods over the instance methods.

Updated Branches:
  refs/heads/master ad6024b68 -> e6107e22b


CAMEL-6877: For Camel Converter POJOs better prefer static methods over the instance methods.

Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/e6107e22
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/e6107e22
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/e6107e22

Branch: refs/heads/master
Commit: e6107e22bdda50f7a4e910c2af8add526545e198
Parents: ad6024b
Author: Babak Vahdat <bv...@apache.org>
Authored: Mon Oct 21 13:27:20 2013 +0200
Committer: Babak Vahdat <bv...@apache.org>
Committed: Mon Oct 21 13:27:20 2013 +0200

----------------------------------------------------------------------
 .../java/org/apache/camel/example/etl/CustomerTransformer.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/e6107e22/examples/camel-example-etl/src/main/java/org/apache/camel/example/etl/CustomerTransformer.java
----------------------------------------------------------------------
diff --git a/examples/camel-example-etl/src/main/java/org/apache/camel/example/etl/CustomerTransformer.java b/examples/camel-example-etl/src/main/java/org/apache/camel/example/etl/CustomerTransformer.java
index 05cc3fb..06b9c0e76 100644
--- a/examples/camel-example-etl/src/main/java/org/apache/camel/example/etl/CustomerTransformer.java
+++ b/examples/camel-example-etl/src/main/java/org/apache/camel/example/etl/CustomerTransformer.java
@@ -47,7 +47,7 @@ public class CustomerTransformer {
      * entity
      */
     @Converter
-    public CustomerEntity toCustomer(PersonDocument doc, Exchange exchange) throws Exception {
+    public static CustomerEntity toCustomer(PersonDocument doc, Exchange exchange) throws Exception {
         EntityManager entityManager = exchange.getIn().getHeader(JpaConstants.ENTITYMANAGER, EntityManager.class);
         TransactionTemplate transactionTemplate = exchange.getContext().getRegistry().lookupByNameAndType("transactionTemplate", TransactionTemplate.class);
 
@@ -67,7 +67,7 @@ public class CustomerTransformer {
     /**
      * Finds a customer for the given username
      */
-    protected CustomerEntity findCustomerByName(TransactionTemplate transactionTemplate, final EntityManager entityManager, final String userName) throws Exception {
+    private static CustomerEntity findCustomerByName(TransactionTemplate transactionTemplate, final EntityManager entityManager, final String userName) throws Exception {
         return transactionTemplate.execute(new TransactionCallback<CustomerEntity>() {
             public CustomerEntity doInTransaction(TransactionStatus status) {
                 entityManager.joinTransaction();