Ref: add new static analyser rule: bestpractices.xml/UnusedAssignment
This commit is contained in:
@@ -112,7 +112,7 @@ public class Utils {
|
||||
if (password != null) {
|
||||
zipInputStream.setPassword(password);
|
||||
}
|
||||
LocalFileHeader fileHeader = null;
|
||||
LocalFileHeader fileHeader;
|
||||
while ((fileHeader = zipInputStream.getNextEntry()) != null) {
|
||||
String outFilePath = destinationDirectory + File.separator + fileHeader.getFileName();
|
||||
File outFile = new File(outFilePath);
|
||||
@@ -130,7 +130,7 @@ public class Utils {
|
||||
|
||||
FileOutputStream os = new FileOutputStream(outFile);
|
||||
|
||||
int readLen = -1;
|
||||
int readLen;
|
||||
byte[] buff = new byte[1024];
|
||||
|
||||
//Loop until End of File and write the contents to the output stream
|
||||
@@ -354,8 +354,8 @@ public class Utils {
|
||||
* Examples: 4,20GB, 20,00TB, 3,69MB
|
||||
*/
|
||||
public static String formatDataConsumption(long bytes) {
|
||||
float divider = 0;
|
||||
String suffix = "";
|
||||
float divider;
|
||||
String suffix;
|
||||
|
||||
if (bytes > 1099511627776f) { // 1TB
|
||||
divider = 1099511627776f;
|
||||
|
||||
Reference in New Issue
Block a user