r3746 - in trunk: lima-business/src/main/java/org/chorem/lima/business/ejb lima-swing/src/main/java/org/chorem/lima/ui/importexport
Author: dcosse Date: 2014-02-14 19:06:21 +0100 (Fri, 14 Feb 2014) New Revision: 3746 Url: http://chorem.org/projects/lima/repository/revisions/3746 Log: refs #970 work in progress Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java =================================================================== --- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java 2014-02-14 14:59:24 UTC (rev 3745) +++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java 2014-02-14 18:06:21 UTC (rev 3746) @@ -25,6 +25,7 @@ package org.chorem.lima.business.ejb; +import com.google.common.base.Strings; import com.lowagie.text.Font; import org.apache.commons.lang3.StringUtils; import org.apache.commons.logging.Log; @@ -45,6 +46,7 @@ import org.chorem.lima.business.api.VatStatementService; import org.chorem.lima.business.utils.DocumentsEnum; import org.chorem.lima.business.utils.EntryComparator; +import org.chorem.lima.business.utils.FormatsEnum; import org.chorem.lima.entity.Account; import org.chorem.lima.entity.AccountDAO; import org.chorem.lima.entity.ClosedPeriodicEntryBook; @@ -145,112 +147,108 @@ //create pages for (List<FinancialStatementAmounts> list : listList) { - String title = list.get(0).getLabel(); - int i = 0; - int n = list.size(); - printedType ++; - while (i < n) { - int j = i + n; - if (j > n) { - j = n; - } - List<FinancialStatementAmounts> subFinancialStatementAmounts = - list.subList(i, j); + if (!list.isEmpty()){ + String title = list.get(0).getLabel(); + int i = 0; + int n = list.size(); + printedType ++; + while (i < n) { - financialReport += constructHeaderTitle(title, beginDate, endDate); + financialReport += constructHeaderTitle(title, beginDate, endDate); - String boldBegin = "<b>"; - String boldEnd = "</b>"; - financialReport += "<table border=\"1\" width=\"100%\" cellpadding=\"3\" cellspacing=\"0\">\n" + - "<tr align=\"center\">\n"; + String boldBegin = "<b>"; + String boldEnd = "</b>"; + financialReport += "<table border=\"1\" width=\"100%\" cellpadding=\"3\" cellspacing=\"0\">\n" + + "<tr align=\"center\">\n"; - if (printedType == 0) { - String[] columnHeaderTable = {boldBegin+_("lima-business.document.label")+boldEnd, boldBegin+_("lima-business.document.grossamount")+boldEnd, - boldBegin+_("lima-business.document.provisiondeprecationamount")+boldEnd, boldBegin+_("lima-business.document.netamount")+boldEnd}; - financialReport += constructTableLine(columnHeaderTable); - } else if (printedType == 1) { - String[] columnHeaderTable = {boldBegin+_("lima-business.document.label")+boldEnd, boldBegin+_("lima-business.document.amount")+boldEnd}; - financialReport += constructTableLine(columnHeaderTable); - } else { - String[] columnHeaderTable = {boldBegin+_("lima-business.document.label")+boldEnd, boldBegin+_("lima-business.document.amount")+boldEnd}; - financialReport += constructTableLine(columnHeaderTable); - } - - for (FinancialStatementAmounts financialStatementAmount : subFinancialStatementAmounts) { - - String label = financialStatementAmount.getLabel(); - int level = financialStatementAmount.getLevel(); - BigDecimal grossAmount = - financialStatementAmount.getGrossAmount(); - if (grossAmount == null) { - grossAmount = new BigDecimal(0); - } - BigDecimal provisionDeprecationAmount = - financialStatementAmount.getProvisionDeprecationAmount(); - if (provisionDeprecationAmount == null) { - provisionDeprecationAmount = new BigDecimal(0); - } - - String fontColor = ""; - if (financialStatementAmount.getSubAmount() && level == 1) { - fontColor = "#CCCCCC"; - } else if (financialStatementAmount.getSubAmount()) { - fontColor = "#C0C0C0"; + if (printedType == 0) { + String[] columnHeaderTable = {boldBegin+_("lima-business.document.label")+boldEnd, boldBegin+_("lima-business.document.grossamount")+boldEnd, + boldBegin+_("lima-business.document.provisiondeprecationamount")+boldEnd, boldBegin+_("lima-business.document.netamount")+boldEnd}; + financialReport += constructTableLine(columnHeaderTable); + } else if (printedType == 1) { + String[] columnHeaderTable = {boldBegin+_("lima-business.document.label")+boldEnd, boldBegin+_("lima-business.document.amount")+boldEnd}; + financialReport += constructTableLine(columnHeaderTable); } else { - fontColor = "#999999"; + String[] columnHeaderTable = {boldBegin+_("lima-business.document.label")+boldEnd, boldBegin+_("lima-business.document.amount")+boldEnd}; + financialReport += constructTableLine(columnHeaderTable); } - if (label == null) { - if (printedType == 0) { - String [] emptyColumn = {"","","",""}; - financialReport += constructTableLine(emptyColumn); - } else { - String [] emptyColumn = {"", ""}; - financialReport += constructTableLine(emptyColumn); + + for (FinancialStatementAmounts financialStatementAmount : list) { + + String label = financialStatementAmount.getLabel(); + int level = financialStatementAmount.getLevel(); + BigDecimal grossAmount = + financialStatementAmount.getGrossAmount(); + if (grossAmount == null) { + grossAmount = new BigDecimal(0); } - } else { - //cell1 - StringBuilder tab = new StringBuilder(); - for (int k = 0; k < level; k++) { - tab.append("\t"); + BigDecimal provisionDeprecationAmount = + financialStatementAmount.getProvisionDeprecationAmount(); + if (provisionDeprecationAmount == null) { + provisionDeprecationAmount = new BigDecimal(0); } - //Phrase phrase; - String tabLabel = ""; - if (financialStatementAmount.getHeader()) { - tabLabel = boldBegin + tab + label + boldEnd; + + String fontColor = ""; + if (financialStatementAmount.getSubAmount() && level == 1) { + fontColor = "#CCCCCC"; + } else if (financialStatementAmount.getSubAmount()) { + fontColor = "#C0C0C0"; } else { - tabLabel = tab + label; + fontColor = "#999999"; } - //cell2 - String grossAmountStr = ""; - if (!grossAmount.equals(BigDecimal.ZERO)) { - grossAmountStr = grossAmount.toString(); - } + if (label == null) { + if (printedType == 0) { + String [] emptyColumn = {"","","",""}; + financialReport += constructTableLine(emptyColumn); + } else { + String [] emptyColumn = {"", ""}; + financialReport += constructTableLine(emptyColumn); + } + } else { + //cell1 + StringBuilder tab = new StringBuilder(); + for (int k = 0; k < level; k++) { + tab.append("\t"); + } + //Phrase phrase; + String tabLabel = ""; + if (financialStatementAmount.getHeader()) { + tabLabel = boldBegin + tab + label + boldEnd; + } else { + tabLabel = tab + label; + } + //cell2 + String grossAmountStr = ""; + if (!grossAmount.equals(BigDecimal.ZERO)) { + grossAmountStr = grossAmount.toString(); + } - //cell 3 - String provisionDeprecationAmountStr = ""; - if (!provisionDeprecationAmount.equals(BigDecimal.ZERO)) { - provisionDeprecationAmountStr = provisionDeprecationAmount.toString(); - } + //cell 3 + String provisionDeprecationAmountStr = ""; + if (!provisionDeprecationAmount.equals(BigDecimal.ZERO)) { + provisionDeprecationAmountStr = provisionDeprecationAmount.toString(); + } - //cell 4 - BigDecimal solde = grossAmount; - solde = solde.subtract(provisionDeprecationAmount); - String soldeStr = ""; - if (!solde.equals(BigDecimal.ZERO)) { - soldeStr = solde.toString(); - } + //cell 4 + BigDecimal solde = grossAmount; + solde = solde.subtract(provisionDeprecationAmount); + String soldeStr = ""; + if (!solde.equals(BigDecimal.ZERO)) { + soldeStr = solde.toString(); + } - if (printedType == 0) { - String [] columns = {tabLabel, grossAmountStr, provisionDeprecationAmountStr, soldeStr}; - financialReport += constructTableLine(columns); - } else /*if (printedType == 1)*/ { - String [] columns = {tabLabel, soldeStr}; - financialReport += constructTableLine(columns); + if (printedType == 0) { + String [] columns = {tabLabel, grossAmountStr, provisionDeprecationAmountStr, soldeStr}; + financialReport += constructTableLine(columns); + } else /*if (printedType == 1)*/ { + String [] columns = {tabLabel, soldeStr}; + financialReport += constructTableLine(columns); + } } } + i = i + n; + financialReport += "</table>"; } - i = i + n; - financialReport += "</table>"; } } financialReport += "</body>" + @@ -263,8 +261,6 @@ } //############## Ledger ############## - - @Override public String createLedgerDocuments(Date beginDate, Date endDate) throws LimaException { @@ -292,31 +288,15 @@ //create pages int i = 0; int n = list.size(); - int max = n; + boolean even = true; + BigDecimal currentAmountDebit = new BigDecimal(0); + BigDecimal currentAmountCredit = new BigDecimal(0); + while (i < n) { - int j = i + max; - if (j > n) { - j = n; - } ledgerReport += constructHeaderTitle(_("lima-business.document.ledger"), beginDate, endDate); - BigDecimal currentAmountDebit = new BigDecimal(0); - BigDecimal currentAmountCredit = new BigDecimal(0); - String accountcarry = ""; - - List<Object> subList = list.subList(i, j); - - - //backward amounts - if (n > max ) { - String [] columnsCarryBack = {boldBegin + accountcarry + boldEnd, boldBegin + _("lima-business.document.carryback") + boldEnd, - boldBegin + currentAmountDebit.toString() + boldEnd, boldBegin + currentAmountCredit.toString() + boldEnd, - boldBegin + currentAmountDebit.subtract(currentAmountCredit).toString() + boldEnd}; - ledgerReport += constructTableLine(columnsCarryBack); - } - ledgerReport += "<table align=\"left\" border=\"1\" cellpadding=\"3\" cellspacing=\"0\" style=\"font-size:13px;\" >\n"; String [] columnsNames = {_("lima-business.document.account"), _("lima-business.document.debit"), @@ -325,8 +305,8 @@ ledgerReport += "<tbody>\n"; int indexEntry = -1; - boolean even = true; - for (Object object : subList) { + + for (Object object : list) { if (object instanceof ReportsDatas) { if (indexEntry != -1) { indexEntry = -1; @@ -385,43 +365,30 @@ } } - for (Object objectList : subList) { - if (objectList instanceof Entry) { - Entry entry = (Entry) objectList; - if (entry.getDebit()) { - currentAmountDebit = currentAmountDebit.add(entry.getAmount()); - } else { - currentAmountCredit = currentAmountCredit.add(entry.getAmount()); - } + for (Object objectList : list) { + if (objectList instanceof Entry) { + Entry entry = (Entry) objectList; + if (entry.getDebit()) { + currentAmountDebit = currentAmountDebit.add(entry.getAmount()); } else { - ReportsDatas reportsDatas = (ReportsDatas) objectList; - Account account = reportsDatas.getAccount(); - if (account != null) { - accountcarry = account.getAccountNumber() - + " " + account.getLabel() + " "; - } + currentAmountCredit = currentAmountCredit.add(entry.getAmount()); } + } else { + ReportsDatas reportsDatas = (ReportsDatas) objectList; } - //forward amounts - if (n > max && i <= n - max) { - String [] columnsTable = {"", boldBegin + _("lima-business.document.carryforward") + boldEnd, - boldBegin + currentAmountDebit.toString() + boldEnd, boldBegin + currentAmountCredit.toString() + boldEnd, - boldBegin + currentAmountDebit.subtract(currentAmountCredit).toString() + boldEnd}; - ledgerReport += constructTableLine(columnsTable, even); - even = !even; - } - //final amounts - if (i >= n - max) { - String [] columnsTable = { boldBegin + _("lima-business.document.amounts") + boldEnd, - boldBegin + currentAmountDebit.toString() + boldEnd, boldBegin + currentAmountCredit.toString() + boldEnd, - boldBegin + currentAmountDebit.subtract(currentAmountCredit).toString() + boldEnd}; - ledgerReport += constructTableLine(columnsTable, even); - even = !even; - } - i = i + max; + } + + i = i + n; } + //final amounts + String [] columnsTable = { boldBegin + _("lima-business.document.amounts") + boldEnd, + boldBegin + currentAmountDebit.toString() + boldEnd, boldBegin + currentAmountCredit.toString() + boldEnd, + boldBegin + currentAmountDebit.subtract(currentAmountCredit).toString() + boldEnd}; + ledgerReport += constructTableLine(columnsTable, even); + + ledgerReport += "</tbody></table></body>\n</html>"; - }catch (Exception ex) { + } catch (Exception ex) { log.error("Can't create document", ex); } } @@ -476,13 +443,16 @@ String subTitleSecPart = _("lima-business.document.date") + " : " + simpleDateFormat.format(closedPeriodicEntryBook.getFinancialPeriod().getBeginDate()); - if (!journal.equals(closedPeriodicEntryBook.getEntryBook().getLabel())) { - entryBookReport += constructSubTitleHtml(_("lima-business.document.entrybook") - + " : " + closedPeriodicEntryBook.getEntryBook().getLabel(), - subTitleSecPart); - journal = closedPeriodicEntryBook.getEntryBook().getLabel(); - } else { - entryBookReport += constructSubTitleHtml("", subTitleSecPart); + if (closedPeriodicEntryBook.getEntryBook() != null) { + String label = Strings.isNullOrEmpty(closedPeriodicEntryBook.getEntryBook().getLabel()) == true ? "-" :closedPeriodicEntryBook.getEntryBook().getLabel(); + if (!journal.equals(label)) { + entryBookReport += constructSubTitleHtml(_("lima-business.document.entrybook") + + " : " + label, + subTitleSecPart); + journal = label; + } else { + entryBookReport += constructSubTitleHtml("", subTitleSecPart); + } } entryBookReport += "<table border=\"1\" width=\"100%\" cellpadding=\"3\" cellspacing=\"0\">\n" + @@ -546,12 +516,8 @@ int i = 0; int n = list.size(); + boolean even = true; while (i < n) { - int j = i + n; - if (j > n) { - j = n; - } - List<ReportsDatas> subList = list.subList(i, j); balanceReport += constructHeaderTitle(_("lima-business.document.balance"), beginDate, endDate); @@ -563,18 +529,7 @@ balanceReport += constructTableHeader(columnsNames); balanceReport += "\t\t<tbody>\n"; - if (n > n) { - String boldBegin = "<b>"; - String boldEnd = "</b>"; - String [] columnsBalanceAmount = {"", boldBegin + _("lima-business.document.carryback") + boldEnd, - boldBegin + currentAmountDebit.toString() + boldEnd, boldBegin + currentAmountCredit.toString() + boldEnd, - boldBegin + currentSoldeDebit.toString() + boldEnd,boldBegin + currentSoldeCredit.toString() + boldEnd}; - balanceReport += constructTableLine(columnsBalanceAmount); - balanceReport += "</tbody></table>\n"; - } - - boolean even = true; - for (ReportsDatas reportsDatas : subList) { + for (ReportsDatas reportsDatas : list) { String soldeDebit = String.valueOf(reportsDatas.getSoldeDebit() ? reportsDatas.getAmountSolde() : 0); String soldeCredit = String.valueOf(reportsDatas.getSoldeDebit() ? 0 : reportsDatas.getAmountSolde()); @@ -583,9 +538,7 @@ soldeDebit, soldeCredit}; balanceReport += constructTableLine(columnsBalanceAmount, even); even = !even; - } - for (ReportsDatas reportsDatas : subList) { currentAmountDebit = currentAmountDebit.add(reportsDatas.getAmountDebit()); currentAmountCredit = currentAmountCredit.add(reportsDatas.getAmountCredit()); if (reportsDatas.getSoldeDebit()) { @@ -595,30 +548,18 @@ } } - if (n > n && i <= n - n) { - String boldBegin = "<b>"; - String boldEnd = "</b>"; - String [] columnsBalanceAmount = {"", boldBegin + _("lima-business.document.carryforward") + boldEnd, - boldBegin + currentAmountDebit.toString() + boldEnd, boldBegin + currentAmountCredit.toString() + boldEnd, - boldBegin + currentSoldeDebit.toString() + boldEnd,boldBegin + currentSoldeCredit.toString() + boldEnd}; - balanceReport += constructTableLine(columnsBalanceAmount, even); - even = !even; - balanceReport += "</tbody></table>\n"; - } - - //final amounts - if (i >= n - n) { - String boldBegin = "<b>"; - String boldEnd = "</b>"; - String [] columnsBalanceAmount = {"", boldBegin + _("lima-business.document.amounts") + boldEnd, - boldBegin + currentAmountDebit.toString() + boldEnd, boldBegin + currentAmountCredit.toString() + boldEnd, - boldBegin + currentSoldeDebit.toString() + boldEnd,boldBegin + currentSoldeCredit.toString() + boldEnd}; - balanceReport += constructTableLine(columnsBalanceAmount, even); - even = !even; - balanceReport += "</tbody></table>\n"; - } i = i + n; } + //final amounts + String boldBegin = "<b>"; + String boldEnd = "</b>"; + String [] columnsBalanceAmount = {"", boldBegin + _("lima-business.document.amounts") + boldEnd, + boldBegin + currentAmountDebit.toString() + boldEnd, boldBegin + currentAmountCredit.toString() + boldEnd, + boldBegin + currentSoldeDebit.toString() + boldEnd,boldBegin + currentSoldeCredit.toString() + boldEnd}; + balanceReport += constructTableLine(columnsBalanceAmount, even); + balanceReport += "</tbody></table>\n"; + + balanceReport += "</body>\n</html>"; } catch (Exception ex) { log.error("Can't create document", ex); @@ -742,7 +683,7 @@ if (!entryBookCode.equals(generalEntryBooksDataInList.getCode())) { entryBookCode = generalEntryBooksDataInList.getCode(); code = entryBookCode; - description = generalEntryBooksDataInList.getDescription(); + description = Strings.isNullOrEmpty(generalEntryBooksDataInList.getDescription()) == true ? "" : generalEntryBooksDataInList.getDescription(); } else { code = ""; description = ""; @@ -1004,41 +945,43 @@ String boldItalicBegin = "<b>" + "<i>"; String boldItalicEnd = "</i>" + "</b>"; - String [] columnsNameSociety = {boldItalicBegin + _("lima-business.document.society") + boldItalicEnd, - "<i>" + (StringUtils.isNotEmpty(identity.getName()) ? identity.getName() : " - ") + "</i>", }; - headerTitle += constructTableLine(columnsNameSociety); + if (identity != null) { + String [] columnsNameSociety = {boldItalicBegin + _("lima-business.document.society") + boldItalicEnd, + "<i>" + (StringUtils.isNotEmpty(identity.getName()) ? identity.getName() : " - ") + "</i>", }; + headerTitle += constructTableLine(columnsNameSociety); - String [] columnsDescription = {boldItalicBegin + _("lima-business.document.description") + boldItalicEnd, - "<i>" + (StringUtils.isNotEmpty(identity.getDescription()) ? identity.getDescription() : " - ") + "</i>", }; - headerTitle += constructTableLine(columnsDescription); + String [] columnsDescription = {boldItalicBegin + _("lima-business.document.description") + boldItalicEnd, + "<i>" + (StringUtils.isNotEmpty(identity.getDescription()) ? identity.getDescription() : " - ") + "</i>", }; + headerTitle += constructTableLine(columnsDescription); - String [] columnsAdressOne = {boldItalicBegin + _("lima-business.document.adress") + boldItalicEnd, - "<i>" + (StringUtils.isNotEmpty(identity.getAddress()) ? identity.getAddress() : " - ") + "</i>", }; - headerTitle += constructTableLine(columnsAdressOne); + String [] columnsAdressOne = {boldItalicBegin + _("lima-business.document.adress") + boldItalicEnd, + "<i>" + (StringUtils.isNotEmpty(identity.getAddress()) ? identity.getAddress() : " - ") + "</i>", }; + headerTitle += constructTableLine(columnsAdressOne); - String [] columnsAdressTwo = {boldItalicBegin + _("lima-business.document.adresssuite") + boldItalicEnd, - "<i>" + (StringUtils.isNotEmpty(identity.getAddress2()) ? identity.getAddress2() : " - ") + "</i>", }; - headerTitle += constructTableLine(columnsAdressTwo); + String [] columnsAdressTwo = {boldItalicBegin + _("lima-business.document.adresssuite") + boldItalicEnd, + "<i>" + (StringUtils.isNotEmpty(identity.getAddress2()) ? identity.getAddress2() : " - ") + "</i>", }; + headerTitle += constructTableLine(columnsAdressTwo); - String [] columnsZipCode = {boldItalicBegin + _("lima-business.document.zipcode") + boldItalicEnd, - "<i>" + (StringUtils.isNotEmpty(identity.getZipCode()) ? identity.getZipCode() : " - ") + "</i>", }; - headerTitle += constructTableLine(columnsZipCode); + String [] columnsZipCode = {boldItalicBegin + _("lima-business.document.zipcode") + boldItalicEnd, + "<i>" + (StringUtils.isNotEmpty(identity.getZipCode()) ? identity.getZipCode() : " - ") + "</i>", }; + headerTitle += constructTableLine(columnsZipCode); - String [] columnsCity = {boldItalicBegin + _("lima-business.document.city") + boldItalicEnd, - "<i>" + (StringUtils.isNotEmpty(identity.getCity()) ? identity.getCity() : " - ") + "</i>", }; - headerTitle += constructTableLine(columnsCity); + String [] columnsCity = {boldItalicBegin + _("lima-business.document.city") + boldItalicEnd, + "<i>" + (StringUtils.isNotEmpty(identity.getCity()) ? identity.getCity() : " - ") + "</i>", }; + headerTitle += constructTableLine(columnsCity); - String [] columnsBusinessNumber = {boldItalicBegin + _("lima-business.document.businessnumber") + - boldItalicEnd, "<i>" + (StringUtils.isNotEmpty(identity.getBusinessNumber()) ? identity.getBusinessNumber() : " - ") + "</i>"}; - headerTitle += constructTableLine(columnsBusinessNumber); + String [] columnsBusinessNumber = {boldItalicBegin + _("lima-business.document.businessnumber") + + boldItalicEnd, "<i>" + (StringUtils.isNotEmpty(identity.getBusinessNumber()) ? identity.getBusinessNumber() : " - ") + "</i>"}; + headerTitle += constructTableLine(columnsBusinessNumber); - String [] columnsClassifCode = {boldItalicBegin + _("lima-business.document.classificationcode") + - boldItalicEnd, "<i>" + (StringUtils.isNotEmpty(identity.getClassificationCode()) ? identity.getClassificationCode() : " - ") + "</i>"}; - headerTitle += constructTableLine(columnsClassifCode); + String [] columnsClassifCode = {boldItalicBegin + _("lima-business.document.classificationcode") + + boldItalicEnd, "<i>" + (StringUtils.isNotEmpty(identity.getClassificationCode()) ? identity.getClassificationCode() : " - ") + "</i>"}; + headerTitle += constructTableLine(columnsClassifCode); - String [] columnsVatNumber = {boldItalicBegin + _("lima-business.document.vatnumber") + boldItalicEnd, - "<i>" + (StringUtils.isNotEmpty(identity.getVatNumber()) ? identity.getVatNumber() : " - ") + "</i>", }; - headerTitle += constructTableLine(columnsVatNumber); + String [] columnsVatNumber = {boldItalicBegin + _("lima-business.document.vatnumber") + boldItalicEnd, + "<i>" + (StringUtils.isNotEmpty(identity.getVatNumber()) ? identity.getVatNumber() : " - ") + "</i>", }; + headerTitle += constructTableLine(columnsVatNumber); + } String [] columnsPeriodOne = {boldItalicBegin + _("lima-business.document.period1") + boldItalicEnd, "<i>" + _("lima-business.document.period1format", beginDate)+ "</i>"}; Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java 2014-02-14 14:59:24 UTC (rev 3745) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java 2014-02-14 18:06:21 UTC (rev 3746) @@ -216,7 +216,7 @@ // display result dialog if (verboseMode) { String result = get(); - if (result.equals(null)) { + if (Strings.isNullOrEmpty(null)) { JOptionPane.showMessageDialog(viewComponent, _("lima.ui.importexport.importerror"), _("lima.ui.importexport.importtitle"), JOptionPane.ERROR_MESSAGE);
participants (1)
-
dcosse@users.chorem.org