On Thu, 18 Aug 2022 08:52:36 GMT, Thomas Stuefe <stu...@openjdk.org> wrote:
>> I was mainly concerned with Thomas's objection that having both would simply >> be misleading, though now that you say that, maybe this warning combined >> with both could be a good compromise. >> >> @tstuefe thoughts? > > Let's back up a bit. > > I looked again, and think @dholmes-ora was originally right when he wrote > that this coding does not get called on Windows. Not sure why I thought > differently, but I cannot find a single callsite on windows. > > But that is weird, since originally there was an error reported on Windows: > https://bugs.openjdk.org/browse/JDK-8291917 reported a real problem about > windows printing useless error messages. What was the original problem again? > > If we are right and this code is not needed, I'd just scrap this function on > Windows altogether. 8291917 was simply about making error messages more informative on Windows when loading the C Runtime or Java Virtual Machine dlls failed (Right now it just prints an unhelpful "Error: loading: ...") - It consequently depended on this RFE for the functionality. Although it _can_ use the other error reporting utilities the JDK has elsewhere, this one happens to be the most convenient, but a more important reason is that the other utilities provided by the JDK all also use the same flawed logic as this one, if we can decide how to fix this function here and now, we'd be able to extrapolate the solution to those other areas as well with very little fuss, so I think fixing this would be better than simply opting to remove it ------------- PR: https://git.openjdk.org/jdk/pull/9870