https://bz.apache.org/bugzilla/show_bug.cgi?id=65499
Bug ID: 65499
Summary: [performance] Avoid File.getCanonicalPath
Product: Ant
Version: unspecified
Hardware: PC
Status: NEW
Severity: enhancement
Priority: P2
Component: AntUnit
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
On JDK 11 the result has been cached with in JVM.
Since JDK 12 the result is not cached anymore by default (See
https://bugs.openjdk.java.net/browse/JDK-8207005) and now very slow on windows.
For org.apache.tools.ant.util.FileUtils.areSame()
please use java.nio.file.Files.isSameFile(Path, Path) instead.
note: you may need to call file.exists() before using Files.isSameFile()
however for copying a file with
org.apache.tools.antl.util.ResourceUtils.copyUsingFilChannels()
It may be enough to call file.exists() on the destination.
@see
https://git.eclipse.org/r/c/platform/eclipse.platform.resources/+/180308/10/bundles/org.eclipse.core.filesystem/src/org/eclipse/core/internal/filesystem/local/LocalFile.java
for a similar fix.
--
You are receiving this mail because:
You are the assignee for the bug.