Skip to content

Commit fef7dc5

Browse files
committed
remove conflict for main
1 parent c5b9f2a commit fef7dc5

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

libs/entitlement/src/main/java/org/elasticsearch/entitlement/runtime/policy/FileAccessTree.java

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -64,22 +64,6 @@ private FileAccessTree(FilesEntitlement filesEntitlement, PathLookup pathLookup,
6464
this.writePaths = pruneSortedPaths(writePaths).toArray(new String[0]);
6565
}
6666

67-
public static List<String> pruneSortedPaths(List<String> paths) {
68-
List<String> prunedReadPaths = new ArrayList<>();
69-
if (paths.isEmpty() == false) {
70-
String currentPath = paths.get(0);
71-
prunedReadPaths.add(currentPath);
72-
for (int i = 1; i < paths.size(); ++i) {
73-
String nextPath = paths.get(i);
74-
if (nextPath.equals(currentPath) == false && nextPath.startsWith(currentPath) == false) {
75-
prunedReadPaths.add(nextPath);
76-
currentPath = nextPath;
77-
}
78-
}
79-
}
80-
return prunedReadPaths;
81-
}
82-
8367
public static FileAccessTree of(FilesEntitlement filesEntitlement, PathLookup pathLookup, List<String> exclusivePaths) {
8468
return new FileAccessTree(filesEntitlement, pathLookup, exclusivePaths);
8569
}

0 commit comments

Comments
 (0)