Fix redundant initializers

This commit is contained in:
TacoTheDank 2020-05-29 14:53:01 -04:00
parent 71373d055d
commit 24f734f1b6
9 changed files with 10 additions and 10 deletions

View File

@ -113,7 +113,7 @@ public class DirectoryChooserActivity extends AppCompatActivity {
});
butNavUp.setOnClickListener(v -> {
File parent = null;
File parent;
if (selectedDir != null
&& (parent = selectedDir.getParentFile()) != null) {
changeDirectory(parent);

View File

@ -194,7 +194,7 @@ public class NavListAdapter extends BaseAdapter
@Override
public View getView(int position, View convertView, ViewGroup parent) {
int viewType = getItemViewType(position);
View v = null;
View v;
if (viewType == VIEW_TYPE_NAV) {
v = getNavView((String) getItem(position), position, convertView, parent);
} else if (viewType == VIEW_TYPE_SECTION_DIVIDER) {

View File

@ -54,7 +54,7 @@ class NestedScrollableHost extends FrameLayout {
touchSlop = ViewConfiguration.get(context).getScaledTouchSlop();
}
private int touchSlop = 0;
private int touchSlop;
private float initialX = 0f;
private float initialY = 0f;

View File

@ -121,7 +121,7 @@ public class PlayerWidgetJobService extends SafeJobIntentService {
views.setOnClickPendingIntent(R.id.layout_left, startMediaPlayer);
try {
Bitmap icon = null;
Bitmap icon;
int iconSize = getResources().getDimensionPixelSize(android.R.dimen.app_icon_size);
icon = Glide.with(PlayerWidgetJobService.this)
.asBitmap()

View File

@ -189,7 +189,7 @@ public class HttpDownloader extends Downloader {
}
byte[] buffer = new byte[BUFFER_SIZE];
int count = 0;
int count;
request.setStatusMsg(R.string.download_running);
Log.d(TAG, "Getting size of download");
request.setSize(responseBody.contentLength() + request.getSoFar());

View File

@ -582,7 +582,7 @@ public final class DBReader {
}
private static String getImageAuthentication(final String imageUrl, PodDBAdapter adapter) {
String credentials = null;
String credentials;
try (Cursor cursor = adapter.getImageAuthenticationCursor(imageUrl)) {
if (cursor.moveToFirst()) {
String username = cursor.getString(0);

View File

@ -1218,7 +1218,7 @@ public class PodDBAdapter {
public Cursor searchItems(long feedID, String searchQuery) {
String preparedQuery = prepareSearchQuery(searchQuery);
String queryFeedId = "";
String queryFeedId;
if (feedID != 0) {
// search items in specific feed
queryFeedId = KEY_FEED + " = " + feedID;

View File

@ -519,8 +519,8 @@ public class GpodnetService implements ISyncService {
private String executeRequest(@NonNull Request.Builder requestB) throws GpodnetServiceException {
Request request = requestB.build();
String responseString = null;
Response response = null;
String responseString;
Response response;
ResponseBody body = null;
try {

View File

@ -39,7 +39,7 @@ class OggInputStream extends InputStream {
private void readOggPage() throws IOException {
// find OggS
int[] buffer = new int[4];
int c = 0;
int c;
boolean isInOggS = false;
while ((c = input.read()) != -1) {
switch (c) {