diff --git a/pom.xml b/pom.xml index 26c91e27..f456c3e3 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ net.authorize anet-java-sdk - 2.0.5 + 3.0.0 junit @@ -28,8 +28,8 @@ maven-compiler-plugin 3.7.0 - 1.7 - 1.7 + 9 + 9 diff --git a/src/test/java/net/authorize/sample/SampleCodeTest/TestRunner.java b/src/test/java/net/authorize/sample/SampleCodeTest/TestRunner.java index 60ad084a..b6551189 100644 --- a/src/test/java/net/authorize/sample/SampleCodeTest/TestRunner.java +++ b/src/test/java/net/authorize/sample/SampleCodeTest/TestRunner.java @@ -183,7 +183,7 @@ public ANetApiResponse InvokeRunMethod(String className) { String fqClassName = "net.authorize.sample." + className; - Class classType = null; + Class classType = null; try { classType = Class.forName(fqClassName); } catch (ClassNotFoundException e1) { @@ -193,28 +193,19 @@ public ANetApiResponse InvokeRunMethod(String className) Method runMethod = null; try { - runMethod = classType.getMethod("run",String.class, String.class); - } catch (NoSuchMethodException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - } catch (SecurityException e1) { + runMethod = classType.getMethod("run", String.class, String.class); + } catch (NoSuchMethodException | SecurityException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } - try { + try { return (ANetApiResponse)runMethod.invoke(null, Constants.API_LOGIN_ID, Constants.TRANSACTION_KEY); - } catch (IllegalAccessException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (IllegalArgumentException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (InvocationTargetException e) { + } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { // TODO Auto-generated catch block e.printStackTrace(); } - return null; + return null; } public ANetApiResponse TestValidateCustomerPaymentProfile()