Here you can find the source of toPath(@Nullable String plain)
@Nullable public static Path toPath(@Nullable String plain)
//package com.java2s; //License from project: Open Source License import javax.annotation.Nullable; import java.nio.file.*; public class Main { @Nullable public static Path toPath(@Nullable String plain) { return plain != null ? Paths.get(plain) : null; }/*w w w.j a v a 2 s. c o m*/ }