Source:
public Response resetVerificationStatus(@Auth Key key, @QueryParam("email") String email, @HeaderParam("password") String password) { resetVerificationRequests.mark(); if (email == null || email.isEmpty()) { LOG.warn("Attempted to reset user verification without an email."); return Response.status(Response.Status.BAD_REQUEST) .entity("Incorrect or missing email query parameter.").build(); } if (password == null || password.isEmpty()) { LOG.warn("Attempted to reset user verification without a password.", email); return Response.status(Response.Status.BAD_REQUEST) .entity("Incorrect or missing header credentials.").build(); } LOG.info("Attempting to reset verification status for user {}", email); User user; try { user = usersDao.findByEmail(email); } catch (DatabaseException e) { LOG.error("Error retrieving user in database. Caused by: {}", email, e.getErrorKind()); return e.getErrorKind().buildResponse(email); } if (!hashService.isMatch(password, user.getPassword())) { LOG.warn("Incorrect password parameter for user in database.", user.getEmail()); return Response.status(Response.Status.UNAUTHORIZED) .entity("Incorrect or missing header credentials.").build(); } User updatedUser = new User( new Email(user.getEmail().getAddress(), false, null), user.getPassword(), user.getProperties()); User result; try { result = usersDao.update(null, updatedUser); } catch (DatabaseException e) { LOG.error("Error posting user to the database. Caused by {}", user.getEmail(), e.getErrorKind()); return e.getErrorKind().buildResponse(user.getEmail().getAddress()); } LOG.info("Successfully reset verification status for user {}.", email); return Response.ok(result).build(); }

Target:
public Response resetVerificationStatus(@Auth Key key, @QueryParam("email") String email, @HeaderParam("password") String password) { resetVerificationRequests.mark(); if (email == null || email.isEmpty()) { LOG.warn("Attempted to reset user verification without an email."); return Response.status(Response.Status.BAD_REQUEST) .entity("Incorrect or missing email query parameter.").build(); } if (password == null || password.isEmpty()) { LOG.warn("Attempted to reset verification status for user with email without a password.", email); return Response.status(Response.Status.BAD_REQUEST) .entity("Credentials are required to access this resource.").build(); } LOG.info("Attempting to reset verification status for user {}", email); User user; try { user = usersDao.findByEmail(email); } catch (DatabaseException e) { LOG.error("Error retrieving user in database. Caused by: {}", email, e.getErrorKind()); return e.getErrorKind().buildResponse(email); } if (!hashService.isMatch(password, user.getPassword())) { LOG.warn("Incorrect password parameter for user in database.", user.getEmail()); return Response.status(Response.Status.UNAUTHORIZED) .entity("Credentials are required to access this resource.").build(); } User updatedUser = new User( new Email(user.getEmail().getAddress(), false, null), user.getPassword(), user.getProperties()); User result; try { result = usersDao.update(null, updatedUser); } catch (DatabaseException e) { LOG.error("Error posting user to the database. Caused by {}", user.getEmail(), e.getErrorKind()); return e.getErrorKind().buildResponse(user.getEmail().getAddress()); } LOG.info("Successfully reset verification status for user {}.", email); return Response.ok(result).build(); }