RFR: Improve English grammar in error messages

Richard Startin duke at openjdk.java.net
Thu Dec 2 22:28:29 UTC 2021


On Sat, 27 Nov 2021 15:20:03 GMT, Aarre Laakso <duke at openjdk.java.net> wrote:

> I improved the English grammar in a few error messages

jmh-core/src/main/java/org/openjdk/jmh/generators/core/BenchmarkGenerator.java line 321:

> 319:                 throw new GenerationException("@" + Threads.class.getSimpleName() + " annotation is placed within " +
> 320:                         "the benchmark method with @" + Group.class.getSimpleName() + " annotation. " +
> 321:                         "This has ambiguous behavioral effect and is prohibited. " +

I would change this to "this is prohibited because it is ambiguous."

jmh-core/src/main/java/org/openjdk/jmh/generators/core/StateObjectHandler.java line 536:

> 534:                         "@" + annClass.getSimpleName() + " annotation is placed within " +
> 535:                                 "a class not having @" + State.class.getSimpleName() + " annotation. " +
> 536:                                 "This has no behavioral effect and is prohibited.",

"This is prohibited because it is inert."?

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

PR: https://git.openjdk.java.net/jmh/pull/56


More information about the jmh-dev mailing list