@@ -83,7 +83,7 @@ public void createLineItems(List<InvoicedItem> invoicedItems, boolean includeSub
8383
8484 calendarItem .setTime (invoicedItem .getDate ());
8585 boolean isDateChange = isFirstItem || calendarCurrent .get (Calendar .DAY_OF_MONTH ) != calendarItem .get (Calendar .DAY_OF_MONTH );
86- boolean isGroupChange = false ;
86+ boolean isGroupChange ;
8787 if (invoicedItem .getGroupName ()== null ){
8888 isGroupChange = currentGroup != null ;
8989 }
@@ -188,17 +188,9 @@ protected List<FormattedLineItem> getLineItemsFromInvoicedItem(InvoicedItem invo
188188 addDetailsToLineItem (commentLines .get (0 ), invoicedItem );
189189 }
190190
191- if (itemLines .size () > 0 ) {
192- for (FormattedLineItem itemLine : itemLines ) {
193- formattedLineItems .add (itemLine );
194- }
195- }
191+ formattedLineItems .addAll (itemLines );
192+ formattedLineItems .addAll (commentLines );
196193
197- if (commentLines .size () > 0 ) {
198- for (FormattedLineItem commentLine : commentLines ) {
199- formattedLineItems .add (commentLine );
200- }
201- }
202194 return formattedLineItems ;
203195 }
204196
@@ -219,7 +211,7 @@ public void Footer()
219211 }
220212 catch (IOException e )
221213 {
222- throw new UnexpectedException (e );
214+ throw UnexpectedException . wrap (e );
223215 }
224216 }
225217
@@ -387,7 +379,7 @@ public void Header()
387379 }
388380 catch (IOException e )
389381 {
390- throw new UnexpectedException (e );
382+ throw UnexpectedException . wrap (e );
391383 }
392384 }
393385
0 commit comments