RFR: JDK-8264488: Improve warning for module names ending with digits

Alex Buckley alex.buckley at oracle.com
Thu May 25 17:29:27 UTC 2023


On 5/24/2023 9:26 PM, Sebastian Stenzel wrote:
> Quite good. But for the reasons stated above, let's stick to
> "terminal digits":
> 
> `terminal digits in module name {0} look like a version number`
> 
> Being semantically closer to the original warning also has the side
> effect that e.g. existing discussions on Stack Overflow [can easier
> be
> found](https://stackoverflow.com/search?q=terminal+digits+in+module+name)
> if devs look for help when when encountering the updated warning.

So, from old:

   module name component {0} should avoid terminal digits

to new:

   terminal digits in module name {0} look like a version number

The new warning is good, for two reasons:

1. Saying that the terminal digits are _in_ the module name is smart. It 
clarifies that "terminal" means "at the end of the module name" rather 
than being a term of art for the Java language or module system. I can 
accept the use of "digits" much more easily now.

2. It is now clear that the warning is drawing a connection between the 
physical presence of digits and the logical presence of a version 
number. That's a big improvement over the old warning. The fact that the 
connection is _objectionable_ is implied by the warning being given in 
the first place, rather than stern words inside the warning.


Ideally, there would be a sibling warning in compiler.properties for 
when there's only one terminal digit:

   terminal digit in module name {0} looks like a version number

Alex


More information about the compiler-dev mailing list