-
Notifications
You must be signed in to change notification settings - Fork 327
Description
Long short is that this line
Line 102 in a6219bd
| try (FileChannel channel = FileChannel.open(tempFile, READ, NOFOLLOW_LINKS)) { |
When run on IBM Z/OS a Second time, causes this:
Caused by: java.lang.UnsupportedOperationException: NOFOLLOW_LINKS not supported at java.base/sun.nio.fs.UnixChannelFactory$Flags.toFlags(UnixChannelFactory.java:100) at java.base/sun.nio.fs.UnixChannelFactory.newFileChannel(UnixChannelFactory.java:126) at java.base/sun.nio.fs.UnixChannelFactory.newFileChannel(UnixChannelFactory.java:156) at java.base/sun.nio.fs.UnixFileSystemProvider.newFileChannel(UnixFileSystemProvider.java:185) at java.base/java.nio.channels.FileChannel.open(FileChannel.java:292) at java.base/java.nio.channels.FileChannel.open(FileChannel.java:345) at co.elastic.apm.agent.common.util.ResourceExtractionUtil.extractResourceToDirectory(ResourceExtractionUtil.java:102) at co.elastic.apm.agent.common.util.ResourceExtractionUtil.extractResourceToTempDirectory(ResourceExtractionUtil.java:58) at co.elastic.apm.attach.ElasticApmAttacher$AgentJarFileHolder.getAgentJarFile(ElasticApmAttacher.java:213) at co.elastic.apm.attach.ElasticApmAttacher$AgentJarFileHolder.<init>(ElasticApmAttacher.java:208) at co.elastic.apm.attach.ElasticApmAttacher$AgentJarFileHolder.<clinit>(ElasticApmAttacher.java:205)
It'd be nice if that could be caught, and resolved. At worst, deleting the file and retrying.
Or at least provide a public method that returns the filename with the added hash, so it can be handled by us...