소스 검색

Replaced "assert" with IllegalStateException

JaniruTEC 4 년 전
부모
커밋
6f542ac8b8
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      main/commons/src/main/java/org/cryptomator/common/mountpoint/CustomMountPointChooser.java

+ 2 - 2
main/commons/src/main/java/org/cryptomator/common/mountpoint/CustomMountPointChooser.java

@@ -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);