mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8278356: Improve file creation
Reviewed-by: alanb, rhalade
This commit is contained in:
parent
ee0743801e
commit
395bb5b7f9
4 changed files with 61 additions and 8 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1998, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2022, 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
|
||||
|
@ -141,6 +141,11 @@ class UnixFileSystem extends FileSystem {
|
|||
return (f.getPrefixLength() != 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isInvalid(File f) {
|
||||
return f.getPath().indexOf('\u0000') < 0 ? false : true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String resolve(File f) {
|
||||
if (isAbsolute(f)) return f.getPath();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue