docs: public static Map<String, String> toMap(List<CmsProperty> list) {
  
          if ((list == null) || (list.size() == 0)) {
              return Collections.emptyMap();
          }
  
          String name = null;
          String value = null;
          CmsProperty property = null;
          Map<String, String> result = new HashMap<String, String>(list.size());
  
          // choose the fastest method to traverse the list
          if (list instanceof RandomAccess) {
              for (int i = 0, n = list.size(); i < n; i++) {
                  property = list.get(i);
                  name = property.m_name;
                  value = property.getValue();
                  result.put(name, value);
              }
          } else {
              Iterator<CmsProperty> i = list.iterator();
              while (i.hasNext()) {
                  property = i.next();
                  name = property.m_name;
                  value = property.getValue();
                  result.put(name, value);
              }
          }
  
          return result;
      }