On Mon, 12 Oct 2020 21:39:05 GMT, Chris Plummer <[email protected]> wrote:

>> Alex Menkov has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   updated log/error messages accordingly Chris' suggestion
>
> I think you got this backward. `expectedResult` indicates whether or not a 
> successful attach was expected. Since we are
> not in the exception handling part of the code here, that means it did 
> succeed, but the else part is handling the case
> where we did not expect it to succeed. Therefore the error message is 
> correct, basically saying the attached succeeded
> but shouldn't have. However, if you look in the exception handling block, 
> that's were the code message is wrong. That's
> that code that is executed when the attach failed. If it was not expected to 
> fail, the code should complain that it was
> NOT able to attach, but instead it complains that it was able to attach.  You 
> might want to change both messages to be
> a bit more clear. Something like "Attached succeeded but was expected to 
> fail" and "Attach failed but was expected to
> succeed".

@plummercj Yes, you are right. Thank you for the catch.
I updated all 4 messages for consistency

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

PR: https://git.openjdk.java.net/jdk/pull/619

Reply via email to