aboutsummaryrefslogtreecommitdiffstats
path: root/config-model/src/main/java/com/yahoo/schema/DistributableResource.java
diff options
context:
space:
mode:
Diffstat (limited to 'config-model/src/main/java/com/yahoo/schema/DistributableResource.java')
-rw-r--r--config-model/src/main/java/com/yahoo/schema/DistributableResource.java11
1 files changed, 3 insertions, 8 deletions
diff --git a/config-model/src/main/java/com/yahoo/schema/DistributableResource.java b/config-model/src/main/java/com/yahoo/schema/DistributableResource.java
index 7a8a3963ba4..e7bdb68a03d 100644
--- a/config-model/src/main/java/com/yahoo/schema/DistributableResource.java
+++ b/config-model/src/main/java/com/yahoo/schema/DistributableResource.java
@@ -67,14 +67,9 @@ public class DistributableResource implements Comparable <DistributableResource>
public void register(FileRegistry fileRegistry) {
switch (pathType) {
- case FILE:
- fileReference = fileRegistry.addFile(path);
- break;
- case URI:
- fileReference = fileRegistry.addUri(path);
- break;
- default:
- throw new IllegalArgumentException("Unknown path type " + pathType);
+ case FILE -> fileReference = fileRegistry.addFile(path);
+ case URI -> fileReference = fileRegistry.addUri(path);
+ default -> throw new IllegalArgumentException("Unknown path type " + pathType);
}
}