aboutsummaryrefslogtreecommitdiffstats
path: root/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/restapi/v2/filter/Authorizer.java
diff options
context:
space:
mode:
Diffstat (limited to 'node-repository/src/main/java/com/yahoo/vespa/hosted/provision/restapi/v2/filter/Authorizer.java')
-rw-r--r--node-repository/src/main/java/com/yahoo/vespa/hosted/provision/restapi/v2/filter/Authorizer.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/restapi/v2/filter/Authorizer.java b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/restapi/v2/filter/Authorizer.java
index ad078e09c45..95f69dc1c2a 100644
--- a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/restapi/v2/filter/Authorizer.java
+++ b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/restapi/v2/filter/Authorizer.java
@@ -186,7 +186,7 @@ public class Authorizer implements BiPredicate<NodePrincipal, URI> {
if (!isChildOf(root, path)) {
return Optional.empty();
}
- path = path.substring(root.length(), path.length());
+ path = path.substring(root.length());
int firstSeparator = path.indexOf('/');
if (firstSeparator == -1) {
return Optional.of(path);
@@ -203,7 +203,7 @@ public class Authorizer implements BiPredicate<NodePrincipal, URI> {
if (lastSeparator == -1) {
return path;
}
- return path.substring(lastSeparator + 1, path.length());
+ return path.substring(lastSeparator + 1);
}
}