Issue#30 replaced default initialization by an else statement

This commit is contained in:
Didier Clermonté 2016-06-21 22:14:02 +02:00
parent 3eadf7330a
commit 57e067a9a1

View File

@ -47,7 +47,6 @@ public class SibaUtils
public static String loadMD5Sum(final File choosenFile) throws IOException public static String loadMD5Sum(final File choosenFile) throws IOException
{ {
String result; String result;
result = "";
if (choosenFile.exists() && (choosenFile.length() > 32)) if (choosenFile.exists() && (choosenFile.length() > 32))
{ {
@ -57,6 +56,10 @@ public class SibaUtils
result = line.substring(0, 32); result = line.substring(0, 32);
fileReader.close(); fileReader.close();
} }
else
{
result = "";
}
// //
return result; return result;
@ -124,7 +127,7 @@ public class SibaUtils
{ {
File result; File result;
result = null; // result = null;
if (choosenFile.exists() && (choosenFile.length() > 32)) if (choosenFile.exists() && (choosenFile.length() > 32))
{ {
FileReader fileReader = new FileReader(choosenFile); FileReader fileReader = new FileReader(choosenFile);
@ -142,8 +145,12 @@ public class SibaUtils
String path = System.getProperty("user.dir"); String path = System.getProperty("user.dir");
result = new File(path + "/" + fileNameToString); result = new File(path + "/" + fileNameToString);
} }
}
}
else
{
result = null;
}
// //
return result; return result;
} }