spotbugs: remove redundant null checks

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
Andy Scherzinger 2019-05-12 21:33:57 +02:00
parent 0a9e79988a
commit 2c30e5e9f7
No known key found for this signature in database
GPG key ID: 6CADC7E3523C308B
2 changed files with 4 additions and 10 deletions

View file

@ -379,10 +379,7 @@ public class ShareFileFragment extends Fragment implements ShareUserListAdapter.
@Override @Override
public void onClick(View expirationView) { public void onClick(View expirationView) {
if (mPublicShare != null && mPublicShare.getExpirationDate() > 0) { if (mPublicShare != null && mPublicShare.getExpirationDate() > 0) {
long chosenDateInMillis = -1; long chosenDateInMillis = mPublicShare.getExpirationDate();
if (mPublicShare != null) {
chosenDateInMillis = mPublicShare.getExpirationDate();
}
ExpirationDatePickerDialogFragment dialog = ExpirationDatePickerDialogFragment dialog =
ExpirationDatePickerDialogFragment.newInstance(mFile, chosenDateInMillis); ExpirationDatePickerDialogFragment.newInstance(mFile, chosenDateInMillis);
dialog.show( dialog.show(

View file

@ -718,12 +718,9 @@ public class FileOperationsHelper {
OCCapability capability = mFileActivity.getStorageManager().getCapability(mFileActivity.getAccount().name); OCCapability capability = mFileActivity.getStorageManager().getCapability(mFileActivity.getAccount().name);
SendShareDialog mSendShareDialog; SendShareDialog mSendShareDialog;
if (capability != null) {
mSendShareDialog = SendShareDialog.newInstance(file, hideNcSharingOptions, mSendShareDialog = SendShareDialog.newInstance(file, hideNcSharingOptions,
capability.getFilesSharingPublicPasswordEnforced().isTrue()); capability.getFilesSharingPublicPasswordEnforced().isTrue());
} else {
mSendShareDialog = SendShareDialog.newInstance(file, hideNcSharingOptions, false);
}
mSendShareDialog.setFileOperationsHelper(this); mSendShareDialog.setFileOperationsHelper(this);
mSendShareDialog.show(ft, "TAG_SEND_SHARE_DIALOG"); mSendShareDialog.show(ft, "TAG_SEND_SHARE_DIALOG");
} }