System.err.println(e); System.exit(1);
throw new RuntimeException(e);
  protected static boolean listAddVal(                             GrouperSession s, GrouperGroup g,                              GrouperMember m, String list                           )   {    Session session = GrouperBackend._init();    boolean rv      = false;    // FIXME Better validation efforts, please.    // TODO  Refactor to a method    // TODO  Refactor commonality with listDelVal    if (        g.getClass().getName().equals("edu.internet2.middleware.grouper.GrouperGroup")   &&        s.getClass().getName().equals("edu.internet2.middleware.grouper.GrouperSession") &&        m.getClass().getName().equals("edu.internet2.middleware.grouper.GrouperMember")  &&        Grouper.groupField(g.type(), list)       )     {      // Verify that the value doesn't already exist      List vals = GBQuery.grouperList(                    session, g.key(), m.key(), Grouper.DEF_LIST_TYPE,                     Grouper.MEM_IMM                  );      // Doesn't exist      if (vals.size() == 0) {        session.clear(); // FIXME        try {          Transaction t = session.beginTransaction();          // Update immediate list data first          GrouperBackend._listAddVal(session, g, m, list, null);          // TODO Refactor to a method          /*            * Find where `g' is a member and make `m' an effective           * member, via `g', of those groups.           */          GrouperMember mg = GrouperMember.load(g.id(), "group");          List groups = new ArrayList();          Iterator mgA = GrouperBackend.listVals(s, mg, list).iterator();          while (mgA.hasNext()) {            GrouperList glA = (GrouperList) mgA.next();            GrouperBackend._listAddVal(              session, glA.group(), m, list, g            );            groups.add(glA.group());          }          // TODO Refactor to a method          /*           * If `m' is a group, convert it from a member to a group	         * object.  Then, query to find its list members and then add	         * those members to all groups where `m' is a member.           */          if (m.typeID().equals("group")) {            groups.add(g);            GrouperGroup gm = GrouperBackend._groupLoadByID(m.subjectID());            // Find all members of `m'            Iterator mems   = GrouperBackend.listVals(s, gm, list).iterator();            while (mems.hasNext()) {              GrouperList gl = (GrouperList) mems.next();              // If we have a via, use that, otherwise use `m'               GrouperGroup v = gl.via();              if (v == null) {                v = gm;              }              /*               * Add all members of `m' to all groups that `m' and `g'               * belong to               */              Iterator iter = groups.iterator();              while (iter.hasNext()) {                GrouperGroup group = (GrouperGroup) iter.next();                GrouperBackend._listAddVal(                  session, group, gl.member(), list, v                );              }            }          }          // Update modify information          session.update(g);          // Commit it          t.commit();          rv = true;        } catch (Exception e) {          // TODO We probably need a rollback in here in case of failure          //      above.          System.err.println(e);          System.exit(1);        }      }    }     GrouperBackend._hibernateSessionClose(session);    return rv;  }