Enforce MultipleVariableDeclarations checkstyle

This commit is contained in:
ByteHamster 2019-10-22 16:53:35 +02:00
parent 6a4754922a
commit cc52fa04fa
5 changed files with 23 additions and 6 deletions

View File

@ -134,7 +134,8 @@ public class NetworkPreferencesFragment extends PreferenceFragmentCompat {
builder1.show(); builder1.show();
}); });
builder.onNegative((dialog, which) -> { builder.onNegative((dialog, which) -> {
int hourOfDay = 7, minute = 0; int hourOfDay = 7;
int minute = 0;
int[] updateTime = UserPreferences.getUpdateTimeOfDay(); int[] updateTime = UserPreferences.getUpdateTimeOfDay();
if (updateTime.length == 2) { if (updateTime.length == 2) {
hourOfDay = updateTime[0]; hourOfDay = updateTime[0];

View File

@ -32,6 +32,7 @@
value="LITERAL_TRY, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE, LITERAL_SWITCH"/> value="LITERAL_TRY, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE, LITERAL_SWITCH"/>
</module> </module>
<module name="OneStatementPerLine"/> <module name="OneStatementPerLine"/>
<module name="MultipleVariableDeclarations"/>
<module name="FallThrough"/> <module name="FallThrough"/>
<module name="UpperEll"/> <module name="UpperEll"/>
<module name="ModifierOrder"/> <module name="ModifierOrder"/>

View File

@ -30,7 +30,8 @@ public class DownloaderUpdate {
DownloaderUpdate(@NonNull List<Downloader> downloaders) { DownloaderUpdate(@NonNull List<Downloader> downloaders) {
this.downloaders = downloaders; this.downloaders = downloaders;
LongList feedIds1 = new LongList(), mediaIds1 = new LongList(); LongList feedIds1 = new LongList();
LongList mediaIds1 = new LongList();
for(Downloader d1 : downloaders) { for(Downloader d1 : downloaders) {
int type = d1.getDownloadRequest().getFeedfileType(); int type = d1.getDownloadRequest().getFeedfileType();
long id = d1.getDownloadRequest().getFeedfileId(); long id = d1.getDownloadRequest().getFeedfileId();

View File

@ -83,7 +83,16 @@ public class FastBlurTransformation extends BitmapTransformation {
int r[] = new int[wh]; int r[] = new int[wh];
int g[] = new int[wh]; int g[] = new int[wh];
int b[] = new int[wh]; int b[] = new int[wh];
int rsum, gsum, bsum, x, y, i, p, yp, yi, yw; int rsum;
int gsum;
int bsum;
int x;
int y;
int i;
int p;
int yp;
int yi;
int yw;
int vmin[] = new int[Math.max(w, h)]; int vmin[] = new int[Math.max(w, h)];
int divsum = (div + 1) >> 1; int divsum = (div + 1) >> 1;
@ -101,8 +110,12 @@ public class FastBlurTransformation extends BitmapTransformation {
int[] sir; int[] sir;
int rbs; int rbs;
int r1 = radius + 1; int r1 = radius + 1;
int routsum, goutsum, boutsum; int routsum;
int rinsum, ginsum, binsum; int goutsum;
int boutsum;
int rinsum;
int ginsum;
int binsum;
for (y = 0; y < h; y++) { for (y = 0; y < h; y++) {
rinsum = ginsum = binsum = routsum = goutsum = boutsum = rsum = gsum = bsum = 0; rinsum = ginsum = binsum = routsum = goutsum = boutsum = rsum = gsum = bsum = 0;

View File

@ -206,7 +206,8 @@ public class ID3Reader {
private int readUnicodeString(StringBuilder strBuffer, InputStream input, int max, Charset charset) private int readUnicodeString(StringBuilder strBuffer, InputStream input, int max, Charset charset)
throws IOException, ID3ReaderException { throws IOException, ID3ReaderException {
byte[] buffer = new byte[max]; byte[] buffer = new byte[max];
int c, cZero = -1; int c;
int cZero = -1;
int i = 0; int i = 0;
for (; i < max; i++) { for (; i < max; i++) {
c = input.read(); c = input.read();