You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "mreutegg (via GitHub)" <gi...@apache.org> on 2023/03/08 12:14:56 UTC

[GitHub] [jackrabbit-oak] mreutegg commented on a diff in pull request #858: OAK-10114 : created new query API with projections to limit memory us…

mreutegg commented on code in PR #858:
URL: https://github.com/apache/jackrabbit-oak/pull/858#discussion_r1129336932


##########
oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/Document.java:
##########
@@ -151,6 +151,22 @@ public void seal() {
         }
     }
 
+    /**
+     * UnSeals this document and turns it into a mutable object.
+     *
+     * @see #seal()
+     */
+    void unSeal() {

Review Comment:
   I don't like adding method. The idea behind sealing a document is to ensure it becomes immutable. A DocumentStore implementation can use this to construct a Document, put it into a cache and then return it to a caller. With this new method a caller can modify a sealed Document, violating a basic principle.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org