423118 - ServletUpgradeRequest.getUserPrincipal() does not work

+ Deprecating ServletUpgradeRequest.getPrincipal()
 + Adding proper implementation for
   ServletUpgradeRequest.getUserPrincipal()
This commit is contained in:
Joakim Erdfelt 2013-12-04 12:29:20 -07:00
parent 1eac013485
commit ebd0ad90e0
1 changed files with 12 additions and 0 deletions

View File

@ -165,11 +165,23 @@ public class ServletUpgradeRequest extends UpgradeRequest
return new InetSocketAddress(req.getLocalAddr(),req.getLocalPort());
}
/**
* @deprecated use {@link #getUserPrincipal()} instead
*/
@Deprecated
public Principal getPrincipal()
{
return req.getUserPrincipal();
}
/**
* Equivalent to {@link HttpServletRequest#getUserPrincipal()}
*/
public Principal getUserPrincipal()
{
return req.getUserPrincipal();
}
/**
* Equivalent to {@link HttpServletRequest#getRemoteAddr()}
*