basic code review
This commit is contained in:
parent
9765c9495e
commit
4ae0e5aad5
@ -37,15 +37,17 @@ public final class Siba
|
||||
{
|
||||
private static Logger logger = LoggerFactory.getLogger(Siba.class);
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private Siba()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param args
|
||||
* arguments
|
||||
* arguments if no argument launch GUI else CLI
|
||||
*/
|
||||
public static void main(final String[] args)
|
||||
{
|
||||
|
@ -40,9 +40,11 @@ public final class SibaCLI
|
||||
private static Logger logger = LoggerFactory.getLogger(SibaCLI.class);
|
||||
private static final ResourceBundle BUNDLE = ResourceBundle.getBundle("org.dclermonte.siba.cli.messages");
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private SibaCLI()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -79,12 +81,12 @@ public final class SibaCLI
|
||||
|
||||
/**
|
||||
*
|
||||
* This method is called for Check from CLI. anObject
|
||||
* This method is called for Check from CLI.
|
||||
*
|
||||
* @param fileToCheck
|
||||
* The file to be check
|
||||
* @throws SibaException
|
||||
* specific exception
|
||||
* specific exception file not found
|
||||
*/
|
||||
public static void check(final File fileToCheck) throws SibaException
|
||||
{
|
||||
@ -222,7 +224,6 @@ public final class SibaCLI
|
||||
System.out.println(BUNDLE.getString("badUsage.text"));
|
||||
help();
|
||||
}
|
||||
|
||||
}
|
||||
catch (SibaException exception)
|
||||
{
|
||||
|
@ -59,7 +59,6 @@ public class AboutDialog extends JDialog
|
||||
*/
|
||||
public AboutDialog() throws IOException
|
||||
{
|
||||
|
||||
setMinimumSize(new Dimension(600, 350));
|
||||
setMaximumSize(new Dimension(600, 500));
|
||||
setIconImage(Toolkit.getDefaultToolkit()
|
||||
@ -130,5 +129,4 @@ public class AboutDialog extends JDialog
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -107,9 +107,7 @@ public class BackupPanel extends JPanel
|
||||
{
|
||||
BackupPanel.this.sourceDirectoryField.setText(file.getPath());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
choosePanel.add(btnSourceDirectory, "6, 2");
|
||||
|
||||
@ -129,13 +127,11 @@ public class BackupPanel extends JPanel
|
||||
@Override
|
||||
public void actionPerformed(final ActionEvent e)
|
||||
{
|
||||
|
||||
File file = TargetDirectorySelector.showSelectorDialog(BackupPanel.this, null);
|
||||
if (file != null)
|
||||
{
|
||||
BackupPanel.this.targetDirectoryField.setText(file.getPath());
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
choosePanel.add(btnTarget, "6, 4");
|
||||
@ -204,7 +200,6 @@ public class BackupPanel extends JPanel
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -36,7 +36,6 @@ public class TargetDirectorySelector extends JFileChooser
|
||||
if ((targetFile == null) || (StringUtils.isBlank(targetFile.getAbsolutePath())))
|
||||
{
|
||||
file = null;
|
||||
|
||||
}
|
||||
else if (targetFile.isFile())
|
||||
{
|
||||
|
@ -37,7 +37,6 @@ public final class GUIToolBox
|
||||
*/
|
||||
private GUIToolBox()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -42,9 +42,11 @@ public final class SibaUtils
|
||||
{
|
||||
static final String DEFAULT_CHARSET = "UTF-8";
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private SibaUtils()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -89,6 +91,7 @@ public final class SibaUtils
|
||||
public static File createMD5File(final String md5, final String fileName, final String target) throws IOException
|
||||
{
|
||||
File result;
|
||||
|
||||
FileWriter out = null;
|
||||
try
|
||||
{
|
||||
@ -121,6 +124,7 @@ public final class SibaUtils
|
||||
public static String loadMD5Sum(final File choosenFile) throws IOException
|
||||
{
|
||||
String result;
|
||||
|
||||
FileReader in = null;
|
||||
try
|
||||
{
|
||||
@ -189,6 +193,7 @@ public final class SibaUtils
|
||||
}
|
||||
fileInputStream.close();
|
||||
|
||||
//
|
||||
result = hashString.toString();
|
||||
}
|
||||
finally
|
||||
|
Loading…
Reference in New Issue
Block a user