@@ -186,11 +186,17 @@ private JsonObject restJIRA(String JIRA) throws Exception {
186186 return lastJIRAObject ;
187187 }
188188 if (restLocation != null ) {
189- URL url = new URL (restLocation + JIRA );
190- InputStream stream = url .openStream ();
191-
192- lastJIRA = JIRA ;
193- lastJIRAObject = Json .createReader (stream ).readObject ();
189+ try {
190+ URL url = new URL (restLocation + JIRA );
191+ InputStream stream = url .openStream ();
192+
193+ lastJIRA = JIRA ;
194+ lastJIRAObject = Json .createReader (stream ).readObject ();
195+ } catch (Throwable e ) {
196+ e .printStackTrace ();
197+ lastJIRAObject = null ;
198+ lastJIRA = null ;
199+ }
194200 return lastJIRAObject ;
195201 }
196202 return null ;
@@ -242,7 +248,7 @@ public void parse(PrintStream output, String from, String to) throws Exception {
242248
243249 StringBuffer interestingChanges [] = new StringBuffer [interestingFolder .size ()];
244250
245- output .print ("<thead><tr><th>#</th><th>Commit</th><th>Date</th><th>Author</th><th>Short Message</th><th>Jira Status</th><th>Adds </th><th>Updates </th><th>Deletes </th>" );
251+ output .print ("<thead><tr><th>#</th><th>Commit</th><th>Date</th><th>Author</th><th>Short Message</th><th>Jira Status</th><th>Add </th><th>Rep </th><th>Del</th><th>Tot </th>" );
246252
247253 for (int i = 0 ; i < interestingFolder .size (); i ++) {
248254 output .print ("<th>" + interestingFolder .get (i ) + "</th>" );
@@ -276,8 +282,12 @@ public void parse(PrintStream output, String from, String to) throws Exception {
276282 for (int i = 0 ; i < currentJiras .length ; i ++) {
277283
278284 String jiraIteration = currentJiras [i ];
285+ JsonObject object = null ;
279286 if (restLocation != null ) {
280- JsonObject object = restJIRA (jiraIteration );
287+ object = restJIRA (jiraIteration );
288+ }
289+ // it could happen the object is returning null for security or something else
290+ if (object != null ) {
281291 String issuetype = getField (object , "issuetype" );
282292 String status = getField (object , "status" );
283293 String resolution = getField (object , "resolution" );
@@ -377,7 +387,7 @@ public void parse(PrintStream output, String from, String to) throws Exception {
377387 }
378388 }
379389 }
380- output .print ("<td>" + addition + "</td><td>" + replacement + "</td><td>" + deletion + "</td>" );
390+ output .print ("<td>" + addition + "</td><td>" + replacement + "</td><td>" + deletion + "</td><td>" + ( addition + replacement - deletion ) + "</td> " );
381391
382392 for (int i = 0 ; i < interestingChanges .length ; i ++) {
383393 output .print ("<td>" + interestingChanges [i ].toString () + "</td>" );
0 commit comments