8290041: ModuleDescriptor.hashCode is inconsistent

Reviewed-by: alanb
This commit is contained in:
Jaikiran Pai 2022-08-16 08:31:36 +00:00
parent d1edda8ff5
commit 4cc6cb9d9d
2 changed files with 120 additions and 6 deletions

View file

@ -2627,7 +2627,7 @@ public class ModuleDescriptor
private static int modsHashCode(Iterable<? extends Enum<?>> enums) {
int h = 0;
for (Enum<?> e : enums) {
h = h * 43 + Objects.hashCode(e.name());
h += e.name().hashCode();
}
return h;
}