jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tri...@apache.org
Subject svn commit: r1800724 - in /jackrabbit/commons/filevault/trunk: parent/ vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/ vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/impl/
Date Tue, 04 Jul 2017 05:16:24 GMT
Author: tripod
Date: Tue Jul  4 05:16:23 2017
New Revision: 1800724

URL: http://svn.apache.org/viewvc?rev=1800724&view=rev
Log:
JCRVLT-191 Make VaultPackage and JcrPackage AutoCloseable

Modified:
    jackrabbit/commons/filevault/trunk/parent/pom.xml
    jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/ExportPostProcessor.java
    jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/InstallContext.java
    jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/InstallHook.java
    jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/JcrPackage.java
    jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/JcrPackageDefinition.java
    jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/JcrPackageManager.java
    jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/PackageManager.java
    jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/PackageProperties.java
    jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/Packaging.java
    jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/VaultPackage.java
    jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/impl/JcrPackageImpl.java
    jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/package-info.java

Modified: jackrabbit/commons/filevault/trunk/parent/pom.xml
URL: http://svn.apache.org/viewvc/jackrabbit/commons/filevault/trunk/parent/pom.xml?rev=1800724&r1=1800723&r2=1800724&view=diff
==============================================================================
--- jackrabbit/commons/filevault/trunk/parent/pom.xml (original)
+++ jackrabbit/commons/filevault/trunk/parent/pom.xml Tue Jul  4 05:16:23 2017
@@ -149,8 +149,8 @@
                                 <goal>baseline</goal>
                             </goals>
                             <configuration>
-                                <failOnError>false</failOnError>
-                                <comparisonVersion>3.1.30</comparisonVersion>
+                                <failOnError>true</failOnError>
+                                <comparisonVersion>LATEST</comparisonVersion>
                             </configuration>
                         </execution>
                     </executions>

Modified: jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/ExportPostProcessor.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/ExportPostProcessor.java?rev=1800724&r1=1800723&r2=1800724&view=diff
==============================================================================
--- jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/ExportPostProcessor.java
(original)
+++ jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/ExportPostProcessor.java
Tue Jul  4 05:16:23 2017
@@ -18,10 +18,12 @@
 package org.apache.jackrabbit.vault.packaging;
 
 import org.apache.jackrabbit.vault.fs.io.AbstractExporter;
+import org.osgi.annotation.versioning.ConsumerType;
 
 /**
  * Defines a post processor that is invoked after a package is assembled.
  */
