mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8202110: (fs) Remove FileSystem support for resolving against a default directory (chdir configuration)
Reviewed-by: alanb
This commit is contained in:
parent
d2df36b073
commit
05cc02b243
15 changed files with 44 additions and 104 deletions
|
@ -31,6 +31,7 @@ import java.nio.file.spi.*;
|
|||
import java.util.*;
|
||||
import java.util.regex.Pattern;
|
||||
import java.io.IOException;
|
||||
import jdk.internal.util.StaticProperty;
|
||||
|
||||
class WindowsFileSystem
|
||||
extends FileSystem
|
||||
|
@ -42,12 +43,11 @@ class WindowsFileSystem
|
|||
private final String defaultRoot;
|
||||
|
||||
// package-private
|
||||
WindowsFileSystem(WindowsFileSystemProvider provider,
|
||||
String dir)
|
||||
{
|
||||
WindowsFileSystem(WindowsFileSystemProvider provider) {
|
||||
this.provider = provider;
|
||||
|
||||
// parse default directory and check it is absolute
|
||||
String dir = StaticProperty.userDir();
|
||||
WindowsPathParser.Result result = WindowsPathParser.parse(dir);
|
||||
|
||||
if ((result.type() != WindowsPathType.ABSOLUTE) &&
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2008, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2008, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -33,7 +33,6 @@ import java.net.URI;
|
|||
import java.util.concurrent.ExecutorService;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
import jdk.internal.util.StaticProperty;
|
||||
import sun.nio.ch.ThreadPool;
|
||||
import sun.security.util.SecurityConstants;
|
||||
|
||||
|
@ -49,7 +48,7 @@ class WindowsFileSystemProvider
|
|||
private final WindowsFileSystem theFileSystem;
|
||||
|
||||
public WindowsFileSystemProvider() {
|
||||
theFileSystem = new WindowsFileSystem(this, StaticProperty.userDir());
|
||||
theFileSystem = new WindowsFileSystem(this);
|
||||
}
|
||||
|
||||
WindowsFileSystem theFileSystem() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue