in commons-vfs2-jackrabbit1/src/main/java/org/apache/commons/vfs2/provider/webdav/WebdavFileObject.java [265:297]
protected Map<String, Object> doGetAttributes() throws Exception {
final Map<String, Object> attributes = new HashMap<>();
try {
final URLFileName fileName = (URLFileName) getName();
DavPropertySet properties = getProperties(fileName, DavConstants.PROPFIND_ALL_PROP,
new DavPropertyNameSet(), false);
@SuppressWarnings("unchecked") // iterator() is documented to return DavProperty instances
final Iterator<DavProperty> iter = properties.iterator();
while (iter.hasNext()) {
final DavProperty property = iter.next();
attributes.put(property.getName().toString(), property.getValue());
}
properties = getPropertyNames(fileName);
@SuppressWarnings("unchecked") // iterator() is documented to return DavProperty instances
final Iterator<DavProperty> iter2 = properties.iterator();
while (iter2.hasNext()) {
DavProperty property = iter2.next();
if (!attributes.containsKey(property.getName().getName())) {
property = getProperty(fileName, property.getName());
if (property != null) {
final Object name = property.getName();
final Object value = property.getValue();
if (name != null && value != null) {
attributes.put(name.toString(), value);
}
}
}
}
return attributes;
} catch (final Exception e) {
throw new FileSystemException("vfs.provider.webdav/get-attributes.error", getName(), e);
}
}