diff --git a/oak-blob-plugins/src/main/java/org/apache/jackrabbit/oak/plugins/blob/UploadStagingCache.java b/oak-blob-plugins/src/main/java/org/apache/jackrabbit/oak/plugins/blob/UploadStagingCache.java index bf8bbf6e869..4b7a57dc165 100644 --- a/oak-blob-plugins/src/main/java/org/apache/jackrabbit/oak/plugins/blob/UploadStagingCache.java +++ b/oak-blob-plugins/src/main/java/org/apache/jackrabbit/oak/plugins/blob/UploadStagingCache.java @@ -28,6 +28,7 @@ import java.util.Iterator; import java.util.List; import java.util.Optional; +import java.util.StringJoiner; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; import java.util.concurrent.Executors; @@ -61,7 +62,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import static org.apache.jackrabbit.guava.common.base.MoreObjects.toStringHelper; import static java.lang.String.format; import static org.apache.jackrabbit.oak.commons.IOUtils.humanReadableByteCount; import static org.apache.jackrabbit.oak.plugins.blob.DataStoreCacheUpgradeUtils @@ -774,18 +774,18 @@ public long estimateCurrentMemoryWeight() { @Override public String cacheInfoAsString() { - return toStringHelper("StagingCacheStats") - .add("requestCount", getRequestCount()) - .add("hitCount", getHitCount()) - .add("hitRate", format("%1.2f", getHitRate())) - .add("missCount", getMissCount()) - .add("missRate", format("%1.2f", getMissRate())) - .add("loadCount", getLoadCount()) - .add("loadSuccessCount", getLoadSuccessCount()) - .add("elementCount", getElementCount()) - .add("currentMemSize", estimateCurrentMemoryWeight()) - .add("totalWeight", humanReadableByteCount(estimateCurrentWeight())) - .add("maxWeight", humanReadableByteCount(getMaxTotalWeight())) + return new StringJoiner(", ", "StagingCacheStats + [", "]") + .add("requestCount=" + getRequestCount()) + .add("hitCount=" + getHitCount()) + .add("hitRate=" + format("%1.2f", getHitRate())) + .add("missCount=" + getMissCount()) + .add("missRate=" + format("%1.2f", getMissRate())) + .add("loadCount=" + getLoadCount()) + .add("loadSuccessCount=" + getLoadSuccessCount()) + .add("elementCount=" + getElementCount()) + .add("currentMemSize=" + estimateCurrentMemoryWeight()) + .add("totalWeight=" + humanReadableByteCount(estimateCurrentWeight())) + .add("maxWeight=" + humanReadableByteCount(getMaxTotalWeight())) .toString(); } diff --git a/oak-core-spi/src/main/java/org/apache/jackrabbit/oak/cache/AbstractCacheStats.java b/oak-core-spi/src/main/java/org/apache/jackrabbit/oak/cache/AbstractCacheStats.java index e6f29554cca..ba2b8c381cf 100644 --- a/oak-core-spi/src/main/java/org/apache/jackrabbit/oak/cache/AbstractCacheStats.java +++ b/oak-core-spi/src/main/java/org/apache/jackrabbit/oak/cache/AbstractCacheStats.java @@ -22,9 +22,9 @@ import static org.apache.jackrabbit.oak.commons.IOUtils.humanReadableByteCount; import java.util.Objects; +import java.util.StringJoiner; import java.util.concurrent.TimeUnit; -import org.apache.jackrabbit.guava.common.base.MoreObjects; import org.apache.jackrabbit.guava.common.cache.CacheStats; import org.apache.jackrabbit.oak.api.jmx.CacheStatsMBean; import org.apache.jackrabbit.oak.commons.jmx.AnnotatedStandardMBean; @@ -135,21 +135,21 @@ public long getEvictionCount() { @Override public String cacheInfoAsString() { - return MoreObjects.toStringHelper("CacheStats") - .add("hitCount", getHitCount()) - .add("hitRate", format("%1.2f", getHitRate())) - .add("missCount", getMissCount()) - .add("missRate", format("%1.2f", getMissRate())) - .add("requestCount", getRequestCount()) - .add("loadCount", getLoadCount()) - .add("loadSuccessCount", getLoadSuccessCount()) - .add("loadExceptionCount", getLoadExceptionCount()) - .add("totalLoadTime", timeInWords(getTotalLoadTime())) - .add("averageLoadPenalty", format("%1.2f ns", getAverageLoadPenalty())) - .add("evictionCount", getEvictionCount()) - .add("elementCount", getElementCount()) - .add("totalWeight", humanReadableByteCount(estimateCurrentWeight())) - .add("maxWeight", humanReadableByteCount(getMaxTotalWeight())) + return new StringJoiner(", ", "CacheStats [", "]") + .add("hitCount=" + getHitCount()) + .add("hitRate=" + format("%1.2f", getHitRate())) + .add("missCount=" + getMissCount()) + .add("missRate=" + format("%1.2f", getMissRate())) + .add("requestCount=" + getRequestCount()) + .add("loadCount=" + getLoadCount()) + .add("loadSuccessCount=" + getLoadSuccessCount()) + .add("loadExceptionCount=" + getLoadExceptionCount()) + .add("totalLoadTime=" + timeInWords(getTotalLoadTime())) + .add("averageLoadPenalty=" + format("%1.2f ns", getAverageLoadPenalty())) + .add("evictionCount=" + getEvictionCount()) + .add("elementCount=" + getElementCount()) + .add("totalWeight=" + humanReadableByteCount(estimateCurrentWeight())) + .add("maxWeight=" + humanReadableByteCount(getMaxTotalWeight())) .toString(); } diff --git a/oak-core-spi/src/main/java/org/apache/jackrabbit/oak/commons/jmx/ManagementOperation.java b/oak-core-spi/src/main/java/org/apache/jackrabbit/oak/commons/jmx/ManagementOperation.java index 25eb85bbe1a..6cc8a31da65 100644 --- a/oak-core-spi/src/main/java/org/apache/jackrabbit/oak/commons/jmx/ManagementOperation.java +++ b/oak-core-spi/src/main/java/org/apache/jackrabbit/oak/commons/jmx/ManagementOperation.java @@ -19,7 +19,6 @@ package org.apache.jackrabbit.oak.commons.jmx; -import static org.apache.jackrabbit.guava.common.base.MoreObjects.toStringHelper; import static java.lang.Thread.currentThread; import static javax.management.openmbean.SimpleType.INTEGER; import static javax.management.openmbean.SimpleType.STRING; @@ -36,6 +35,7 @@ import static org.apache.jackrabbit.oak.commons.jmx.ManagementOperation.Status.succeeded; import java.util.Objects; +import java.util.StringJoiner; import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; import java.util.concurrent.FutureTask; @@ -218,9 +218,9 @@ public Status getStatus() { @Override public String toString() { - return toStringHelper(this) - .add("name", name) - .add("id", id) + return new StringJoiner(", ", ManagementOperation.class.getSimpleName() + "[", "]") + .add("name=" + name) + .add("id=" + id) .toString(); } @@ -407,10 +407,10 @@ public boolean isFailure() { @Override public String toString() { - return toStringHelper(this) - .addValue(code) - .add("id", id) - .add("message", message) + return new StringJoiner(", ", Status.class.getSimpleName() + "[", "]") + .add("code=" + code) + .add("id=" + id) + .add("message=" + message) .toString(); } diff --git a/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/GlobbingPathFilter.java b/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/GlobbingPathFilter.java index beb269ca5f6..c14df3fbb83 100644 --- a/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/GlobbingPathFilter.java +++ b/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/GlobbingPathFilter.java @@ -18,7 +18,6 @@ */ package org.apache.jackrabbit.oak.plugins.observation.filter; -import static org.apache.jackrabbit.guava.common.base.MoreObjects.toStringHelper; import static java.util.Objects.requireNonNull; import static org.apache.jackrabbit.oak.commons.PathUtils.elements; @@ -26,6 +25,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.StringJoiner; import java.util.regex.Pattern; import org.apache.jackrabbit.guava.common.collect.Iterators; @@ -177,8 +177,8 @@ public EventFilter create(String name, NodeState before, NodeState after) { @Override public String toString() { - return toStringHelper(this) - .add("path", String.join("/", pattern)) + return new StringJoiner(", ", GlobbingPathFilter.class.getSimpleName() + "[", "]") + .add("path=" + String.join("/", pattern)) .toString(); } diff --git a/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/delegate/NodeDelegate.java b/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/delegate/NodeDelegate.java index fb91419a4dc..bafa3bf40a3 100644 --- a/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/delegate/NodeDelegate.java +++ b/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/delegate/NodeDelegate.java @@ -16,7 +16,6 @@ */ package org.apache.jackrabbit.oak.jcr.delegate; -import static org.apache.jackrabbit.guava.common.base.MoreObjects.toStringHelper; import static org.apache.jackrabbit.guava.common.collect.Iterables.addAll; import static org.apache.jackrabbit.guava.common.collect.Iterables.contains; import static org.apache.jackrabbit.guava.common.collect.Iterators.filter; @@ -60,6 +59,7 @@ import java.util.LinkedHashSet; import java.util.List; import java.util.Set; +import java.util.StringJoiner; import java.util.function.Function; import javax.jcr.InvalidItemStateException; @@ -862,7 +862,9 @@ public void unlock() throws RepositoryException { @Override public String toString() { - return toStringHelper(this).add("tree", tree).toString(); + return new StringJoiner(", ", NodeDelegate.class.getSimpleName() + "[", "]") + .add("tree=" + tree) + .toString(); } //------------------------------------------------------------< internal >--- diff --git a/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/delegate/PropertyDelegate.java b/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/delegate/PropertyDelegate.java index 4d04f10a0fd..120c9376f31 100644 --- a/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/delegate/PropertyDelegate.java +++ b/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/delegate/PropertyDelegate.java @@ -16,7 +16,6 @@ */ package org.apache.jackrabbit.oak.jcr.delegate; -import static org.apache.jackrabbit.guava.common.base.MoreObjects.toStringHelper; import static java.util.Objects.requireNonNull; import javax.jcr.InvalidItemStateException; @@ -30,6 +29,8 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +import java.util.StringJoiner; + /** * {@code PropertyDelegate} serve as internal representations of {@code Property}s. * Most methods of this class throw an {@code InvalidItemStateException} @@ -158,9 +159,9 @@ public boolean remove() { @Override public String toString() { - return toStringHelper(this) - .add("parent", parent) - .add("property", parent.getProperty(name)) + return new StringJoiner(", ", PropertyDelegate.class.getSimpleName() + "[", "]") + .add("parent=" + parent) + .add("property=" + parent.getProperty(name)) .toString(); } diff --git a/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/observation/EventFactory.java b/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/observation/EventFactory.java index 08b5c258aaf..d4b7e22ec83 100644 --- a/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/observation/EventFactory.java +++ b/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/observation/EventFactory.java @@ -30,12 +30,11 @@ import java.util.List; import java.util.Map; import java.util.Objects; +import java.util.StringJoiner; import javax.jcr.Value; import javax.jcr.observation.Event; -import org.apache.jackrabbit.guava.common.base.MoreObjects; - import org.apache.jackrabbit.api.observation.JackrabbitEvent; import org.apache.jackrabbit.oak.api.PropertyState; import org.apache.jackrabbit.oak.api.blob.BlobAccessProvider; @@ -328,15 +327,15 @@ public int hashCode() { @Override public String toString() { - return MoreObjects.toStringHelper("Event") - .add("type", getType()) - .add("path", getPath()) - .add("identifier", getIdentifier()) - .add("info", getInfo()) - .add("userID", getUserID()) - .add("userData", getUserData()) - .add("date", getDate()) - .add("external", isExternal()) + return new StringJoiner(", ", "Event [", "]") + .add("type=" + getType()) + .add("path=" + getPath()) + .add("identifier=" + getIdentifier()) + .add("info=" + getInfo()) + .add("userID=" + getUserID()) + .add("userData=" + getUserData()) + .add("date=" + getDate()) + .add("external=" + isExternal()) .toString(); } diff --git a/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/plugins/tree/TreeLocation.java b/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/plugins/tree/TreeLocation.java index 2895546f324..9fc2d393afd 100644 --- a/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/plugins/tree/TreeLocation.java +++ b/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/plugins/tree/TreeLocation.java @@ -25,7 +25,8 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import static org.apache.jackrabbit.guava.common.base.MoreObjects.toStringHelper; +import java.util.StringJoiner; + import static org.apache.jackrabbit.oak.commons.conditions.Validate.checkArgument; import static org.apache.jackrabbit.oak.commons.PathUtils.elements; import static org.apache.jackrabbit.oak.commons.PathUtils.isAbsolute; @@ -140,7 +141,9 @@ public PropertyState getProperty() { @Override public String toString() { - return toStringHelper(this).add("path", getPath()).toString(); + return new StringJoiner(", ", TreeLocation.class.getSimpleName() + "[", "]") + .add("path=" + getPath()) + .toString(); } /** diff --git a/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/AuthInfoImpl.java b/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/AuthInfoImpl.java index 24eb9423faa..19ad19ecc98 100644 --- a/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/AuthInfoImpl.java +++ b/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/AuthInfoImpl.java @@ -20,11 +20,11 @@ import java.util.Collections; import java.util.Map; import java.util.Set; +import java.util.StringJoiner; import javax.jcr.SimpleCredentials; import javax.security.auth.Subject; -import org.apache.jackrabbit.guava.common.base.MoreObjects; import org.apache.jackrabbit.guava.common.collect.ImmutableSet; import org.apache.jackrabbit.oak.api.AuthInfo; import org.jetbrains.annotations.NotNull; @@ -64,10 +64,11 @@ public static AuthInfo createFromSubject(@NotNull Subject subject) { @Override public String toString() { - return MoreObjects.toStringHelper(this) - .add("userID", userID) - .add("attributes", attributes) - .add("principals", principals).toString(); + return new StringJoiner(", ", AuthInfoImpl.class.getSimpleName() + "[", "]") + .add("userID=" + userID) + .add("attributes=" + attributes) + .add("principals=" + principals) + .toString(); } //-----------------------------------------------------------< AuthInfo >--- diff --git a/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/persistentCache/PersistentCacheStats.java b/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/persistentCache/PersistentCacheStats.java index 7ba725f7baa..234977de7eb 100644 --- a/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/persistentCache/PersistentCacheStats.java +++ b/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/persistentCache/PersistentCacheStats.java @@ -16,7 +16,6 @@ */ package org.apache.jackrabbit.oak.plugins.document.persistentCache; -import org.apache.jackrabbit.guava.common.base.MoreObjects; import org.apache.jackrabbit.api.stats.TimeSeries; import org.apache.jackrabbit.oak.api.jmx.PersistentCacheStatsMBean; import org.apache.jackrabbit.oak.commons.IOUtils; @@ -31,6 +30,7 @@ import javax.management.openmbean.CompositeData; import java.util.Map; +import java.util.StringJoiner; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.atomic.AtomicLong; @@ -450,16 +450,16 @@ public CompositeData getUsedSpaceHistory() { @Override public String cacheInfoAsString() { - return MoreObjects.toStringHelper("PersistentCacheStats") - .add("requestCount", getRequestCount()) - .add("hitCount", getHitCount()) - .add("hitRate", String.format("%1.2f", getHitRate())) - .add("missCount", getMissCount()) - .add("missRate", String.format("%1.2f", getMissRate())) - .add("loadCount", getLoadCount()) - .add("loadSuccessCount", getLoadSuccessCount()) - .add("loadExceptionCount", getLoadExceptionCount()) - .add("totalWeight", IOUtils.humanReadableByteCount(estimateCurrentWeight())) + return new StringJoiner(", ", "PersistentCacheStats [", "]") + .add("requestCount=" + getRequestCount()) + .add("hitCount=" + getHitCount()) + .add("hitRate=" + String.format("%1.2f", getHitRate())) + .add("missCount=" + getMissCount()) + .add("missRate=" + String.format("%1.2f", getMissRate())) + .add("loadCount=" + getLoadCount()) + .add("loadSuccessCount=" + getLoadSuccessCount()) + .add("loadExceptionCount=" + getLoadExceptionCount()) + .add("totalWeight=" + IOUtils.humanReadableByteCount(estimateCurrentWeight())) .toString(); } diff --git a/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/util/MongoConnection.java b/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/util/MongoConnection.java index d6882276193..fb3699f59cc 100644 --- a/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/util/MongoConnection.java +++ b/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/util/MongoConnection.java @@ -18,9 +18,9 @@ import java.util.Objects; import java.util.Set; +import java.util.StringJoiner; import java.util.concurrent.TimeUnit; -import org.apache.jackrabbit.guava.common.base.MoreObjects; import com.mongodb.MongoClient; import com.mongodb.MongoClientOptions; import com.mongodb.MongoClientURI; @@ -159,17 +159,16 @@ public static MongoClientOptions.Builder getDefaultBuilder() { } public static String toString(MongoClientOptions opts) { - return MoreObjects.toStringHelper(opts) - .add("connectionsPerHost", opts.getConnectionsPerHost()) - .add("connectTimeout", opts.getConnectTimeout()) - .add("socketTimeout", opts.getSocketTimeout()) - .add("socketKeepAlive", opts.isSocketKeepAlive()) - .add("maxWaitTime", opts.getMaxWaitTime()) - .add("heartbeatFrequency", opts.getHeartbeatFrequency()) - .add("threadsAllowedToBlockForConnectionMultiplier", - opts.getThreadsAllowedToBlockForConnectionMultiplier()) - .add("readPreference", opts.getReadPreference().getName()) - .add("writeConcern", opts.getWriteConcern()) + return new StringJoiner(", ", opts.getClass().getSimpleName() + "[", "]") + .add("connectionsPerHost=" + opts.getConnectionsPerHost()) + .add("connectTimeout=" + opts.getConnectTimeout()) + .add("socketTimeout=" + opts.getSocketTimeout()) + .add("socketKeepAlive=" + opts.isSocketKeepAlive()) + .add("maxWaitTime=" + opts.getMaxWaitTime()) + .add("heartbeatFrequency=" + opts.getHeartbeatFrequency()) + .add("threadsAllowedToBlockForConnectionMultiplier=" + opts.getThreadsAllowedToBlockForConnectionMultiplier()) + .add("readPreference=" + opts.getReadPreference().getName()) + .add("writeConcern=" + opts.getWriteConcern()) .toString(); } diff --git a/oak-store-spi/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeBuilder.java b/oak-store-spi/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeBuilder.java index 124276cef9f..9a289c74774 100644 --- a/oak-store-spi/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeBuilder.java +++ b/oak-store-spi/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeBuilder.java @@ -26,7 +26,6 @@ // // // WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! // -import static org.apache.jackrabbit.guava.common.base.MoreObjects.toStringHelper; import static java.util.Objects.requireNonNull; import static org.apache.jackrabbit.oak.plugins.memory.EmptyNodeState.EMPTY_NODE; import static org.apache.jackrabbit.oak.spi.state.AbstractNodeState.checkValidName; @@ -34,6 +33,7 @@ import java.io.IOException; import java.io.InputStream; import java.util.Objects; +import java.util.StringJoiner; import org.apache.jackrabbit.guava.common.io.ByteStreams; import org.apache.jackrabbit.oak.api.Blob; @@ -557,7 +557,9 @@ private StringBuilder getPath(StringBuilder parentPath) { @Override public String toString() { - return toStringHelper(this).add("path", getPath()).toString(); + return new StringJoiner(", ", MemoryNodeBuilder.class.getSimpleName() + "[", "]") + .add("path=" + getPath()) + .toString(); } //------------------------------------------------------------< Head >--- @@ -704,7 +706,9 @@ public boolean isReplaced(String name) { @Override public String toString() { - return toStringHelper(this).add("path", builder.getPath()).toString(); + return new StringJoiner(", ", UnconnectedHead.class.getSimpleName() + "[", "]") + .add("path=" + builder.getPath()) + .toString(); } } @@ -769,7 +773,9 @@ public boolean isReplaced(String name) { @Override public String toString() { - return toStringHelper(this).add("path", builder.getPath()).toString(); + return new StringJoiner(", ", ConnectedHead.class.getSimpleName() + "[", "]") + .add("path=" + builder.getPath()) + .toString(); } } diff --git a/oak-store-spi/src/main/java/org/apache/jackrabbit/oak/plugins/value/jcr/BinaryImpl.java b/oak-store-spi/src/main/java/org/apache/jackrabbit/oak/plugins/value/jcr/BinaryImpl.java index ef7125394e0..2bfdcd8c68b 100644 --- a/oak-store-spi/src/main/java/org/apache/jackrabbit/oak/plugins/value/jcr/BinaryImpl.java +++ b/oak-store-spi/src/main/java/org/apache/jackrabbit/oak/plugins/value/jcr/BinaryImpl.java @@ -16,12 +16,11 @@ */ package org.apache.jackrabbit.oak.plugins.value.jcr; -import static org.apache.jackrabbit.guava.common.base.MoreObjects.toStringHelper; - import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Objects; +import java.util.StringJoiner; import javax.jcr.PropertyType; import javax.jcr.RepositoryException; @@ -138,6 +137,8 @@ public int hashCode() { @Override public String toString() { - return toStringHelper(this).addValue(value).toString(); + return new StringJoiner(", ", BinaryImpl.class.getSimpleName() + "[", "]") + .add("value=" + value) + .toString(); } } diff --git a/oak-store-spi/src/main/java/org/apache/jackrabbit/oak/spi/commit/CommitInfo.java b/oak-store-spi/src/main/java/org/apache/jackrabbit/oak/spi/commit/CommitInfo.java index 3d22713c540..f7e9b2321d9 100644 --- a/oak-store-spi/src/main/java/org/apache/jackrabbit/oak/spi/commit/CommitInfo.java +++ b/oak-store-spi/src/main/java/org/apache/jackrabbit/oak/spi/commit/CommitInfo.java @@ -18,12 +18,12 @@ */ package org.apache.jackrabbit.oak.spi.commit; -import static org.apache.jackrabbit.guava.common.base.MoreObjects.toStringHelper; import static java.util.Objects.requireNonNull; import java.util.Collections; import java.util.Map; import java.util.Objects; +import java.util.StringJoiner; import org.apache.jackrabbit.oak.api.Root; import org.jetbrains.annotations.NotNull; @@ -180,12 +180,12 @@ public int hashCode() { @Override public String toString() { - return toStringHelper(this).omitNullValues() - .add("sessionId", sessionId) - .add("userId", userId) - .add("external", external) - .add("date", date) - .add("info", info) + return new StringJoiner(", ", CommitInfo.class.getSimpleName() + "[", "]") + .add("sessionId=" + sessionId) + .add("userId=" + userId) + .add("external=" + external) + .add("date=" + date) + .add("info=" + info) .toString(); }