RFR: 8274075: Fix miscellaneous typos in java.base [v2]

David Holmes dholmes at openjdk.java.net
Tue Sep 21 22:03:57 UTC 2021


On Tue, 21 Sep 2021 17:52:31 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

>> We can either revert this part of the change or rephrase it. Mind you, rephrasing might prove tricky because of non-local changes it might introduce. There's one more occurrence of "wrapped exception" in this file: https://github.com/openjdk/jdk/blob/19b6f49649a317e6b255aeb810c8d533119b93bb/src/java.base/share/classes/java/lang/Throwable.java#L548-L554
>
> Instead of "common case where a wrapped exception is thrown from same method" could one write "common case where an enclosing exception is thrown from the same method"?

Note that we don't throw the "wrapped exception" we throw the exception that wraps it. The "wrapped exception" is the original cause. The wording as presented now is correct in that regard. You could also say "Throwing a wrapper exception (i.e. one that has a cause)" - I think both are grammatically correct.

The later text "where a wrapped exception is thrown from the same method" is again incorrect because the wrapped exception (the cause) is not what gets thrown. But I find that whole sentence rather jarring anyway - I'm not certain exactly what it means.

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

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


More information about the core-libs-dev mailing list