Fix FileAttributeCache.toString()

We should not list the complete cache but only show the cache entry at
hand.

Change-Id: I22be2a4dcbf0145155e23f2389bfcf5662cf23a6
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
This commit is contained in:
Matthias Sohn 2019-07-26 15:53:29 +02:00
parent 130aa31262
commit d17efe880d
1 changed files with 3 additions and 6 deletions

View File

@ -86,7 +86,6 @@
import java.util.concurrent.atomic.AtomicReference;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
import java.util.stream.Collectors;
import org.eclipse.jgit.annotations.NonNull;
import org.eclipse.jgit.annotations.Nullable;
@ -438,12 +437,10 @@ private FileStoreAttributeCache(
@SuppressWarnings("nls")
@Override
public String toString() {
return "FileStoreAttributeCache[" + attributeCache.keySet()
.stream()
.map(key -> "FileStore[" + key + "]: fsTimestampResolution="
+ attributeCache.get(key).getFsTimestampResolution())
.collect(Collectors.joining(",\n")) + "]";
return "FileStoreAttributeCache [fsTimestampResolution="
+ fsTimestampResolution + "]";
}
}
/** The auto-detected implementation selected for this operating system and JRE. */