Source:
<code>protected Boolean doInBackground(Void ...voids) { publishProgress(0); String editToken; String authCookie; String summary = "Nominating " + media.getFilename() +" for deletion."; authCookie = sessionManager.getAuthCookie(); mwApi.setAuthCookie(authCookie); Calendar calendar = Calendar.getInstance(); String fileDeleteString = "{{delete|reason=" + reason + "|subpage=" +media.getFilename() + "|day=" + calendar.get(Calendar.DAY_OF_MONTH) + "|month=" + calendar.getDisplayName(Calendar.MONTH,Calendar.LONG, Locale.getDefault()) + "|year=" + calendar.get(Calendar.YEAR) + "}}"; String subpageString = "=== [[:" + media.getFilename() + "]] ===\n" + reason + " ~~~~"; String logPageString = "\n{{Commons:Deletion requests/" + media.getFilename() + "}}\n"; SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd", Locale.getDefault()); String date = sdf.format(calendar.getTime()); String userPageString = "\n{{subst:idw|" + media.getFilename() + "}} ~~~~"; try { editToken = mwApi.getEditToken(); if (editToken.equals("+\\")) { return false; } publishProgress(1); mwApi.prependEdit(editToken,fileDeleteString+"\n", media.getFilename(),summary); publishProgress(2); mwApi.edit(editToken,subpageString+"\n", "Commons:Deletion_requests/"+media.getFilename(),summary); publishProgress(3); mwApi.appendEdit(editToken,logPageString+"\n", "Commons:Deletion_requests/"+date,summary); publishProgress(4); mwApi.appendEdit(editToken,userPageString+"\n", <START> "User_Talk:"+ Objects.requireNonNull(sessionManager.getCurrentAccount()).name,summary); <END> publishProgress(5); } catch (Exception e) { Timber.d(e); return false; } return true; }</code><technical_language>getCurrentAccount is nullable. lead crashes</technical_language>

Target:
protected Boolean doInBackground(Void ...voids) { publishProgress(0); String editToken; String authCookie; String summary = "Nominating " + media.getFilename() +" for deletion."; authCookie = sessionManager.getAuthCookie(); mwApi.setAuthCookie(authCookie); Calendar calendar = Calendar.getInstance(); String fileDeleteString = "{{delete|reason=" + reason + "|subpage=" +media.getFilename() + "|day=" + calendar.get(Calendar.DAY_OF_MONTH) + "|month=" + calendar.getDisplayName(Calendar.MONTH,Calendar.LONG, Locale.getDefault()) + "|year=" + calendar.get(Calendar.YEAR) + "}}"; String subpageString = "=== [[:" + media.getFilename() + "]] ===\n" + reason + " ~~~~"; String logPageString = "\n{{Commons:Deletion requests/" + media.getFilename() + "}}\n"; SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd", Locale.getDefault()); String date = sdf.format(calendar.getTime()); String userPageString = "\n{{subst:idw|" + media.getFilename() + "}} ~~~~"; try { editToken = mwApi.getEditToken(); if (editToken.equals("+\\")) { return false; } publishProgress(1); mwApi.prependEdit(editToken,fileDeleteString+"\n", media.getFilename(),summary); publishProgress(2); mwApi.edit(editToken,subpageString+"\n", "Commons:Deletion_requests/"+media.getFilename(),summary); publishProgress(3); mwApi.appendEdit(editToken,logPageString+"\n", "Commons:Deletion_requests/"+date,summary); publishProgress(4); mwApi.appendEdit(editToken,userPageString+"\n", "User_Talk:"+ sessionManager.getCurrentAccount().name,summary); publishProgress(5); } catch (Exception e) { Timber.e(e); return false; } return true; }