Skip to content

Commit

Permalink
Fix two coverity warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
simonharrer committed Feb 22, 2016
1 parent 702913b commit 6d128a2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
3 changes: 2 additions & 1 deletion src/main/java/net/sf/jabref/gui/help/AboutDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,12 @@
import javax.swing.text.StyleConstants;
import javax.swing.text.StyledDocument;
import java.awt.*;
import java.util.Objects;

public class AboutDialog extends JDialog {

public AboutDialog(JabRefFrame bf) {
super(bf, Localization.lang("About JabRef"), true);
super(Objects.requireNonNull(bf), Localization.lang("About JabRef"), true);
setSize(new Dimension(750, 600));
setLocationRelativeTo(null);

Expand Down
10 changes: 3 additions & 7 deletions src/main/java/net/sf/jabref/sql/DBConnectDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@
import java.awt.BorderLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Optional;
import java.util.*;

import javax.swing.*;

Expand Down Expand Up @@ -54,13 +51,12 @@ public class DBConnectDialog extends JDialog {

/** Creates a new instance of DBConnectDialog */
public DBConnectDialog(JFrame parent, DBStrings dbs) {

super(parent, Localization.lang("Connect to SQL database"), true);
super(Objects.requireNonNull(parent), Localization.lang("Connect to SQL database"), true);

this.setResizable(false);
this.setLocationRelativeTo(parent);

dbStrings = dbs;
dbStrings = Objects.requireNonNull(dbs);;

// build collections of components
ArrayList<JLabel> lhs = new ArrayList<>();
Expand Down

0 comments on commit 6d128a2

Please sign in to comment.