if (super.logger.isWarnEnabled()) { super.logger.warn( "Could not obtain a Context to perform lookup");
if (logger.isWarnEnabled()) { logger.warn("Could not obtain a Context to perform lookup");
    public Object extractFromContainer(ServletRequest request) {        Subject subject = null;        try {            Context lc = this.getLookupContext();            if (lc == null) {                if (super.logger.isWarnEnabled()) {                    super.logger.warn(                        "Could not obtain a Context to perform lookup");                }                return null;            }            Object result = lc.lookup("java:comp/env/security/subject");            if (result instanceof Subject) {                subject = (Subject) result;            }        } catch (NamingException ne) {            if (super.logger.isWarnEnabled()) {                super.logger.warn("Lookup on Subject failed "                    + ne.getLocalizedMessage());            }        }        if ((subject != null) && (subject.getPrincipals() != null)) {            Iterator principals = subject.getPrincipals().iterator();            while (principals.hasNext()) {                Principal p = (Principal) principals.next();                if (p instanceof Authentication) {                    return p;                }            }        }        return null;    }