Skip to content

Commit

Permalink
Removed unused variable
Browse files Browse the repository at this point in the history
  • Loading branch information
oscargus committed Jul 20, 2016
1 parent 31bc3da commit 436aae0
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@

import java.awt.event.ActionEvent;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;

import javax.swing.Action;
import javax.swing.JButton;
Expand Down Expand Up @@ -52,7 +50,6 @@ public void actionPerformed(ActionEvent e) {
if (messages.isEmpty()) {
JOptionPane.showMessageDialog(frame.getCurrentBasePanel(), Localization.lang("No problems found."));
} else {
Set<String> messageVariants = new HashSet<>();
Map<String, Boolean> showMessage = new HashMap<>();
// prepare data model
Object[][] model = new Object[messages.size()][3];
Expand All @@ -61,7 +58,6 @@ public void actionPerformed(ActionEvent e) {
model[i][0] = message.getEntry().getCiteKey();
model[i][1] = message.getFieldName();
model[i][2] = message.getMessage();
messageVariants.add(message.getMessage());
showMessage.put(message.getMessage(), true);
i++;
}
Expand Down Expand Up @@ -90,9 +86,9 @@ public boolean include(Entry<?, ?> entry) {
selectionModel.addListSelectionListener(event -> {
if (!event.getValueIsAdjusting()) {
try {
String citeKey = (String) model[table.convertRowIndexToModel(table.getSelectedRow())][0];
String fieldName = (String) model[table.convertRowIndexToModel(table.getSelectedRow())][1];
frame.getCurrentBasePanel().editEntryByKeyAndFocusField(citeKey, fieldName);
String citeKey = (String) model[table.convertRowIndexToModel(table.getSelectedRow())][0];
String fieldName = (String) model[table.convertRowIndexToModel(table.getSelectedRow())][1];
frame.getCurrentBasePanel().editEntryByKeyAndFocusField(citeKey, fieldName);
} catch (ArrayIndexOutOfBoundsException exception) {
// Ignore -- most likely caused by filtering out the earlier selected row
}
Expand Down

0 comments on commit 436aae0

Please sign in to comment.