Skip to content

Commit bfbd352

Browse files
author
lucianamelo
committed
ArrayIndexOutOfBoundsException was produced when the user tried to apply changes in "Setup selectors" right after closing all databases. Now the exception is caught and a message is shown, telling the user that the changes could not be applied.
1 parent 6a6c4d0 commit bfbd352

File tree

3 files changed

+18
-4
lines changed

3 files changed

+18
-4
lines changed

CHANGELOG

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
[master]
2+
- Fix for bug 958: ArrayIndexOutOfBoundsException on "Content Selector Dialog"
23
- Fix for bug 949: Exception properly logged
34
- Fix for bug 950: NullPointerException on "Manage custom imports"
45
- Feature 850: Keyboard shortcut for 'Cleanup entries' (by eduardogreco)

src/main/java/net/sf/jabref/ContentSelectorDialog2.java

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,14 @@ public void actionPerformed(ActionEvent e) {
251251

252252
ok.addActionListener(new ActionListener() {
253253
public void actionPerformed(ActionEvent e) {
254-
applyChanges();
255-
dispose();
254+
try {
255+
applyChanges();
256+
dispose();
257+
}
258+
catch (Exception ex) {
259+
Globals.logger("Could not apply changes in \"Setup selectors\"");
260+
JOptionPane.showMessageDialog(frame, Globals.lang("Could not apply changes."));
261+
}
256262
}
257263
});
258264

@@ -262,7 +268,13 @@ public void actionPerformed(ActionEvent e) {
262268
if (!wordEditField.getText().equals("")) {
263269
wordEditFieldListener.actionPerformed(null);
264270
}
265-
applyChanges();
271+
try {
272+
applyChanges();
273+
}
274+
catch (Exception ex) {
275+
Globals.logger("Could not apply changes in \"Setup selectors\"");
276+
JOptionPane.showMessageDialog(frame, Globals.lang("Could not apply changes."));
277+
}
266278
}
267279
});
268280

src/main/resources/help/About.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ <h2>Contributions from:</h2>
9292
Waluyo Adi Siswanto,
9393
Eduardo Roberto Greco,
9494
Thiago Gomes Toledo,
95-
Renato Massao Maeda da Silva</p>
95+
Renato Massao Maeda da Silva
96+
Luciana de Melo e Abud</p>
9697

9798
<h2>Thanks to:</h2>
9899

0 commit comments

Comments
 (0)