mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8302789: (fs) Files.copy should include unsupported copy option in exception message
Reviewed-by: alanb, bpb, lancea
This commit is contained in:
parent
dfce4e1943
commit
1ea5f9f7cd
2 changed files with 6 additions and 6 deletions
|
@ -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.
|
* 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
|
||||||
|
@ -474,7 +474,7 @@ abstract class UnixFileSystem
|
||||||
}
|
}
|
||||||
if (option == null)
|
if (option == null)
|
||||||
throw new NullPointerException();
|
throw new NullPointerException();
|
||||||
throw new UnsupportedOperationException("Unsupported copy option");
|
throw new UnsupportedOperationException("Unsupported copy option: " + option);
|
||||||
}
|
}
|
||||||
return flags;
|
return flags;
|
||||||
}
|
}
|
||||||
|
@ -496,7 +496,7 @@ abstract class UnixFileSystem
|
||||||
}
|
}
|
||||||
if (option == null)
|
if (option == null)
|
||||||
throw new NullPointerException();
|
throw new NullPointerException();
|
||||||
throw new UnsupportedOperationException("Unsupported copy option");
|
throw new UnsupportedOperationException("Unsupported option: " + option);
|
||||||
}
|
}
|
||||||
|
|
||||||
// a move requires that all attributes be copied but only fail if
|
// a move requires that all attributes be copied but only fail if
|
||||||
|
|
|
@ -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.
|
* 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
|
||||||
|
@ -81,7 +81,7 @@ class WindowsFileCopy {
|
||||||
}
|
}
|
||||||
if (option == null)
|
if (option == null)
|
||||||
throw new NullPointerException();
|
throw new NullPointerException();
|
||||||
throw new UnsupportedOperationException("Unsupported copy option");
|
throw new UnsupportedOperationException("Unsupported copy option: " + option);
|
||||||
}
|
}
|
||||||
|
|
||||||
// check permissions. If the source file is a symbolic link then
|
// check permissions. If the source file is a symbolic link then
|
||||||
|
@ -301,7 +301,7 @@ class WindowsFileCopy {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (option == null) throw new NullPointerException();
|
if (option == null) throw new NullPointerException();
|
||||||
throw new UnsupportedOperationException("Unsupported copy option");
|
throw new UnsupportedOperationException("Unsupported option: " + option);
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("removal")
|
@SuppressWarnings("removal")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue