diff --git a/core/src/main/java/org/jsmart/zerocode/core/kafka/helper/KafkaProducerHelper.java b/core/src/main/java/org/jsmart/zerocode/core/kafka/helper/KafkaProducerHelper.java index 0d965df5a..7c4e0abb4 100644 --- a/core/src/main/java/org/jsmart/zerocode/core/kafka/helper/KafkaProducerHelper.java +++ b/core/src/main/java/org/jsmart/zerocode/core/kafka/helper/KafkaProducerHelper.java @@ -99,8 +99,8 @@ private static Object buildProtoMessage(String message, String requestJson) { private static Builder createBuilder(String messageClass) { try { Class msgClass = (Class) Class.forName(messageClass); - Method method = msgClass.getMethod("newBuilder", null); - return (Builder) method.invoke(null, null); + Method method = msgClass.getMethod("newBuilder", (Class[]) null); + return (Builder) method.invoke(null, (Object[]) null); } catch (IllegalAccessException | ClassNotFoundException | NoSuchMethodException | SecurityException | IllegalArgumentException | InvocationTargetException e) { throw new IllegalArgumentException(e); diff --git a/core/src/test/java/org/jsmart/zerocode/core/engine/assertion/NumberComparatorTest.java b/core/src/test/java/org/jsmart/zerocode/core/engine/assertion/NumberComparatorTest.java index b5bbfc3af..200cdc852 100644 --- a/core/src/test/java/org/jsmart/zerocode/core/engine/assertion/NumberComparatorTest.java +++ b/core/src/test/java/org/jsmart/zerocode/core/engine/assertion/NumberComparatorTest.java @@ -18,8 +18,8 @@ public void willCompareTwoDifferentNumbers_Rightly() throws Exception { assertThat((new BigDecimal("3.00009")).compareTo(new BigDecimal("3.00009")), is(0)); NumberComparator comparator = new NumberComparator(); - assertThat(comparator.compare(new Integer("3"), new Long("3")), is(0)); - assertThat(comparator.compare(new Integer("3"), new Double("3.0")), is(0)); + assertThat(comparator.compare(Integer.valueOf("3"), Long.valueOf("3")), is(0)); + assertThat(comparator.compare(Integer.valueOf("3"), Double.valueOf("3.0")), is(0)); } diff --git a/core/src/test/java/org/jsmart/zerocode/core/engine/executor/javaapi/JavaMethodExecutorImplTest.java b/core/src/test/java/org/jsmart/zerocode/core/engine/executor/javaapi/JavaMethodExecutorImplTest.java index 70502653f..148de7f53 100644 --- a/core/src/test/java/org/jsmart/zerocode/core/engine/executor/javaapi/JavaMethodExecutorImplTest.java +++ b/core/src/test/java/org/jsmart/zerocode/core/engine/executor/javaapi/JavaMethodExecutorImplTest.java @@ -87,7 +87,7 @@ public void willExecuteJsonRequestForJavaMethod_noParam() throws Exception { String serviceName = scenarioSpec.getSteps().get(0).getUrl(); String methodName = scenarioSpec.getSteps().get(0).getOperation(); - Object result = methodExecutor.executeWithParams(serviceName, methodName, null); + Object result = methodExecutor.executeWithParams(serviceName, methodName, (Object[]) null); assertThat(result, is(30)); } diff --git a/core/src/test/java/org/jsmart/zerocode/core/runner/ZeroCodeUnitRuntimeAnnoTest.java b/core/src/test/java/org/jsmart/zerocode/core/runner/ZeroCodeUnitRuntimeAnnoTest.java index 10497296d..d54834a5d 100644 --- a/core/src/test/java/org/jsmart/zerocode/core/runner/ZeroCodeUnitRuntimeAnnoTest.java +++ b/core/src/test/java/org/jsmart/zerocode/core/runner/ZeroCodeUnitRuntimeAnnoTest.java @@ -54,7 +54,7 @@ public void testScenario1() throws Exception { public static void alterAnnotation(Class targetClass, Class targetAnnotation, Annotation targetValue) { try { - Method method = Class.class.getDeclaredMethod(ANNOTATION_METHOD, null); + Method method = Class.class.getDeclaredMethod(ANNOTATION_METHOD, (Class[]) null); method.setAccessible(true); Object annotationData = method.invoke(targetClass);