Copilot commented on code in PR #775:
URL: https://github.com/apache/commons-vfs/pull/775#discussion_r3695544998
##########
commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/DefaultFileReplicator.java:
##########
@@ -125,7 +126,7 @@ public void close() {
* @throws FileSystemException if a file system error occurs.
*/
protected File createAndAddFile(final File parent, final String baseName)
throws FileSystemException {
- final File file = createFile(tempDir, baseName);
+ final File file = createFile(getTempDir(), baseName);
Review Comment:
`createAndAddFile(File parent, …)` currently ignores the `parent` parameter
and always uses `getTempDir()`, which breaks the method’s protected API
contract and makes the `parent` parameter (and its Javadoc) misleading. Since
`allocateFile()` already chooses the directory to pass in, `createAndAddFile()`
should honor `parent` and use it when creating the file.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]