RFR: 8344833: CTW: Make failing on zero classes optional [v3]
Evgeny Nikitin
enikitin at openjdk.org
Wed Nov 27 18:29:18 UTC 2024
On Tue, 26 Nov 2024 17:31:51 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:
> What is default value of `allow_zero_class_count` and where it is set?
It's False, as per [Boolean.getBoolean(...) specification](https://docs.oracle.com/en/java/javase/20/docs/api/java.base/java/lang/Boolean.html#getBoolean(java.lang.String))
> Why you even need this to be controlled and not default behavior? What is benefit of having error vs warning for empty `jar`?
For mass-running of CTW against unchecked/random jars from various jar repositories, like Maven Central. Another solution would be filtering out such jars in advance, but that's a more difficult (read the jar file, check the class' count, etc.) solution.
> Should you check `totalClassCount` too to catch empty `jar`? As I see `classCount` could be 0 if specified `classStart` and `classStop` as the same which could happened regardless number of classes in `jar` file.
I've missed it. You're right, relying on `totalClassCount` seems a better idea. Fixed.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/22320#issuecomment-2504547999
More information about the hotspot-compiler-dev
mailing list