mirror of
https://github.com/nextcloud/android.git
synced 2024-11-24 14:15:44 +03:00
codacy: Avoid declaring a variable if it is unreferenced before a possible exit point.
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
parent
fc324504f2
commit
ccd05b51ba
2 changed files with 3 additions and 3 deletions
|
@ -144,7 +144,6 @@ public class ChooseRichDocumentsTemplateDialogFragment extends DialogFragment im
|
||||||
int accentColor = ThemeUtils.primaryAccentColor(getContext());
|
int accentColor = ThemeUtils.primaryAccentColor(getContext());
|
||||||
|
|
||||||
parentFolder = arguments.getParcelable(ARG_PARENT_FOLDER);
|
parentFolder = arguments.getParcelable(ARG_PARENT_FOLDER);
|
||||||
Type type = Type.valueOf(arguments.getString(ARG_TYPE));
|
|
||||||
|
|
||||||
// Inflate the layout for the dialog
|
// Inflate the layout for the dialog
|
||||||
LayoutInflater inflater = activity.getLayoutInflater();
|
LayoutInflater inflater = activity.getLayoutInflater();
|
||||||
|
@ -160,6 +159,7 @@ public class ChooseRichDocumentsTemplateDialogFragment extends DialogFragment im
|
||||||
throw new RuntimeException(e); // we'll NPE without the client
|
throw new RuntimeException(e); // we'll NPE without the client
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Type type = Type.valueOf(arguments.getString(ARG_TYPE));
|
||||||
new FetchTemplateTask(this, client).execute(type);
|
new FetchTemplateTask(this, client).execute(type);
|
||||||
|
|
||||||
listView.setHasFixedSize(true);
|
listView.setHasFixedSize(true);
|
||||||
|
|
|
@ -252,8 +252,6 @@ public class ChooseTemplateDialogFragment extends DialogFragment implements Dial
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
OCFile temp = FileStorageUtils.fillOCFile((RemoteFile) newFileResult.getData().get(0));
|
|
||||||
|
|
||||||
final ChooseTemplateDialogFragment fragment = chooseTemplateDialogFragmentWeakReference.get();
|
final ChooseTemplateDialogFragment fragment = chooseTemplateDialogFragmentWeakReference.get();
|
||||||
if (fragment == null) {
|
if (fragment == null) {
|
||||||
return "";
|
return "";
|
||||||
|
@ -267,6 +265,8 @@ public class ChooseTemplateDialogFragment extends DialogFragment implements Dial
|
||||||
|
|
||||||
FileDataStorageManager storageManager = new FileDataStorageManager(user.toPlatformAccount(),
|
FileDataStorageManager storageManager = new FileDataStorageManager(user.toPlatformAccount(),
|
||||||
context.getContentResolver());
|
context.getContentResolver());
|
||||||
|
|
||||||
|
OCFile temp = FileStorageUtils.fillOCFile((RemoteFile) newFileResult.getData().get(0));
|
||||||
storageManager.saveFile(temp);
|
storageManager.saveFile(temp);
|
||||||
file = storageManager.getFileByPath(path);
|
file = storageManager.getFileByPath(path);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue