Skip to content

Commit ad22dc7

Browse files
committed
Ensure path to string conversions ues absolute path
1 parent 1e76c41 commit ad22dc7

3 files changed

Lines changed: 96 additions & 103 deletions

File tree

src/bld/java/rife/bld/extension/tools/ToolsBuild.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public ToolsBuild() {
3838
pkg = "rife.bld.extension.tools";
3939
name = "Extensions Tolls";
4040
archiveBaseName = "bld-extensions-tools";
41-
version = version(1, 0, 0);
41+
version = version(1, 0, 1, "SNAPSHOT");
4242

4343
javaRelease = 17;
4444

src/main/java/rife/bld/extension/tools/CollectionTools.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -234,12 +234,12 @@ public static List<File> combinePathsToFiles(@Nullable Path... paths) {
234234
* @param collections the collections of paths to combine; may be {@code null}
235235
* @return a new list of path strings for all non-null paths from all
236236
* non-null collections, or an empty list if {@code collections} is {@code null}
237-
* @see Path#toString()
237+
* @see Path#toAbsolutePath()
238238
* @since 1.0
239239
*/
240240
@SafeVarargs
241241
public static List<String> combinePathsToStrings(@Nullable Collection<Path>... collections) {
242-
return combineAndMap(collections, p -> Objects.requireNonNull(p).toString());
242+
return combineAndMap(collections, p -> Objects.requireNonNull(p).toAbsolutePath().toString());
243243
}
244244

245245
/**
@@ -250,11 +250,11 @@ public static List<String> combinePathsToStrings(@Nullable Collection<Path>... c
250250
* may also be {@code null} (they are silently dropped)
251251
* @return a new list of path strings for all non-null paths,
252252
* or an empty list if {@code paths} is {@code null}
253-
* @see Path#toString()
253+
* @see Path#toAbsolutePath()
254254
* @since 1.0
255255
*/
256256
public static List<String> combinePathsToStrings(@Nullable Path... paths) {
257-
return combineAndMapVarargs(paths, p -> Objects.requireNonNull(p).toString());
257+
return combineAndMapVarargs(paths, p -> Objects.requireNonNull(p).toAbsolutePath().toString());
258258
}
259259

260260
/**

0 commit comments

Comments
 (0)