checkstyle: forbid inner assignments

This commit is contained in:
Daniel Martí 2015-12-29 12:55:29 +01:00
parent 6a0c230493
commit 0f27374452
3 changed files with 7 additions and 4 deletions

View File

@ -72,14 +72,16 @@ public class Hasher {
digest.update(buffer, 0, read); digest.update(buffer, 0, read);
} }
} catch (Exception e) { } catch (Exception e) {
return hashCache = ""; hashCache = "";
return hashCache;
} finally { } finally {
Utils.closeQuietly(input); Utils.closeQuietly(input);
} }
} else { } else {
digest.update(array); digest.update(array);
} }
return hashCache = hex(digest.digest()); hashCache = hex(digest.digest());
return hashCache;
} }
// Compare the calculated hash to another string, ignoring case, // Compare the calculated hash to another string, ignoring case,

View File

@ -83,7 +83,8 @@ public class AsyncDownloaderFromAndroid implements AsyncDownloader {
} }
// Check if the download is complete // Check if the download is complete
if ((downloadManagerId = isDownloadComplete(context, uniqueDownloadId)) > 0) { downloadManagerId = isDownloadComplete(context, uniqueDownloadId);
if (downloadManagerId > 0) {
// clear the download // clear the download
dm.remove(downloadManagerId); dm.remove(downloadManagerId);

View File

@ -89,7 +89,7 @@
<module name="EmptyStatement" /> <module name="EmptyStatement" />
<!--<module name="HiddenField" />--> <!--<module name="HiddenField" />-->
<module name="IllegalInstantiation" /> <module name="IllegalInstantiation" />
<!--<module name="InnerAssignment" />--> <module name="InnerAssignment" />
<module name="DefaultComesLast" /> <module name="DefaultComesLast" />
<!--<module name="MissingSwitchDefault" />--> <!--<module name="MissingSwitchDefault" />-->
<module name="FallThrough" /> <module name="FallThrough" />