Skip to content

Commit

Permalink
sonarqube fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
j-dimension committed Dec 20, 2023
1 parent 495963f commit 68661e1
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6102,14 +6102,11 @@ private void chkArchivedActionPerformed(java.awt.event.ActionEvent evt) {//GEN-F
if(this.tblAccountEntries.getRowCount()==0) {
this.loadAccountEntries();
}
List<CaseAccountEntry> accountEntries=new ArrayList<>();
float totalEscrow=0f;
//float totalEarnings=0f;
float totalExpenditures=0f;
for(int r=0;r<this.tblAccountEntries.getRowCount();r++) {
AccountEntryRowIdentifier ident=(AccountEntryRowIdentifier)this.tblAccountEntries.getValueAt(r, 0);
totalEscrow=totalEscrow+ident.getAccountEntry().getEscrowIn() - ident.getAccountEntry().getEscrowOut();
//totalEarnings=totalEarnings+ident.getAccountEntry().getEarnings() - ident.getAccountEntry().getSpendings();
totalExpenditures=totalExpenditures+ident.getAccountEntry().getExpendituresIn()-ident.getAccountEntry().getExpendituresOut();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -680,8 +680,6 @@ public class CaseAccountEntryDialog extends javax.swing.JDialog {
private static final Logger log=Logger.getLogger(CaseAccountEntryDialog.class.getName());

private CaseAccountEntry entry=null;
private ArchiveFileBean caseDto=null;
private final List<Invoice> invoices;

/**
* Creates new form CaseAccountEntryDialog
Expand All @@ -696,15 +694,13 @@ public CaseAccountEntryDialog(java.awt.Frame parent, boolean modal, ArchiveFileB
super(parent, modal);
initComponents();
this.entry=entry;
this.caseDto=dto;


this.caseAccountEntryPanel1.setCaseEntry(caseDto);
this.caseAccountEntryPanel1.setCaseEntry(dto);
this.caseAccountEntryPanel1.setParentDialog(this);
this.caseAccountEntryPanel1.setAddresses(addresses);
this.caseAccountEntryPanel1.setInvoices(invoices);
this.caseAccountEntryPanel1.setEntry(entry);
this.invoices = invoices;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2753,6 +2753,9 @@ public void messagesRemoved(MessageCountEvent mce) {
if (mce.getMessages().length == 0) {
return;
}
if(mce.getMessages()[0]==null)
return;

MailboxSetup ms = EmailUtils.getMailboxSetup(mce.getMessages()[0]);
if(ms==null) {
log.warn("can not determine mailbox setup of removed message");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -791,6 +791,13 @@ public static boolean hasAttachment(Message msg) throws Exception {
}

public static MailboxSetup getMailboxSetup(Message msg) throws Exception {

if(msg==null)
return null;

if(msg.getFolder()==null)
return null;

boolean opened=false;
try {
UserSettings uset = UserSettings.getInstance();
Expand Down

0 comments on commit 68661e1

Please sign in to comment.