+@ConsumerType
 public interface ExportPostProcessor {
 
     /**

Modified: jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/InstallContext.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/InstallContext.java?rev=1800724&r1=1800723&r2=1800724&view=diff
==============================================================================
--- jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/InstallContext.java
(original)
+++ jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/InstallContext.java
Tue Jul  4 05:16:23 2017
@@ -20,11 +20,13 @@ package org.apache.jackrabbit.vault.pack
 import javax.jcr.Session;
 
 import org.apache.jackrabbit.vault.fs.io.ImportOptions;
+import org.osgi.annotation.versioning.ProviderType;
 
 /**
  * The install context is passed to {@link InstallHook}s during the different
  * phases of a package installation.
  */
+@ProviderType
 public interface InstallContext {
 
     /**

Modified: jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/InstallHook.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/InstallHook.java?rev=1800724&r1=1800723&r2=1800724&view=diff
==============================================================================
--- jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/InstallHook.java
(original)
+++ jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/InstallHook.java
Tue Jul  4 05:16:23 2017
@@ -17,6 +17,8 @@
 
 package org.apache.jackrabbit.vault.packaging;
 
+import org.osgi.annotation.versioning.ConsumerType;
+
 /**
  * An install hook is used to do some pre and post work during a package
  * install. the hooks need to have at least one class that implements this
@@ -33,6 +35,7 @@ package org.apache.jackrabbit.vault.pack
  * phase is aborted and all hooks (also the failing one) are called again with
  * the respective "fail" phase.
  */
+@ConsumerType
 public interface InstallHook {
 
     /**

Modified: jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/JcrPackage.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/JcrPackage.java?rev=1800724&r1=1800723&r2=1800724&view=diff
==============================================================================
--- jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/JcrPackage.java
(original)
+++ jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/JcrPackage.java
Tue Jul  4 05:16:23 2017
@@ -26,11 +26,13 @@ import javax.jcr.Property;
 import javax.jcr.RepositoryException;
 
 import org.apache.jackrabbit.vault.fs.io.ImportOptions;
+import org.osgi.annotation.versioning.ProviderType;
 
 /**
  * Specifies the interface of a vault package stored in the repository.
  */
-public interface JcrPackage extends Comparable<JcrPackage> {
+@ProviderType
+public interface JcrPackage extends Comparable<JcrPackage>, AutoCloseable {
 
     /**
      * Nodetype name of a package node

Modified: jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/JcrPackageDefinition.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/JcrPackageDefinition.java?rev=1800724&r1=1800723&r2=1800724&view=diff
==============================================================================
--- jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/JcrPackageDefinition.java
(original)
+++ jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/JcrPackageDefinition.java
Tue Jul  4 05:16:23 2017
@@ -30,10 +30,12 @@ import org.apache.jackrabbit.vault.fs.ap
 import org.apache.jackrabbit.vault.fs.api.WorkspaceFilter;
 import org.apache.jackrabbit.vault.fs.config.MetaInf;
 import org.apache.jackrabbit.vault.fs.io.AccessControlHandling;
+import org.osgi.annotation.versioning.ProviderType;
 
 /**
  * Specifies the interface of a package definition stored in the repository.
  */
+@ProviderType
 public interface JcrPackageDefinition {
 
     /**

Modified: jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/JcrPackageManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/JcrPackageManager.java?rev=1800724&r1=1800723&r2=1800724&view=diff
==============================================================================
--- jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/JcrPackageManager.java
(original)
+++ jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/JcrPackageManager.java
Tue Jul  4 05:16:23 2017
@@ -34,10 +34,12 @@ import org.apache.jackrabbit.vault.fs.ap
 import org.apache.jackrabbit.vault.fs.api.WorkspaceFilter;
 import org.apache.jackrabbit.vault.fs.io.Archive;
 import org.apache.jackrabbit.vault.fs.io.ImportOptions;
+import org.osgi.annotation.versioning.ProviderType;
 
 /**
  * Extends the {@link PackageManager} by repository specific operations.
  */
+@ProviderType
 public interface JcrPackageManager extends PackageManager {
 
     /**

Modified: jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/PackageManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/PackageManager.java?rev=1800724&r1=1800723&r2=1800724&view=diff
==============================================================================
--- jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/PackageManager.java
(original)
+++ jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/PackageManager.java
Tue Jul  4 05:16:23 2017
@@ -24,6 +24,8 @@ import java.io.OutputStream;
 import javax.jcr.RepositoryException;
 import javax.jcr.Session;
 
+import org.osgi.annotation.versioning.ProviderType;
+
 /**
  * The package manager is used to deal with packages. the following operations
  * are defined:
@@ -67,6 +69,7 @@ import javax.jcr.Session;
  *
  * </dl>
  */
+@ProviderType
 public interface PackageManager {
 
     /**

Modified: jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/PackageProperties.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/PackageProperties.java?rev=1800724&r1=1800723&r2=1800724&view=diff
==============================================================================
--- jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/PackageProperties.java
(original)
+++ jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/PackageProperties.java
Tue Jul  4 05:16:23 2017
@@ -21,6 +21,7 @@ import java.util.Calendar;
 
 import org.apache.jackrabbit.vault.fs.api.VaultFsConfig;
 import org.apache.jackrabbit.vault.fs.io.AccessControlHandling;
+import org.osgi.annotation.versioning.ProviderType;
 
 /**
  * The package properties provide extra/meta information about the package to install. The
properties are usually
@@ -28,6 +29,7 @@ import org.apache.jackrabbit.vault.fs.io
  *
  * @since 3.1
  */
+@ProviderType
 public interface PackageProperties {
 
     /**

Modified: jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/Packaging.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/Packaging.java?rev=1800724&r1=1800723&r2=1800724&view=diff
==============================================================================
--- jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/Packaging.java
(original)
+++ jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/Packaging.java
Tue Jul  4 05:16:23 2017
@@ -21,10 +21,13 @@ import javax.jcr.Node;
 import javax.jcr.RepositoryException;
 import javax.jcr.Session;
 
+import org.osgi.annotation.versioning.ProviderType;
+
 /**
  * Default access point to package managers.
  * @since 2.4.0
  */
+@ProviderType
 public interface Packaging {
 
     /**

Modified: jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/VaultPackage.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/VaultPackage.java?rev=1800724&r1=1800723&r2=1800724&view=diff
==============================================================================
--- jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/VaultPackage.java
(original)
+++ jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/VaultPackage.java
Tue Jul  4 05:16:23 2017
@@ -18,15 +18,14 @@
 package org.apache.jackrabbit.vault.packaging;
 
 import java.io.File;
-import java.util.Calendar;
 
 import javax.jcr.RepositoryException;
 import javax.jcr.Session;
 
 import org.apache.jackrabbit.vault.fs.config.MetaInf;
-import org.apache.jackrabbit.vault.fs.io.AccessControlHandling;
 import org.apache.jackrabbit.vault.fs.io.Archive;
 import org.apache.jackrabbit.vault.fs.io.ImportOptions;
+import org.osgi.annotation.versioning.ProviderType;
 
 /**
  * Defines a vault package. A vault package is a binary assembled representation
@@ -34,7 +33,8 @@ import org.apache.jackrabbit.vault.fs.io
  * <p>
  * Note that VaultPackage currently extends from PackageProperties to keep the interface
backwards compatible.
  */
-public interface VaultPackage extends PackageProperties {
+@ProviderType
+public interface VaultPackage extends PackageProperties, AutoCloseable {
 
     /**
      * Returns the id of this package or {@code null} if the id can't

Modified: jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/impl/JcrPackageImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/impl/JcrPackageImpl.java?rev=1800724&r1=1800723&r2=1800724&view=diff
==============================================================================
--- jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/impl/JcrPackageImpl.java
(original)
+++ jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/impl/JcrPackageImpl.java
Tue Jul  4 05:16:23 2017
@@ -317,13 +317,10 @@ public class JcrPackageImpl implements J
             }
             if (!forceFileArchive && size >= 0 && size < MAX_MEMORY_ARCHIVE_SIZE)
{
                 MemoryArchive archive = new MemoryArchive(false);
-                InputStream in = getData().getStream();
-                try {
+                try (InputStream in = getData().getStream()) {
                     archive.run(in);
                 } catch (Exception e) {
                     throw new IOException("Error while reading stream", e);
-                } finally {
-                    in.close();
                 }
                 pack = new ZipVaultPackage(archive, true);
             } else {

Modified: jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/package-info.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/package-info.java?rev=1800724&r1=1800723&r2=1800724&view=diff
==============================================================================
--- jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/package-info.java
(original)
+++ jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/package-info.java
Tue Jul  4 05:16:23 2017
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-@Version("2.4.0")
+@Version("2.5.0")
 package org.apache.jackrabbit.vault.packaging;
 
 import org.osgi.annotation.versioning.Version;
\ No newline at end of file



Mime
View raw message