8231790: Provide better FileSystemProviders

Reviewed-by: alanb, skoivu, rhalade
This commit is contained in:
Brian Burkhalter 2019-10-10 10:52:31 -07:00
parent be35f9ef53
commit 68c5b95b13

View file

@ -3348,6 +3348,8 @@ public final class Files {
Objects.requireNonNull(cs);
byte[] ba = readAllBytes(path);
if (path.getClass().getModule() != Object.class.getModule())
ba = ba.clone();
return JLA.newStringNoRepl(ba, cs);
}