Skip to content

Commit

Permalink
Merge pull request #604 from baulea/java17
Browse files Browse the repository at this point in the history
ISSUE-598 # remove maven-compiler warnings with target Java 17 (JDK8 Compatible)
  • Loading branch information
a1shadows authored Mar 1, 2024
2 parents 61e8752 + a17bbb1 commit d142ce3
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ private static Object buildProtoMessage(String message, String requestJson) {
private static Builder createBuilder(String messageClass) {
try {
Class<Message> msgClass = (Class<Message>) 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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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));

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public void testScenario1() throws Exception {

public static void alterAnnotation(Class<?> targetClass, Class<? extends Annotation> 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);
Expand Down

0 comments on commit d142ce3

Please sign in to comment.