You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2020/09/02 15:56:23 UTC

[camel] branch master updated: camel-spring: fix warnings due to usage of deprecated wrapper types (#4153)

This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/master by this push:
     new 5292c1d  camel-spring: fix warnings due to usage of deprecated wrapper types (#4153)
5292c1d is described below

commit 5292c1d72e4ee6172e386eb2587d045fe5b638bd
Author: Otavio Rodolfo Piske <or...@users.noreply.github.com>
AuthorDate: Wed Sep 2 17:55:56 2020 +0200

    camel-spring: fix warnings due to usage of deprecated wrapper types (#4153)
---
 .../interceptor/MixedPropagationTransactedTest.java  | 16 ++++++++--------
 .../interceptor/MixedTransactionPropagationTest.java | 20 ++++++++++----------
 2 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/components/camel-spring/src/test/java/org/apache/camel/spring/interceptor/MixedPropagationTransactedTest.java b/components/camel-spring/src/test/java/org/apache/camel/spring/interceptor/MixedPropagationTransactedTest.java
index c976b31..8e3a3f6 100644
--- a/components/camel-spring/src/test/java/org/apache/camel/spring/interceptor/MixedPropagationTransactedTest.java
+++ b/components/camel-spring/src/test/java/org/apache/camel/spring/interceptor/MixedPropagationTransactedTest.java
@@ -60,7 +60,7 @@ public class MixedPropagationTransactedTest extends SpringTestSupport {
         template.sendBody("direct:required", "Tiger in Action");
 
         int count = jdbc.queryForObject("select count(*) from books", Integer.class);
-        assertEquals(new Integer(1),
+        assertEquals(Integer.valueOf(1),
                 jdbc.queryForObject("select count(*) from books where title = ?", Integer.class, "Tiger in Action"));
         assertEquals(2, count, "Number of books");
     }
@@ -71,7 +71,7 @@ public class MixedPropagationTransactedTest extends SpringTestSupport {
 
         int count = jdbc.queryForObject("select count(*) from books", Integer.class);
         // we do 2x the book service so we should get 2 tiger books
-        assertEquals(new Integer(2),
+        assertEquals(Integer.valueOf(2),
                 jdbc.queryForObject("select count(*) from books where title = ?", Integer.class, "Tiger in Action"));
         assertEquals(3, count, "Number of books");
     }
@@ -81,7 +81,7 @@ public class MixedPropagationTransactedTest extends SpringTestSupport {
         template.sendBody("direct:new", "Elephant in Action");
 
         int count = jdbc.queryForObject("select count(*) from books", Integer.class);
-        assertEquals(new Integer(1),
+        assertEquals(Integer.valueOf(1),
                 jdbc.queryForObject("select count(*) from books where title = ?", Integer.class, "Elephant in Action"));
         assertEquals(2, count, "Number of books");
     }
@@ -91,7 +91,7 @@ public class MixedPropagationTransactedTest extends SpringTestSupport {
         template.sendBody("direct:requiredAndNew", "Tiger in Action");
 
         int count = jdbc.queryForObject("select count(*) from books", Integer.class);
-        assertEquals(new Integer(2),
+        assertEquals(Integer.valueOf(2),
                 jdbc.queryForObject("select count(*) from books where title = ?", Integer.class, "Tiger in Action"));
         assertEquals(3, count, "Number of books");
     }
@@ -109,7 +109,7 @@ public class MixedPropagationTransactedTest extends SpringTestSupport {
         }
 
         int count = jdbc.queryForObject("select count(*) from books", Integer.class);
-        assertEquals(new Integer(0),
+        assertEquals(Integer.valueOf(0),
                 jdbc.queryForObject("select count(*) from books where title = ?", Integer.class, "Donkey in Action"));
         assertEquals(1, count, "Number of books");
     }
@@ -127,7 +127,7 @@ public class MixedPropagationTransactedTest extends SpringTestSupport {
         }
 
         int count = jdbc.queryForObject("select count(*) from books", Integer.class);
-        assertEquals(new Integer(0),
+        assertEquals(Integer.valueOf(0),
                 jdbc.queryForObject("select count(*) from books where title = ?", Integer.class, "Donkey in Action"));
         assertEquals(1, count, "Number of books");
     }
@@ -144,9 +144,9 @@ public class MixedPropagationTransactedTest extends SpringTestSupport {
         }
 
         int count = jdbc.queryForObject("select count(*) from books", Integer.class);
-        assertEquals(new Integer(1),
+        assertEquals(Integer.valueOf(1),
                 jdbc.queryForObject("select count(*) from books where title = ?", Integer.class, "Tiger in Action"));
-        assertEquals(new Integer(0),
+        assertEquals(Integer.valueOf(0),
                 jdbc.queryForObject("select count(*) from books where title = ?", Integer.class, "Donkey in Action"));
         // the tiger in action should be committed, but our 2nd route should rollback
         assertEquals(2, count, "Number of books");
diff --git a/components/camel-spring/src/test/java/org/apache/camel/spring/interceptor/MixedTransactionPropagationTest.java b/components/camel-spring/src/test/java/org/apache/camel/spring/interceptor/MixedTransactionPropagationTest.java
index 23aaf72..c4fea9a 100644
--- a/components/camel-spring/src/test/java/org/apache/camel/spring/interceptor/MixedTransactionPropagationTest.java
+++ b/components/camel-spring/src/test/java/org/apache/camel/spring/interceptor/MixedTransactionPropagationTest.java
@@ -85,15 +85,15 @@ public class MixedTransactionPropagationTest extends SpringTestSupport {
         assertEquals(3, count, "Number of books");
 
         // assert correct books in database
-        assertEquals(new Integer(1),
+        assertEquals(Integer.valueOf(1),
                 jdbc.queryForObject("select count(*) from books where title = 'Camel in Action'", Integer.class));
-        assertEquals(new Integer(1),
+        assertEquals(Integer.valueOf(1),
                 jdbc.queryForObject("select count(*) from books where title = 'Tiger in Action'", Integer.class));
-        assertEquals(new Integer(1),
+        assertEquals(Integer.valueOf(1),
                 jdbc.queryForObject("select count(*) from books where title = 'Elephant in Action'", Integer.class));
-        assertEquals(new Integer(0),
+        assertEquals(Integer.valueOf(0),
                 jdbc.queryForObject("select count(*) from books where title = 'Lion in Action'", Integer.class));
-        assertEquals(new Integer(0),
+        assertEquals(Integer.valueOf(0),
                 jdbc.queryForObject("select count(*) from books where title = 'Donkey in Action'", Integer.class));
     }
 
@@ -105,15 +105,15 @@ public class MixedTransactionPropagationTest extends SpringTestSupport {
         assertEquals(5, count, "Number of books");
 
         // assert correct books in database
-        assertEquals(new Integer(1),
+        assertEquals(Integer.valueOf(1),
                 jdbc.queryForObject("select count(*) from books where title = 'Camel in Action'", Integer.class));
-        assertEquals(new Integer(1),
+        assertEquals(Integer.valueOf(1),
                 jdbc.queryForObject("select count(*) from books where title = 'Tiger in Action'", Integer.class));
-        assertEquals(new Integer(1),
+        assertEquals(Integer.valueOf(1),
                 jdbc.queryForObject("select count(*) from books where title = 'Elephant in Action'", Integer.class));
-        assertEquals(new Integer(1),
+        assertEquals(Integer.valueOf(1),
                 jdbc.queryForObject("select count(*) from books where title = 'Lion in Action'", Integer.class));
-        assertEquals(new Integer(1),
+        assertEquals(Integer.valueOf(1),
                 jdbc.queryForObject("select count(*) from books where title = 'Crocodile in Action'", Integer.class));
     }