Updates an existing subject, including their assigned roles, and optionally their password.
@param subject the logged in user's subject
@param subjectToModify the subject whose data is to be updated (which may or may not be the same as subject)
@param newPassword if non-null, a new password to be set on the user's associated principal
@return the merged subject, which may or may not be the subjectToModify instance
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.