mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-15 16:44:36 +02:00
8251466: test/java/io/File/GetXSpace.java fails on Windows with mapped network drives.
Reviewed-by: bpb
This commit is contained in:
parent
a1d1e4753b
commit
178ac74653
1 changed files with 5 additions and 6 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2005, 2021, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2005, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -34,7 +34,6 @@
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FilePermission;
|
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
|
@ -108,8 +107,8 @@ public class GetXSpace {
|
||||||
|
|
||||||
Space(String total, String free, String name) {
|
Space(String total, String free, String name) {
|
||||||
try {
|
try {
|
||||||
this.total = Long.valueOf(total) * KSIZE;
|
this.total = Long.parseLong(total) * KSIZE;
|
||||||
this.free = Long.valueOf(free) * KSIZE;
|
this.free = Long.parseLong(free) * KSIZE;
|
||||||
} catch (NumberFormatException x) {
|
} catch (NumberFormatException x) {
|
||||||
throw new RuntimeException("the regex should have caught this", x);
|
throw new RuntimeException("the regex should have caught this", x);
|
||||||
}
|
}
|
||||||
|
@ -157,7 +156,7 @@ public class GetXSpace {
|
||||||
}
|
}
|
||||||
al.add(new Space(m.group(2), m.group(3), name));;
|
al.add(new Space(m.group(2), m.group(3), name));;
|
||||||
}
|
}
|
||||||
j = m.end() + 1;
|
j = m.end();
|
||||||
} else {
|
} else {
|
||||||
throw new RuntimeException("unrecognized df output format: "
|
throw new RuntimeException("unrecognized df output format: "
|
||||||
+ "charAt(" + j + ") = '"
|
+ "charAt(" + j + ") = '"
|
||||||
|
@ -227,7 +226,7 @@ public class GetXSpace {
|
||||||
// On Linux, ignore the NSFE if the path is one of the
|
// On Linux, ignore the NSFE if the path is one of the
|
||||||
// /run/user/$UID mounts created by pam_systemd(8) as it
|
// /run/user/$UID mounts created by pam_systemd(8) as it
|
||||||
// might be deleted during the test
|
// might be deleted during the test
|
||||||
if (!Platform.isLinux() || s.name().indexOf("/run/user") == -1)
|
if (!Platform.isLinux() || !s.name().contains("/run/user"))
|
||||||
throw new RuntimeException(nsfe);
|
throw new RuntimeException(nsfe);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue