Issue#11 Replaced "!(a==null)" by "a!=null"

This commit is contained in:
Didier Clermonté 2016-06-07 21:50:23 +02:00
parent 01534e39c5
commit 1fa3fbd8b3
4 changed files with 9 additions and 9 deletions

View File

@ -183,7 +183,7 @@ public class SibaCLI
{ {
System.err.println("SibaException = " + sibaException.getMessage()); System.err.println("SibaException = " + sibaException.getMessage());
sibaException.printStackTrace(); sibaException.printStackTrace();
if (!(sibaException.getCause() == null)) if (sibaException.getCause() != null)
{ {
logger.info("SibaException chainée = " + sibaException.getCause().getMessage()); logger.info("SibaException chainée = " + sibaException.getCause().getMessage());
} }

View File

@ -107,7 +107,7 @@ public class BackupPanel extends JPanel
public void actionPerformed(final ActionEvent e) public void actionPerformed(final ActionEvent e)
{ {
File file = SourceDirectorySelector.showSelectorDialog(null, null); File file = SourceDirectorySelector.showSelectorDialog(null, null);
if (!(file == null)) if (file != null)
{ {
BackupPanel.this.sourceDirectoryField.setText(file.getPath()); BackupPanel.this.sourceDirectoryField.setText(file.getPath());
} }
@ -135,7 +135,7 @@ public class BackupPanel extends JPanel
{ {
File file = TargetDirectorySelector.showSelectorDialog(null, null); File file = TargetDirectorySelector.showSelectorDialog(null, null);
if (!(file == null)) if (file != null)
{ {
BackupPanel.this.textField_1.setText(file.getPath()); BackupPanel.this.textField_1.setText(file.getPath());
} }
@ -198,7 +198,7 @@ public class BackupPanel extends JPanel
catch (SibaException sibaException) catch (SibaException sibaException)
{ {
String dataMissing = sibaException.getMessage(); String dataMissing = sibaException.getMessage();
if (!(sibaException.getCause() == null)) if (sibaException.getCause() != null)
{ {
dataMissing.concat(sibaException.getCause().getMessage()); dataMissing.concat(sibaException.getCause().getMessage());
} }

View File

@ -116,7 +116,7 @@ public class CheckPanel extends JPanel
try try
{ {
if (!(CheckPanel.choosenFile == null) && CheckPanel.choosenFile.exists()) if ((CheckPanel.choosenFile != null) && CheckPanel.choosenFile.exists())
{ {
boolean check = SibaManager.check(CheckPanel.choosenFile); boolean check = SibaManager.check(CheckPanel.choosenFile);
String titre = BUNDLE.getString("CheckPanel.confirmDialogTitle.text"); String titre = BUNDLE.getString("CheckPanel.confirmDialogTitle.text");
@ -156,7 +156,7 @@ public class CheckPanel extends JPanel
File result; File result;
CheckPanel.choosenFile = CheckDirectorySelector.showSelectorDialog(null, null); CheckPanel.choosenFile = CheckDirectorySelector.showSelectorDialog(null, null);
if (!(CheckPanel.choosenFile == null) && CheckPanel.choosenFile.exists()) if ((CheckPanel.choosenFile != null) && CheckPanel.choosenFile.exists())
{ {
CheckPanel.textField.setText(CheckPanel.choosenFile.getName()); CheckPanel.textField.setText(CheckPanel.choosenFile.getName());
result = CheckPanel.choosenFile; result = CheckPanel.choosenFile;

View File

@ -207,7 +207,7 @@ public class SibaGUI
{ {
tabbedPane.setSelectedIndex(0); tabbedPane.setSelectedIndex(0);
File file = SourceDirectorySelector.showSelectorDialog(null, null); File file = SourceDirectorySelector.showSelectorDialog(null, null);
if (!(file == null)) if (file != null)
{ {
((BackupPanel) SibaGUI.this.backupPanel).setSourceDirectory(file.getPath()); ((BackupPanel) SibaGUI.this.backupPanel).setSourceDirectory(file.getPath());
} }
@ -229,7 +229,7 @@ public class SibaGUI
File result; File result;
CheckPanel.choosenFile = CheckDirectorySelector.showSelectorDialog(null, null); CheckPanel.choosenFile = CheckDirectorySelector.showSelectorDialog(null, null);
if (!(CheckPanel.choosenFile == null) && CheckPanel.choosenFile.exists()) if ((CheckPanel.choosenFile != null) && CheckPanel.choosenFile.exists())
{ {
CheckPanel.textField.setText(CheckPanel.choosenFile.getName()); CheckPanel.textField.setText(CheckPanel.choosenFile.getName());
result = CheckPanel.choosenFile; result = CheckPanel.choosenFile;
@ -321,7 +321,7 @@ public class SibaGUI
{ {
sibaException.printStackTrace(); sibaException.printStackTrace();
String dataMissing = sibaException.getMessage(); String dataMissing = sibaException.getMessage();
if (!(sibaException.getCause() == null)) if (sibaException.getCause() != null)
{ {
logger.info("SibaException chainée = " + sibaException.getCause().getMessage()); logger.info("SibaException chainée = " + sibaException.getCause().getMessage());
// dataMissing.concat(sibaException.getCause().getMessage()); // dataMissing.concat(sibaException.getCause().getMessage());