jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tri...@apache.org
Subject svn commit: r1800725 - in /jackrabbit/commons/filevault/trunk/vault-core/src: main/java/org/apache/jackrabbit/vault/fs/io/ main/java/org/apache/jackrabbit/vault/packaging/ main/java/org/apache/jackrabbit/vault/packaging/impl/ test/java/org/apache/jackr...
Date Tue, 04 Jul 2017 05:55:18 GMT
Author: tripod
Date: Tue Jul  4 05:55:17 2017
New Revision: 1800725

URL: http://svn.apache.org/viewvc?rev=1800725&view=rev
Log:
JCRVLT-192 Deprecated exact storage location (/etc/packages)

Modified:
    jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/fs/io/Importer.java
    jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/Dependency.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/PackageId.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/impl/JcrPackageManagerImpl.java
    jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/impl/PackagePropertiesImpl.java
    jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/impl/ZipVaultPackage.java
    jackrabbit/commons/filevault/trunk/vault-core/src/test/java/org/apache/jackrabbit/vault/packaging/PackageIdTest.java

Modified: jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/fs/io/Importer.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/fs/io/Importer.java?rev=1800725&r1=1800724&r2=1800725&view=diff
==============================================================================
--- jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/fs/io/Importer.java
(original)
+++ jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/fs/io/Importer.java
Tue Jul  4 05:55:17 2017
@@ -84,6 +84,8 @@ import org.apache.jackrabbit.vault.util.
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import static org.apache.jackrabbit.vault.packaging.impl.JcrPackageManagerImpl.PACKAGE_ROOT_PATH_PREFIX;
+
 /**
  * {@code AbstractImporter}
  *
@@ -669,7 +671,8 @@ public class Importer {
                         continue;
                     }
                 }
-                if (repoPath.startsWith("/etc/packages/") && (repoPath.endsWith(".jar")
|| repoPath.endsWith(".zip"))) {
+                // todo: find better way to detect sub-packages
+                if (repoPath.startsWith(PACKAGE_ROOT_PATH_PREFIX) && (repoPath.endsWith(".jar")
|| repoPath.endsWith(".zip"))) {
                     subPackages.add(repoPath);
                 }
 
@@ -697,7 +700,7 @@ public class Importer {
                 SerializationType serType = SerializationType.GENERIC;
                 ArtifactType type = ArtifactType.PRIMARY;
                 VaultInputSource is = archive.getInputSource(file);
-                if (ext.equals(".xml")) {
+                if (".xml".equals(ext)) {
                     // this can either be an generic exported docview or a 'user-xml' that
is imported as file
                     // btw: this only works for input sources that can refetch their input
stream
                     serType = XmlAnalyzer.analyze(is);

Modified: jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/Dependency.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/Dependency.java?rev=1800725&r1=1800724&r2=1800725&view=diff
==============================================================================
--- jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/Dependency.java
(original)
+++ jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/Dependency.java
Tue Jul  4 05:55:17 2017
@@ -113,7 +113,10 @@ public class Dependency {
     /**
      * Returns the installation path of this dependency
      * @return the installation path;
+     *
+     * @deprecated As of 3.1.42, the storage location is implementation details.
      */
