RFR: 8376052: Use AttachOperationFailedException rather than AttachNotSupportedException in findTargetProcessTmpDirectory()

Yasumasa Suenaga ysuenaga at openjdk.org
Thu Jan 22 02:58:59 UTC 2026


[JDK-8373867](https://bugs.openjdk.org/browse/JDK-8373867) improves the logic to find tmp directory for using in attaching procedure. It might throw `IOException` or `AttachNotSupportedException` when it failed.

In review thread #28867, we reached conclusion we should use `AttachOperationFailedException` rather than `AttachNotSupportedException` because `AttachNotSupportedException` would be thrown when a compatible AttachProvider does not exist.

-------------

Commit messages:
 - Remove AttachNotSupportedException constructor with the cause
 - Use AttachOperationFailedException instead of AttachNotSupportedException in findTargetProcessTmpDirectory
 - IOE when attaching shouldn't be wrapped with AttachNotSupportedException

Changes: https://git.openjdk.org/jdk/pull/29355/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29355&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8376052
  Stats: 41 lines in 3 files changed: 17 ins; 16 del; 8 mod
  Patch: https://git.openjdk.org/jdk/pull/29355.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/29355/head:pull/29355

PR: https://git.openjdk.org/jdk/pull/29355


More information about the serviceability-dev mailing list