code: public Map<String, String> listConnections()
     {
        if (!debug)
           return Collections.unmodifiableMap(Collections.EMPTY_MAP);
  
        synchronized (connectionStackTraces)
        {
           Map<String, String> result = new HashMap<String, String>();
  
           for (Map.Entry<Object, Throwable> entry : connectionStackTraces.entrySet())
           {
              Object key = entry.getKey();
              Throwable stackTrace = entry.getValue();
  
              ByteArrayOutputStream baos = new ByteArrayOutputStream();
              PrintStream ps = new PrintStream(baos, true);
              stackTrace.printStackTrace(ps);
  
              result.put(key.toString(), baos.toString());
           }
  
           return Collections.unmodifiableMap(result);
        }
     }
docs: {@inheritDoc}