Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8275509

ModuleDescriptor.hashCode isn't reproducible across builds

XMLWordPrintable

        The jdk.tools.jlink.internal.plugins.SystemModulesPlugin dynamically generates bytecode for "jdk.internal.module.SystemModules$all" class. One part of that bytecode generation ends up embedding the hashCode(s) of java.lang.module.ModuleDescriptor instances into the generated class file. These hashCode(s) as per the contract of java.lang.Object#hashCode() aren't guaranteed to stay the same across JVM runs, as a result of which the generated jdk.internal.module.SystemModules$all class' content isn't reproducible across multiple runs (with same set of module inputs).

        One such impacted area is the jlink tool and it shows up in the JLinkReproducibleTest intermittent failures which is tracked in https://bugs.openjdk.java.net/browse/JDK-8258945

              jpai Jaikiran Pai
              jpai Jaikiran Pai
              Votes:
              0 Vote for this issue
              Watchers:
              11 Start watching this issue

                Created:
                Updated:
                Resolved: