FW: RFR: 8211752: JNU_ThrowIOExceptionWithLastErrorAndPath - enhance some IOExceptions with path causing the issue
Roger.Riggs at oracle.com
Tue Oct 9 15:22:58 UTC 2018
I don't think this is worth the complex implementation.
The caller already has access to user.dir property and it is not used by
so I think it should be dropped from the exception text.
In what cases, does canonicalize0 use the native CWD?
The native CWD should not be needed, the caller should have filled in
user.dir where needed.
The second native call to get the native cwd doesn't pull its weight.
Without the need for user.dir, the exception message can be created
entirely in native
without needing the upcall.
The pathname is already known to the caller and the caller can modify or
replace the exception.
There should be a solution that does not require an upcall, and moves
any extra work to the caller
Please take a second look at the implementation, Roger
On 10/09/2018 08:12 AM, Baesken, Matthias wrote:
> Hello, Alan commented on it :
> * This proposal will require a security review as it leaks sensitive information into exceptions.
> So I forward it to security-dev as well.
> If needed, we might use something similar to JDK-8207768 where a category has been added for enhanced exception messages to the
> java.security file .
> Best regards, Matthias
> From: Baesken, Matthias
> Sent: Dienstag, 9. Oktober 2018 13:40
> To: core-libs-dev at openjdk.java.net
> Cc: Langer, Christoph <christoph.langer at sap.com>; Lindenmaier, Goetz <goetz.lindenmaier at sap.com>
> Subject: RFR: 8211752: JNU_ThrowIOExceptionWithLastErrorAndPath - enhance some IOExceptions with path causing the issue
> Hello, please review the following change .
> It enhances a number of JNU_ThrowIOExceptionWithLastError calls with path and current working directory information.
> For this, a new function JNU_ThrowIOExceptionWithLastErrorAndPath is added.
> bug and webrev :
> Thanks, Matthias
More information about the core-libs-dev