Replaced "assert" with IllegalStateException

This commit is contained in:
JaniruTEC
2020-08-21 21:54:33 +02:00
parent 8483f71f57
commit 6f542ac8b8

View File

@@ -46,11 +46,11 @@ public class CustomMountPointChooser implements MountPointChooser {
case NONE -> {
//Requirement "NONE" doesn't make any sense here.
//No need to prepare/verify a Mountpoint without requiring one...
assert false : "Illegal MountPointRequirement";
throw new InvalidMountPointException(new IllegalStateException("Illegal MountPointRequirement"));
}
default -> {
//Currently the case for "PARENT_OPT_MOUNT_POINT"
assert false : "Not implemented";
throw new InvalidMountPointException(new IllegalStateException("Not implemented"));
}
}
LOG.debug("Successfully checked custom mount point: {}", mountPoint);