diff --git a/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/NodeDocument.java b/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/NodeDocument.java index bca44bf938c..6c44d41ea36 100644 --- a/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/NodeDocument.java +++ b/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/NodeDocument.java @@ -364,6 +364,8 @@ static SplitDocType valueOf(Integer type){ private final long creationTime; + private Path path = null; + NodeDocument(@NotNull DocumentStore store) { this(store, Revision.getCurrentTimestamp()); } @@ -2279,7 +2281,10 @@ private Value getLatestValue(@NotNull RevisionContext context, @NotNull public Path getPath() { - return Path.fromString(getPathString()); + if (path == null) { + path = Path.fromString(getPathString()); + } + return path; } @NotNull