diff --git a/main/commons/src/main/java/org/cryptomator/common/mountpoint/MountPointChooser.java b/main/commons/src/main/java/org/cryptomator/common/mountpoint/MountPointChooser.java index 393d68b20..2c40bb74a 100644 --- a/main/commons/src/main/java/org/cryptomator/common/mountpoint/MountPointChooser.java +++ b/main/commons/src/main/java/org/cryptomator/common/mountpoint/MountPointChooser.java @@ -1,5 +1,6 @@ package org.cryptomator.common.mountpoint; +import com.google.common.base.Preconditions; import org.cryptomator.common.vaults.Volume; import java.nio.file.Path; @@ -12,8 +13,9 @@ import java.util.SortedSet; *
All MountPointChoosers (MPCs) need to implement this class and must be added to
* the pool of possible MPCs by the {@link MountPointChooserModule MountPointChooserModule.}
* The MountPointChooserModule will sort them according to their {@link #getPriority() priority.}
- * The priority must be defined by the developer to reflect a useful execution order;
- * the order of execution of MPCs with equal priority is undefined.
+ * The priority must be defined by the developer to reflect a useful execution order.
+ * A specific priority must not be assigned to more than one MPC at a time;
+ * the result of having two MPCs with equal priority is undefined.
*
*
MPCs are executed by a {@link Volume} in ascending order of their priority
* (smaller priorities are tried first) to find and prepare a suitable mountpoint for the volume.
@@ -138,8 +140,9 @@ public interface MountPointChooser extends Comparable
+ * A specific priority must not be assigned to more than one MPC at a time;
+ * the result of having two MPCs with equal priority is undefined.
*
* @return the priority of this MPC.
*/
@@ -158,6 +161,8 @@ public interface MountPointChooser extends Comparable