summaryrefslogtreecommitdiffstats
path: root/node-repository
diff options
context:
space:
mode:
authorMartin Polden <mpolden@mpolden.no>2018-10-29 13:16:56 +0100
committerMartin Polden <mpolden@mpolden.no>2018-10-29 13:16:56 +0100
commitfe2696a1286a1c36000182088e44483e2608d664 (patch)
tree468140a8c03d7130474f2f05c176a40b335850eb /node-repository
parent06056362f9190cf74634e4cce5b4ac0da5a6855c (diff)
Remove unnecessary substring argument
Diffstat (limited to 'node-repository')
-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);
}
}