int userid = c.getCurrentUser().getID(); AuthorizeException j = new AuthorizeException("test");
int userid; EPerson e = c.getCurrentUser();  if( e == null ) { userid = 0;         } else            { userid = e.getID(); }  AuthorizeException j = new AuthorizeException("Denied");
    public static void authorizeAction(Context c, DSpaceObject o, int action)        throws AuthorizeException, SQLException    {        int otype = o.getType();        int oid   = o.getID();            if( !authorize(c, otype, oid, action, c.getCurrentUser()) )        {            int userid = c.getCurrentUser().getID();            AuthorizeException j = new AuthorizeException("test");            j.printStackTrace();                        throw new AuthorizeException(                "Authorization denied for action " +                Constants.actiontext[action]       +                " on " + Constants.typetext[otype] +                ":"    + oid + " by user " + userid,                o,                action                );        }    }