You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by kw...@apache.org on 2023/12/04 16:35:26 UTC

(jackrabbit-filevault) branch master updated: trivial: further clarify in javadoc implications of calling getPackage()

This is an automated email from the ASF dual-hosted git repository.

kwin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jackrabbit-filevault.git


The following commit(s) were added to refs/heads/master by this push:
     new 32befc74 trivial: further clarify in javadoc implications of calling getPackage()
32befc74 is described below

commit 32befc74aee2aff26d76e0a2a7deffc4fc9f710f
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Mon Dec 4 17:35:20 2023 +0100

    trivial: further clarify in javadoc implications of calling getPackage()
---
 .../main/java/org/apache/jackrabbit/vault/packaging/JcrPackage.java  | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/JcrPackage.java b/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/JcrPackage.java
index f26b71cd..95ec6285 100644
--- a/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/JcrPackage.java
+++ b/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/JcrPackage.java
@@ -59,7 +59,7 @@ public interface JcrPackage extends Comparable<JcrPackage>, AutoCloseable {
      * Returns the package definition of this package
      * @return the package definition or {@code null} if this package is
      *         not valid.
-     * @throws RepositoryException if an error occurrs
+     * @throws RepositoryException if an error occurs
      */
     @Nullable
     JcrPackageDefinition getDefinition() throws RepositoryException;
@@ -87,6 +87,9 @@ public interface JcrPackage extends Comparable<JcrPackage>, AutoCloseable {
     /**
      * Returns the vault package stored in the data of this package.
      * Opens the package implicitly therefore {@link #close()} needs to be afterwards.
+     * This is potentially a costly operation as this requires uncompressing the ZIP stream
+     * (and potentially creating temporary files) therefore prefer using {@link #getDefinition()} whenever possible
+     * to access meta data.
      * 
      * @return the package, this is closed when {@link #close} is called on this package
      * @throws RepositoryException if an error occurs