diagnostics

This commit is contained in:
Alexey Kudravtsev
2013-03-11 15:24:49 +04:00
parent 8ea69408cf
commit 0a2127b629
@@ -540,12 +540,13 @@ public class VirtualDirectoryImpl extends VirtualFileSystemEntry {
Function<VirtualFileSystemEntry, String> verboseToString = new Function<VirtualFileSystemEntry, String>() {
@Override
public String fun(VirtualFileSystemEntry entry) {
return entry + " (name: '" + entry.getName() + "', " + entry.getClass()+ ")";
return entry + " (name: '" + entry.getName() + "', " + entry.getClass()+ ", parent:"+entry.getParent()+"; id:"+entry.getId()+"; FS:" +entry.getFileSystem()+ "; delegate.attrs:" +entry.getFileSystem().getAttributes(entry)+ ") ";
}
};
String children = StringUtil.join(array, verboseToString, ",");
throw new AssertionError(
verboseToString.fun(prev) + " equals to " + verboseToString.fun(file) + "; children: " + children + "\nDetails: " + ContainerUtil.map(details, new Function<Object, Object>() {
verboseToString.fun(prev) + " equals to " + verboseToString.fun(file) + "; children: " + children + "\nDetails: " + ContainerUtil.map(
details, new Function<Object, Object>() {
@Override
public Object fun(Object o) {
return o instanceof Object[] ? Arrays.toString((Object[])o) : o;