Updated Branches: refs/heads/master 975964675 -> baf36ab78
Avoid openjpa warnings about fields being accessed directly instead of using the corresponding setter/getter. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/baf36ab7 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/baf36ab7 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/baf36ab7 Branch: refs/heads/master Commit: baf36ab7886d684fe45405a943b5d094e8d58191 Parents: 9759646 Author: bvahdat <bvah...@apache.org> Authored: Sun Oct 13 12:40:00 2013 +0200 Committer: bvahdat <bvah...@apache.org> Committed: Sun Oct 13 12:40:00 2013 +0200 ---------------------------------------------------------------------- .../java/org/apache/camel/examples/MultiSteps.java | 9 +-------- .../test/java/org/apache/camel/examples/SendEmail.java | 13 +++---------- 2 files changed, 4 insertions(+), 18 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/baf36ab7/components/camel-jpa/src/test/java/org/apache/camel/examples/MultiSteps.java ---------------------------------------------------------------------- diff --git a/components/camel-jpa/src/test/java/org/apache/camel/examples/MultiSteps.java b/components/camel-jpa/src/test/java/org/apache/camel/examples/MultiSteps.java index 3e8fc51..17c6e82 100644 --- a/components/camel-jpa/src/test/java/org/apache/camel/examples/MultiSteps.java +++ b/components/camel-jpa/src/test/java/org/apache/camel/examples/MultiSteps.java @@ -48,13 +48,6 @@ public class MultiSteps { setStep(1); } - @Override - public String toString() { - // TODO: don't make use of the id property here as it could potentially end up - // with a deadlock through the openjpa generated proxy object of this entity - return "MultiSteps[step: " + getStep() + " address: " + getAddress() + "]"; - } - @Id @GeneratedValue public Long getId() { @@ -88,6 +81,6 @@ public class MultiSteps { public void goToNextStep() { setStep(getStep() + 1); - LOG.info("Invoked the completion complete method. Now updated the step to: " + getStep()); + LOG.info("Invoked the completion complete method. Now updated the step to: {}", getStep()); } } http://git-wip-us.apache.org/repos/asf/camel/blob/baf36ab7/components/camel-jpa/src/test/java/org/apache/camel/examples/SendEmail.java ---------------------------------------------------------------------- diff --git a/components/camel-jpa/src/test/java/org/apache/camel/examples/SendEmail.java b/components/camel-jpa/src/test/java/org/apache/camel/examples/SendEmail.java index 78bc0d7..74a3a4f 100644 --- a/components/camel-jpa/src/test/java/org/apache/camel/examples/SendEmail.java +++ b/components/camel-jpa/src/test/java/org/apache/camel/examples/SendEmail.java @@ -42,13 +42,6 @@ public class SendEmail { setAddress(address); } - @Override - public String toString() { - // TODO: don't make use of the id property here as it could potentially end up - // with a deadlock through the openjpa generated proxy object of this entity - return "SendEmail[address: " + getAddress() + "]"; - } - @Id @GeneratedValue public Long getId() { @@ -69,9 +62,9 @@ public class SendEmail { @PreConsumed public void doBefore() { - LOG.info("Invoked the pre consumed method with address {}", address); - if ("dummy".equals(address)) { - address = "du...@somewhere.org"; + LOG.info("Invoked the pre consumed method with address {}", getAddress()); + if ("dummy".equals(getAddress())) { + setAddress("du...@somewhere.org"); } } }