squakez commented on code in PR #22033:
URL: https://github.com/apache/camel/pull/22033#discussion_r2940880102


##########
components/camel-mina/src/test/java/org/apache/camel/component/mina/MinaInOutWithForcedNoResponseTest.java:
##########
@@ -60,12 +60,12 @@ public void configure() {
                         .when(body().isEqualTo("Woodbine"))
                         .transform(constant("Hello Chad"))
                         .otherwise()
-                        .transform(constant(null));
+                        .transform(constant((Object) null));
 
                 
fromF("mina:tcp://localhost:%d?sync=true&disconnectOnNoReply=false&noReplyLogLevel=OFF",
 port2).choice()
                         .when(body().isEqualTo("Woodbine"))
                         .transform(constant("Hello Chad")).otherwise()
-                        .transform(constant(null));
+                        .transform(constant((Object) null));

Review Comment:
   Ditto



##########
components/camel-ehcache/src/test/java/org/apache/camel/component/ehcache/EhcacheConsumerTest.java:
##########
@@ -45,7 +45,7 @@ void testEvents() throws Exception {
         all.expectedHeaderValuesReceivedInAnyOrder(EhcacheConstants.KEY, key, 
key);
         all.expectedHeaderValuesReceivedInAnyOrder(EhcacheConstants.OLD_VALUE, 
null, values[0]);
         
all.expectedHeaderValuesReceivedInAnyOrder(EhcacheConstants.EVENT_TYPE, 
EventType.CREATED, EventType.UPDATED);
-        all.expectedBodiesReceived(values);
+        all.expectedBodiesReceived((Object[]) values);

Review Comment:
   Ditto



##########
components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/fix/BindySimpleKeyValuePairFixTest.java:
##########
@@ -58,7 +58,7 @@ public class BindySimpleKeyValuePairFixTest {
     @DirtiesContext
     public void testUnMarshallMessage() throws Exception {
         mock.expectedMessageCount(FIX_RESPONSES.length);
-        mock.expectedBodiesReceived(FIX_RESPONSES);
+        mock.expectedBodiesReceived((Object[]) FIX_RESPONSES);

Review Comment:
   This could be a solution. But we can find down the road there are more of 
the same to fix. Consider overloading the `expectedBodiesReceived` accepting 
also an array of strings. In that case, here nothing else would be required.



##########
components/camel-mina/src/test/java/org/apache/camel/component/mina/MinaInOutWithForcedNoResponseTest.java:
##########
@@ -60,12 +60,12 @@ public void configure() {
                         .when(body().isEqualTo("Woodbine"))
                         .transform(constant("Hello Chad"))
                         .otherwise()
-                        .transform(constant(null));
+                        .transform(constant((Object) null));

Review Comment:
   Likely `constant()` would resolve as well.



##########
components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/integration/ZooKeeperManagedEndpointIT.java:
##########
@@ -55,7 +55,7 @@ public void testEnpointConfigurationCanBeSetViaJMX() throws 
Exception {
 
         getMBeanServer().invoke(zepName, "clearServers",
                 null,
-                
JmxUtils.getMethodSignature(ZooKeeperEndpoint.class.getMethod("clearServers", 
null)));
+                
JmxUtils.getMethodSignature(ZooKeeperEndpoint.class.getMethod("clearServers", 
(Class<?>[]) null)));

Review Comment:
   probably you can remove the null parameter at all, if that param is a vararg.



##########
dsl/camel-jbang/camel-jbang-plugin-kubernetes/src/test/java/org/apache/camel/dsl/jbang/core/commands/kubernetes/traits/TraitHelperTest.java:
##########
@@ -47,7 +47,7 @@ public void mergeTraitsTest() {
         Assertions.assertEquals(3, resultEmptyDefault.length);
         Assertions.assertArrayEquals(overridesGroup, resultEmptyDefault);
 
-        String[] resultNull = TraitHelper.mergeTraits(null);
+        String[] resultNull = TraitHelper.mergeTraits((String[][]) null);

Review Comment:
   It does not need the param at all, since it's a vararg.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to