throws Throwable
  public static boolean session_regenerate_id(Env env,                                              @Optional boolean deleteOld)    throws Throwable  {    SessionArrayValue session = env.getSession();    if (deleteOld)      session_destroy(env);    env.setSession(null);    String sessionId = generateSessionId(env);    session_id(env, sessionId);    session_start(env);    SessionArrayValue newSession = env.getSession();    if (session != null) {      for (Map.Entry<Value,Value> entry : session.entrySet())        newSession.put(entry.getKey(), entry.getValue());    }    return true;  }