Source:
<code>public ActionResult execute() { Assumption.assertPostParamNotNull(Const.ParamsNames.REGKEY, regkey); statusToAdmin = "Action Student Clicked Join Link" + (account.googleId == null ? "<br>Email: " + account.email : "<br>Google ID: " + account.googleId + "<br>Key: " + regkey); if (student == null) { statusToAdmin += "<br>Student course join failed due to being deleted by instructor."; String courseId = getRequestParamValue(Const.ParamsNames.COURSE_ID); <START> Assumption.assertNotNull(courseId); <END> statusToUser.add(new StatusMessage( String.format(Const.StatusMessages.DELETED_STUDENT_ATTEMPTING_TO_JOIN, courseId), StatusMessageColor.WARNING)); return createRedirectResult(Const.ActionURIs.STUDENT_HOME_PAGE); } String nextUrl = getNextUrl(); if (gateKeeper.getCurrentUser() == null) { return createRedirectToAuthenticatedJoinPage(nextUrl); } String confirmUrl = Const.ActionURIs.STUDENT_COURSE_JOIN_AUTHENTICATED + "?" + Const.ParamsNames.REGKEY + "=" + regkey + "&" + Const.ParamsNames.NEXT_URL + "=" + Sanitizer.sanitizeForNextUrl(nextUrl); String nextUrlType = getPageTypeOfUrl(nextUrl); boolean isRedirectResult = !Const.SystemParams.PAGES_ACCESSIBLE_WITHOUT_REGISTRATION.contains(nextUrlType); boolean isNextUrlAccessibleWithoutLogin = Const.SystemParams.PAGES_ACCESSIBLE_WITHOUT_GOOGLE_LOGIN.contains(nextUrlType); String courseId = student.course; StudentCourseJoinConfirmationPageData data = new StudentCourseJoinConfirmationPageData(account, student, confirmUrl, gateKeeper.getLogoutUrl(Sanitizer.sanitizeForNextUrl(confirmUrl)), isRedirectResult, courseId, isNextUrlAccessibleWithoutLogin); excludeStudentDetailsFromResponseParams(); return createShowPageResult( Const.ViewURIs.STUDENT_COURSE_JOIN_CONFIRMATION, data); }</code><technical_language>assertPostParamNotNull more apt</technical_language>

Target:
public ActionResult execute() { Assumption.assertPostParamNotNull(Const.ParamsNames.REGKEY, regkey); statusToAdmin = "Action Student Clicked Join Link" + (account.googleId == null ? "<br>Email: " + account.email : "<br>Google ID: " + account.googleId + "<br>Key: " + regkey); if (student == null) { statusToAdmin += "<br>Student course join failed as student does not exist."; String courseId = getRequestParamValue(Const.ParamsNames.COURSE_ID); Assumption.assertPostParamNotNull(Const.ParamsNames.COURSE_ID, courseId); isError = true; statusToUser.add(new StatusMessage( String.format(Const.StatusMessages.NON_EXISTENT_STUDENT_ATTEMPTING_TO_JOIN_COURSE, courseId), StatusMessageColor.WARNING)); return createRedirectResult(Const.ActionURIs.STUDENT_HOME_PAGE); } String nextUrl = getNextUrl(); if (gateKeeper.getCurrentUser() == null) { return createRedirectToAuthenticatedJoinPage(nextUrl); } String confirmUrl = Const.ActionURIs.STUDENT_COURSE_JOIN_AUTHENTICATED + "?" + Const.ParamsNames.REGKEY + "=" + regkey + "&" + Const.ParamsNames.NEXT_URL + "=" + Sanitizer.sanitizeForNextUrl(nextUrl); String nextUrlType = getPageTypeOfUrl(nextUrl); boolean isRedirectResult = !Const.SystemParams.PAGES_ACCESSIBLE_WITHOUT_REGISTRATION.contains(nextUrlType); boolean isNextUrlAccessibleWithoutLogin = Const.SystemParams.PAGES_ACCESSIBLE_WITHOUT_GOOGLE_LOGIN.contains(nextUrlType); String courseId = student.course; StudentCourseJoinConfirmationPageData data = new StudentCourseJoinConfirmationPageData(account, student, confirmUrl, gateKeeper.getLogoutUrl(Sanitizer.sanitizeForNextUrl(confirmUrl)), isRedirectResult, courseId, isNextUrlAccessibleWithoutLogin); excludeStudentDetailsFromResponseParams(); return createShowPageResult( Const.ViewURIs.STUDENT_COURSE_JOIN_CONFIRMATION, data); }