@@ -201,9 +201,8 @@ public Optional<Ticket> getTicket(final String id, Integration integration) {
201201 }
202202 ticket = toTicket (optionalDefect .get (), integration );
203203 } catch (Exception ex ) {
204- LOGGER .error ("Unable load ticket :" + ex .getMessage (), ex );
205- throw new ReportPortalException (
206- UNABLE_INTERACT_WITH_INTEGRATION , "Unable load ticket :" + ex .getMessage (), ex );
204+ LOGGER .error ("Unable load ticket :{}" , ex .getMessage (), ex );
205+ throw new ReportPortalException (UNABLE_INTERACT_WITH_INTEGRATION , "Unable load ticket" );
207206 }
208207 return Optional .of (ticket );
209208 }
@@ -233,8 +232,7 @@ public Ticket submitTicket(final PostTicketRQ ticketRQ, Integration integration)
233232 return toTicket (newDefect , integration );
234233 } catch (Exception e ) {
235234 LOGGER .error ("Unable to submit ticket: " + e .getMessage (), e );
236- throw new ReportPortalException (
237- UNABLE_INTERACT_WITH_INTEGRATION , "Unable to submit ticket: " + e .getMessage (), e );
235+ throw new ReportPortalException (UNABLE_INTERACT_WITH_INTEGRATION , "Unable to submit ticket" );
238236 }
239237 }
240238
@@ -310,8 +308,7 @@ private Ticket toTicket(Defect defect, Integration externalSystem) {
310308 return ticket ;
311309 }
312310
313- private Defect postDefect (RallyRestApi restApi , PostTicketRQ ticketRQ , Integration externalSystem )
314- throws IOException {
311+ private Defect postDefect (RallyRestApi restApi , PostTicketRQ ticketRQ , Integration externalSystem ) {
315312 JsonObject newDefect = new JsonObject ();
316313 List <PostFormField > fields = ticketRQ .getFields ();
317314 List <PostFormField > savedFields = new ArrayList <>();
@@ -324,7 +321,7 @@ private Defect postDefect(RallyRestApi restApi, PostTicketRQ ticketRQ, Integrati
324321 .constructParametricType (List .class , PostFormField .class )
325322 ));
326323 } catch (IOException e ) {
327- LOGGER .error ("Unable to parse post form fields: " , e .getMessage ());
324+ LOGGER .error ("Unable to parse post form fields: {} " , e .getMessage ());
328325 throw new ReportPortalException (UNABLE_INTERACT_WITH_INTEGRATION , e );
329326 }
330327
@@ -430,7 +427,7 @@ private RallyObject postImage(String itemRef, InternalTicket.LogEntry logEntry,
430427 checkResponse (attachmentResponse );
431428 return gson .fromJson (attachmentResponse .getObject (), RallyObject .class );
432429 } catch (IOException e ) {
433- LOGGER .error ("Unable to post ticket image: " + e .getMessage () + " \n " + Arrays .toString (
430+ LOGGER .error ("Unable to post ticket image: {} \n {}" , e .getMessage (), Arrays .toString (
434431 e .getStackTrace ()), e );
435432 throw new ReportPortalException (
436433 UNABLE_INTERACT_WITH_INTEGRATION , "Unable to post ticket image: " + e .getMessage (), e );
0 commit comments