@@ -183,7 +183,7 @@ public ANetApiResponse InvokeRunMethod(String className)
183183 {
184184 String fqClassName = "net.authorize.sample." + className ;
185185
186- Class classType = null ;
186+ Class <?> classType = null ;
187187 try {
188188 classType = Class .forName (fqClassName );
189189 } catch (ClassNotFoundException e1 ) {
@@ -193,28 +193,19 @@ public ANetApiResponse InvokeRunMethod(String className)
193193
194194 Method runMethod = null ;
195195 try {
196- runMethod = classType .getMethod ("run" ,String .class , String .class );
197- } catch (NoSuchMethodException e1 ) {
198- // TODO Auto-generated catch block
199- e1 .printStackTrace ();
200- } catch (SecurityException e1 ) {
196+ runMethod = classType .getMethod ("run" , String .class , String .class );
197+ } catch (NoSuchMethodException | SecurityException e1 ) {
201198 // TODO Auto-generated catch block
202199 e1 .printStackTrace ();
203200 }
204201
205- try {
202+ try {
206203 return (ANetApiResponse )runMethod .invoke (null , Constants .API_LOGIN_ID , Constants .TRANSACTION_KEY );
207- } catch (IllegalAccessException e ) {
208- // TODO Auto-generated catch block
209- e .printStackTrace ();
210- } catch (IllegalArgumentException e ) {
211- // TODO Auto-generated catch block
212- e .printStackTrace ();
213- } catch (InvocationTargetException e ) {
204+ } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e ) {
214205 // TODO Auto-generated catch block
215206 e .printStackTrace ();
216207 }
217- return null ;
208+ return null ;
218209 }
219210
220211 public ANetApiResponse TestValidateCustomerPaymentProfile ()
0 commit comments