Skip to content

Commit 71a1e90

Browse files
committed
Fix path/string
1 parent 3faa3ff commit 71a1e90

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

libs/entitlement/src/test/java/org/elasticsearch/entitlement/runtime/policy/PolicyParserTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ public void testParseFiles() throws IOException {
141141
);
142142
assertEquals(expected, policyWithOnePath);
143143

144-
var testPathToReadDir = createTempDir();
144+
String testPathToReadDir = createTempDir().toAbsolutePath().toString();
145145
Policy policyWithTwoPaths = new PolicyParser(new ByteArrayInputStream(Strings.format("""
146146
entitlement-module-name:
147147
- files:
@@ -168,8 +168,8 @@ public void testParseFiles() throws IOException {
168168
);
169169
assertEquals(expected, policyWithTwoPaths);
170170

171-
var relativePathToFile = Path.of("test/path/to/file").normalize();
172-
var relativePathToDir = Path.of("test/path/to/read-dir/").normalize();
171+
String relativePathToFile = Path.of("test/path/to/file").normalize().toString();
172+
String relativePathToDir = Path.of("test/path/to/read-dir/").normalize().toString();
173173
Policy policyWithMultiplePathsAndBaseDir = new PolicyParser(
174174
new ByteArrayInputStream(Strings.format("""
175175
entitlement-module-name:

0 commit comments

Comments
 (0)