예제 #1
0
  protected Properties convertProperties(Map<String, Object> m) {
    Properties res = null;

    {
      if (m != null) {
        res = new Properties();

        Set<String> keys = m.keySet();
        for (String key : keys) {
          String value = null;

          // Set 'value':
          {
            Object o = m.get(key);
            if (o != null) {
              value = o.toString();
            }
          }

          res.setProperty(key, value);
        }
      }
    }

    return res;
  }
예제 #2
0
  public List<String> getSessionIds() throws IOException {
    List<String> res = null;

    {
      synchronized (lookupSessionById) {
        Set<String> keySet = lookupSessionById.keySet();
        if (keySet != null) {
          res = new ArrayList<String>();
          res.addAll(keySet);
        }
      }
    }

    return res;
  }