+    @Deprecated
     public String getPath() {
         StringBuilder b = new StringBuilder();
         if (groupId.length() > 0) {

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=1800725&r1=1800724&r2=1800725&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:55:17 2017
@@ -210,7 +210,10 @@ public interface JcrPackage extends Comp
      * @throws RepositoryException if an error occurs.
      *
      * @since 2.2.18
+     *
+     * @deprecated As of 3.1.42, the storage location is implementation details.
      */
+    @Deprecated
     boolean verifyId(boolean autoFix, boolean autoSave) throws RepositoryException;
 
     /**

Modified: jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/PackageId.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/PackageId.java?rev=1800725&r1=1800724&r2=1800725&view=diff
==============================================================================
--- jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/PackageId.java
(original)
+++ jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/PackageId.java
Tue Jul  4 05:55:17 2017
@@ -28,8 +28,18 @@ import org.apache.jackrabbit.vault.util.
  */
 public class PackageId implements Comparable<PackageId> {
 
+    /**
+     * The root path of the packages storage location.
+     * @deprecated As of 3.1.42, the storage location is implementation details.
+     */
+    @Deprecated
     public static final String ETC_PACKAGES = "/etc/packages";
 
+    /**
+     * The root path prefix of the packages storage location.
+     * @deprecated As of 3.1.42, the storage location is implementation details.
+     */
+    @Deprecated
     public static final String ETC_PACKAGES_PREFIX = "/etc/packages/";
 
     public static final PackageId[] EMPTY = new PackageId[0];
@@ -47,14 +57,17 @@ public class PackageId implements Compar
     /**
      * Creates a new package id
      * @param path path of the package
+     *
+     * @deprecated As of 3.1.42, the storage location is implementation details.
      */
+    @Deprecated
     public PackageId(String path) {
         fromPath = true;
         path = path.trim();
         int idx = path.lastIndexOf('.');
         if (idx > 0) {
             String ext = path.substring(idx);
-            if (ext.equalsIgnoreCase(".zip") || ext.equalsIgnoreCase(".jar")) {
+            if (".zip".equalsIgnoreCase(ext) || ".jar".equalsIgnoreCase(ext)) {
                 path = path.substring(0, idx);
             }
         }
@@ -90,7 +103,7 @@ public class PackageId implements Compar
             // check if starts with a letter'
             if (Character.isJavaIdentifierStart(segs[i].charAt(0))) {
                 // then need a digit
-                if (segs[i].length() == 1 || !Character.isDigit(segs[i].charAt(1)) &&
!segs[i].equals("SNAPSHOT")) {
+                if (segs[i].length() == 1 || !Character.isDigit(segs[i].charAt(1)) &&
!"SNAPSHOT".equals(segs[i])) {
                     break;
                 }
             }
@@ -124,7 +137,10 @@ public class PackageId implements Compar
      * Creates a new package id
      * @param path path of the package
      * @param version version of the package
+     *
+     * @deprecated As of 3.1.42, the storage location is implementation details.
      */
+    @Deprecated
     public PackageId(String path, String version) {
         this(path, Version.create(version));
     }
@@ -133,14 +149,17 @@ public class PackageId implements Compar
      * Creates a new package id
      * @param path path of the package
      * @param version version of the package
+     *
+     * @deprecated As of 3.1.42, the storage location is implementation details.
      */
+    @Deprecated
     public PackageId(String path, Version version) {
         fromPath = true;
         path = path.trim();
         int idx = path.lastIndexOf('.');
         if (idx > 0) {
             String ext = path.substring(idx);
-            if (ext.equalsIgnoreCase(".zip") || ext.equalsIgnoreCase(".jar")) {
+            if (".zip".equalsIgnoreCase(ext) || ".jar".equalsIgnoreCase(ext)) {
                 path = path.substring(0, idx);
             }
         }
@@ -257,7 +276,9 @@ public class PackageId implements Compar
      * @return {@code true} if constructed from path.
      *
      * @since 2.2.26
+     * @deprecated As of 3.1.42, the storage location is implementation details.
      */
+    @Deprecated
     public boolean isFromPath() {
         return fromPath;
     }
@@ -268,7 +289,9 @@ public class PackageId implements Compar
      *
      * @return the path of this package
      * @since 2.2
+     * @deprecated As of 3.1.42, the storage location is implementation details.
      */
+    @Deprecated
     public String getInstallationPath() {
         StringBuilder b = new StringBuilder(ETC_PACKAGES_PREFIX);
         if (group.length() > 0) {
@@ -512,7 +535,7 @@ public class PackageId implements Compar
                         // More detailed validity checks (is it well formed,
                         // registered, etc.) are not needed here.
                         state = STATE_NAME_START;
-                    } else if (tmp.equals("internal")) {
+                    } else if ("internal".equals(tmp)) {
                         // As a special Jackrabbit backwards compatibility
                         // feature, support {internal} as a valid URI prefix
                         state = STATE_NAME_START;

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=1800725&r1=1800724&r2=1800725&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:55:17 2017
@@ -231,7 +231,7 @@ public class JcrPackageImpl implements J
         PackageId cId = new PackageId(node.getPath());
         // compare installation paths since non-conform version numbers might
         // lead to different pids (bug #35564)
-        if (id.getInstallationPath().equals(cId.getInstallationPath())) {
+        if (JcrPackageManagerImpl.getInstallationPath(id).equals(JcrPackageManagerImpl.getInstallationPath(cId)))
{
             if (autoFix && id.isFromPath()) {
                 // if definition has no id set, fix anyways
                 jDef.setId(cId, autoSave);
@@ -562,7 +562,8 @@ public class JcrPackageImpl implements J
         // check if filter has root outside /etc/packages
         boolean hasOwnContent = false;
         for (PathFilterSet root: a.getMetaInf().getFilter().getFilterSets()) {
-            if (!Text.isDescendantOrEqual("/etc/packages", root.getRoot())) {
+            // todo: find better way to detect subpackages
+            if (!Text.isDescendantOrEqual(JcrPackageManagerImpl.PACKAGE_ROOT_PATH, root.getRoot()))
{
                 log.debug("Package {}: contains content outside /etc/packages. Sub packages
will have a dependency to it", pId);
                 hasOwnContent = true;
                 break;
@@ -822,7 +823,7 @@ public class JcrPackageImpl implements J
         }
         log.debug("Creating snapshot for {}.", id);
         JcrPackageManagerImpl packMgr = new JcrPackageManagerImpl(node.getSession());
-        String path = id.getInstallationPath();
+        String path = JcrPackageManagerImpl.getInstallationPath(id);
         String parentPath = Text.getRelativeParent(path, 1);
         Node folder = packMgr.mkdir(parentPath, true);
         JcrPackage snap = mgr.createNew(folder, id, null, true);
@@ -856,10 +857,11 @@ public class JcrPackageImpl implements J
         if (node == null) {
             return null;
         }
-        if (node.getSession().nodeExists(id.getInstallationPath())) {
-            return node.getSession().getNode(id.getInstallationPath());
-        } else if (node.getSession().nodeExists(id.getInstallationPath() + ".zip")) {
-            return node.getSession().getNode(id.getInstallationPath() + ".zip");
+        String path = JcrPackageManagerImpl.getInstallationPath(id);
+        if (node.getSession().nodeExists(path)) {
+            return node.getSession().getNode(path);
+        } else if (node.getSession().nodeExists(path + ".zip")) {
+            return node.getSession().getNode(path + ".zip");
         }
         return null;
     }

Modified: jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/impl/JcrPackageManagerImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/impl/JcrPackageManagerImpl.java?rev=1800725&r1=1800724&r2=1800725&view=diff
==============================================================================
--- jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/impl/JcrPackageManagerImpl.java
(original)
+++ jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/impl/JcrPackageManagerImpl.java
Tue Jul  4 05:55:17 2017
@@ -96,7 +96,12 @@ public class JcrPackageManagerImpl exten
     /**
      * root path for packages
      */
-    private final static String PACKAGE_ROOT_PATH = "/etc/packages";
+    final static String PACKAGE_ROOT_PATH = "/etc/packages";
+
+    /**
+     * root path prefix for packages
+     */
+    public final static String PACKAGE_ROOT_PATH_PREFIX = "/etc/packages/";
 
     /**
      * root path for packages
@@ -125,7 +130,7 @@ public class JcrPackageManagerImpl exten
 
     @Override
     public JcrPackage open(PackageId id) throws RepositoryException {
-        String path = id.getInstallationPath();
+        String path = getInstallationPath(id);
         String[] exts = new String[]{"", ".zip", ".jar"};
         for (String ext: exts) {
             if (session.nodeExists(path + ext)) {
@@ -254,7 +259,7 @@ public class JcrPackageManagerImpl exten
         PackageId pid = props.getId();
 
         // invalidate pid if path is unknown
-        if (pid == null || pid.getInstallationPath().equals(ZipVaultPackage.UNKNOWN_PATH))
{
+        if (pid == null) {
             bin.dispose();
             throw new IOException("Package does not contain a path specification or valid
package id.");
         }
@@ -263,7 +268,7 @@ public class JcrPackageManagerImpl exten
         }
 
         // create parent node
-        String path = pid.getInstallationPath() + ".zip";
+        String path = getInstallationPath(pid) + ".zip";
         String parentPath = Text.getRelativeParent(path, 1);
         String name = Text.getName(path);
         Node parent = mkdir(parentPath, false);
@@ -377,9 +382,6 @@ public class JcrPackageManagerImpl exten
 
         // invalidate pid if path is unknown
         PackageId pid = pkg.getId();
-        if (pid != null && pid.getInstallationPath().equals(ZipVaultPackage.UNKNOWN_PATH))
{
-            pid = null;
-        }
         if (pid == null) {
             if (nameHint == null || nameHint.length() == 0) {
                 throw new IOException("Package does not contain a path specification and
not name hint is given.");
@@ -391,7 +393,7 @@ public class JcrPackageManagerImpl exten
         }
 
         // create parent node
-        String path = pid.getInstallationPath() + ".zip";
+        String path = getInstallationPath(pid) + ".zip";
         String parentPath = Text.getRelativeParent(path, 1);
         String name = Text.getName(path);
         Node parent = mkdir(parentPath, false);
@@ -466,7 +468,7 @@ public class JcrPackageManagerImpl exten
             throw new RepositoryException("Unable to create package. Illegal package name.");
         }
         PackageId pid = new PackageId(group, name, version);
-        Node folder = mkdir(Text.getRelativeParent(pid.getInstallationPath(), 1), false);
+        Node folder = mkdir(Text.getRelativeParent(getInstallationPath(pid), 1), false);
         return createNew(folder, pid, null, true);
     }
 
@@ -486,7 +488,7 @@ public class JcrPackageManagerImpl exten
     @Nonnull
     public JcrPackage createNew(@Nonnull Node parent, @Nonnull PackageId pid, @Nullable VaultPackage
pack, boolean autoSave)
             throws RepositoryException, IOException {
-        Node node = parent.addNode(Text.getName(pid.getInstallationPath() + ".zip"), JcrConstants.NT_FILE);
+        Node node = parent.addNode(Text.getName(getInstallationPath(pid) + ".zip"), JcrConstants.NT_FILE);
         Node content = node.addNode(JcrConstants.JCR_CONTENT, JcrConstants.NT_RESOURCE);
         content.addMixin(JcrPackage.NT_VLT_PACKAGE);
         Node defNode = content.addNode(JcrPackage.NN_VLT_DEFINITION);
@@ -534,7 +536,7 @@ public class JcrPackageManagerImpl exten
     @Nonnull
     public JcrPackage createNew(@Nonnull Node parent, @Nonnull PackageId pid, @Nonnull Binary
bin, @Nonnull MemoryArchive archive)
             throws RepositoryException, IOException {
-        Node node = parent.addNode(Text.getName(pid.getInstallationPath() + ".zip"), JcrConstants.NT_FILE);
+        Node node = parent.addNode(Text.getName(getInstallationPath(pid) + ".zip"), JcrConstants.NT_FILE);
         Node content = node.addNode(JcrConstants.JCR_CONTENT, JcrConstants.NT_RESOURCE);
         content.addMixin(JcrPackage.NT_VLT_PACKAGE);
         Node defNode = content.addNode(JcrPackage.NN_VLT_DEFINITION);
@@ -599,7 +601,7 @@ public class JcrPackageManagerImpl exten
                 name == null ? id.getName() : name,
                 version == null ? id.getVersion() : Version.create(version)
         );
-        String dstPath = newId.getInstallationPath() + ".zip";
+        String dstPath = getInstallationPath(newId) + ".zip";
         if (id.equals(newId) && pack.getNode().getPath().equals(dstPath)) {
             log.debug("Package id not changed. won't rename.");
             return pack;
@@ -954,4 +956,30 @@ public class JcrPackageManagerImpl exten
             }
         }
     }
+
+    /**
+     * Returns the path of this package. please note that since 2.3 this also
+     * includes the version, but never the extension (.zip).
+     *
+     * Note that the exact storage location is implementation detail and this method should
only be used internally for
+     * backward compatibility use cases.
+     *
+     * @param pid the package id
+     * @return the path of this package
+     */
+    public static String getInstallationPath(PackageId pid) {
+        StringBuilder b = new StringBuilder(PACKAGE_ROOT_PATH_PREFIX);
+        String group = pid.getGroup();
+        if (group.length() > 0) {
+            b.append(group);
+            b.append("/");
+        }
+        b.append(pid.getName());
+        String version = pid.getVersion().toString();
+        if (version.length() > 0) {
+            b.append("-").append(version);
+        }
+        return b.toString();
+    }
+
 }
\ No newline at end of file

Modified: jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/impl/PackagePropertiesImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/impl/PackagePropertiesImpl.java?rev=1800725&r1=1800724&r2=1800725&view=diff
==============================================================================
--- jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/impl/PackagePropertiesImpl.java
(original)
+++ jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/impl/PackagePropertiesImpl.java
Tue Jul  4 05:55:17 2017
@@ -36,8 +36,6 @@ public abstract class PackagePropertiesI
 
     private static final Logger log = LoggerFactory.getLogger(PackagePropertiesImpl.class);
 
-    public static final String UNKNOWN_PATH = "/etc/packages/unknown";
-
     private PackageId id;
 
     public PackageId getId() {
@@ -52,13 +50,7 @@ public abstract class PackagePropertiesI
             if (group != null && name != null) {
                 id = new PackageId(group, name, version);
             } else {
-                // check for legacy packages that only contains a 'path' property
-                String path = getProperty("path");
-                if (path == null || path.length() == 0) {
-                    log.warn("Package does not specify a path. setting to 'unknown'");
-                    path = UNKNOWN_PATH;
-                }
-                id = new PackageId(path, version);
+                log.warn("Package properties not valid. need group and name property.");
             }
         }
         return id;

Modified: jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/impl/ZipVaultPackage.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/impl/ZipVaultPackage.java?rev=1800725&r1=1800724&r2=1800725&view=diff
==============================================================================
--- jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/impl/ZipVaultPackage.java
(original)
+++ jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/impl/ZipVaultPackage.java
Tue Jul  4 05:55:17 2017
@@ -49,8 +49,6 @@ public class ZipVaultPackage extends Pac
 
     private static final Logger log = LoggerFactory.getLogger(ZipVaultPackage.class);
 
-    public static final String UNKNOWN_PATH = "/etc/packages/unknown";
-
     private Archive archive;
 
     public ZipVaultPackage(File file, boolean isTmpFile) throws IOException {

Modified: jackrabbit/commons/filevault/trunk/vault-core/src/test/java/org/apache/jackrabbit/vault/packaging/PackageIdTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/filevault/trunk/vault-core/src/test/java/org/apache/jackrabbit/vault/packaging/PackageIdTest.java?rev=1800725&r1=1800724&r2=1800725&view=diff
==============================================================================
--- jackrabbit/commons/filevault/trunk/vault-core/src/test/java/org/apache/jackrabbit/vault/packaging/PackageIdTest.java
(original)
+++ jackrabbit/commons/filevault/trunk/vault-core/src/test/java/org/apache/jackrabbit/vault/packaging/PackageIdTest.java
Tue Jul  4 05:55:17 2017
@@ -29,11 +29,13 @@ public class PackageIdTest extends TestC
         assertEquals("group:name:version", packId.toString());
     }
 
+    @SuppressWarnings("deprecation")
     public void testToInstallPath() {
         PackageId packId = new PackageId("group", "name", "version");
         assertEquals("/etc/packages/group/name-version", packId.getInstallationPath());
     }
 
+    @SuppressWarnings("deprecation")
     public void testToInstallPath1() {
         PackageId packId = new PackageId("group", "name", "");
         assertEquals("/etc/packages/group/name", packId.getInstallationPath());



Mime
View raw message