[hibernate-commits] [hibernate/hibernate-orm] 0069aa: Switching version to 5.5.0-SNAPSHOT

Andrea Boriero noreply at github.com
Thu Apr 16 07:02:24 EDT 2020


  Branch: refs/heads/wip/6.0
  Home:   https://github.com/hibernate/hibernate-orm
  Commit: 0069aa7be9437192e1580fad3f0972f91e62be33
      https://github.com/hibernate/hibernate-orm/commit/0069aa7be9437192e1580fad3f0972f91e62be33
  Author: Sanne Grinovero <sanne at hibernate.org>
  Date:   2020-04-14 (Tue, 14 Apr 2020)

  Changed paths:
    M gradle/base-information.gradle

  Log Message:
  -----------
  Switching version to 5.5.0-SNAPSHOT


  Commit: c906989989ca35e87fad19e0b4154e3cf936428f
      https://github.com/hibernate/hibernate-orm/commit/c906989989ca35e87fad19e0b4154e3cf936428f
  Author: Yoann Rodière <yoann at hibernate.org>
  Date:   2020-04-14 (Tue, 14 Apr 2020)

  Changed paths:
    M documentation/documentation.gradle
    M gradle/published-java-module.gradle

  Log Message:
  -----------
  HHH-13682 Remove unnecessary checks around Java 8 compatibility

The build requires JDK8+, so we're alwways Java 8 compatible.


  Commit: 0cdf4c19e3d2f64b0538639211a1295904930b6e
      https://github.com/hibernate/hibernate-orm/commit/0cdf4c19e3d2f64b0538639211a1295904930b6e
  Author: Yoann Rodière <yoann at hibernate.org>
  Date:   2020-04-14 (Tue, 14 Apr 2020)

  Changed paths:
    M gradle/base-information.gradle
    M gradle/java-module.gradle
    M hibernate-integrationtest-java-modules/hibernate-integrationtest-java-modules.gradle

  Log Message:
  -----------
  HHH-13682 Generate Java 13/14 bytecode for tests when building with JDK13/14


  Commit: 96f7870528cfcfeaf28f090b059f069ad253a485
      https://github.com/hibernate/hibernate-orm/commit/96f7870528cfcfeaf28f090b059f069ad253a485
  Author: Yoann Rodière <yoann at hibernate.org>
  Date:   2020-04-14 (Tue, 14 Apr 2020)

  Changed paths:
    M gradle/java-module.gradle

  Log Message:
  -----------
  HHH-13682 Do not set net.bytebuddy.experimental=true in tests anymore

It's no longer necessary since we upgraded to byte-buddy 1.10.2,
and it causes bytecode to be converted from Java 14 to Java 12 in some
cases (I don't know why).


  Commit: 1060baf74b3d480d026a3d88e9c4b2d4aae118a3
      https://github.com/hibernate/hibernate-orm/commit/1060baf74b3d480d026a3d88e9c4b2d4aae118a3
  Author: Yoann Rodière <yoann at hibernate.org>
  Date:   2020-04-14 (Tue, 14 Apr 2020)

  Changed paths:
    M hibernate-core/src/test/java/org/hibernate/test/bytecode/enhancement/lazy/NaturalIdInUninitializedAssociationTest.java

  Log Message:
  -----------
  HHH-13682 Enable extended bytecode enhancement in NaturalIdInUninitializedAssociationTest

This test accesses a field of an entity directly and expects it to be
automatically initialized; this cannot work without extended bytecode
enhancement.

This used to work with Java 8 bytecode, but only by chance. It seems
that Java 8 bytecode relies on "synthetic", static access methods
inserted by the compiler to access the fields of entities in this test:
any access to the field is done through this access method instead of
through a direct field access. Since we apply bytecode enhancement to
all methods of entities, this means that access to fields triggers
initialization, without any bytecode enhancement in the caller class.

I believe this is specific to nested classes, but couldn't find a
source. For reference, the bytecode of access methods looks like this:

  static int access$002(org.hibernate.test.bytecode.enhancement.lazy.NaturalIdInUninitializedAssociationTest$AnEntity, int);
    Code:
       0: aload_0
       1: iload_1
       2: dup_x1
       3: putfield      #3                  // Field id:I
       6: ireturn

  static org.hibernate.test.bytecode.enhancement.lazy.NaturalIdInUninitializedAssociationTest$EntityImmutableNaturalId access$102(org.hibernate.test.bytecode.enhancement.lazy.NaturalIdInUninitializedAssociationTest$AnEntity, org.hibernate.test.bytecode.enhancement.lazy.NaturalIdInUninitializedAssociationTest$EntityImmutableNaturalId);
    Code:
       0: aload_0
       1: aload_1
       2: dup_x1
       3: putfield      #2                  // Field entityImmutableNaturalId:Lorg/hibernate/test/bytecode/enhancement/lazy/NaturalIdInUninitializedAssociationTest$EntityImmutableNaturalId;
       6: areturn

With Java 11, however, access to fields of entities is done directly,
even for nested classes. So the access methods no longer exist, and we
don't get automatic initialization upon field access. We need extended
bytecode enhancement, like we would in any other case of field access
(in particular accessing fields of non-nested classes).


  Commit: b32ff5cd9c8da14fc2b756ccca2fdc860403b113
      https://github.com/hibernate/hibernate-orm/commit/b32ff5cd9c8da14fc2b756ccca2fdc860403b113
  Author: Yoann Rodière <yoann at hibernate.org>
  Date:   2020-04-14 (Tue, 14 Apr 2020)

  Changed paths:
    M build.gradle
    M gradle/base-information.gradle
    M gradle/java-module.gradle
    M hibernate-integrationtest-java-modules/hibernate-integrationtest-java-modules.gradle
    M settings.gradle

  Log Message:
  -----------
  HHH-13682 Allow forcing the tested Java version in the Gradle build

... just in case we need that for some cutting-edge JDK, for example 15,
that would not be supported by Gradle yet.


  Commit: 5fab58bf767951ff1bebc74c06866237cb01c347
      https://github.com/hibernate/hibernate-orm/commit/5fab58bf767951ff1bebc74c06866237cb01c347
  Author: Yoann Rodière <yoann at hibernate.org>
  Date:   2020-04-14 (Tue, 14 Apr 2020)

  Changed paths:
    M gradle/java-module.gradle

  Log Message:
  -----------
  HHH-13682 Upgrade to forbiddenapis 2.7

So that we can feed it Java 13/14 bytecode


  Commit: 0b4bcce3fa2589f25b28d1393a57fe1e10a5cbce
      https://github.com/hibernate/hibernate-orm/commit/0b4bcce3fa2589f25b28d1393a57fe1e10a5cbce
  Author: Sanne Grinovero <sanne at hibernate.org>
  Date:   2020-04-14 (Tue, 14 Apr 2020)

  Changed paths:
    M documentation/documentation.gradle
    M documentation/src/main/asciidoc/userguide/appendices/Annotations.adoc
    M documentation/src/main/asciidoc/userguide/chapters/bootstrap/Bootstrap.adoc
    M documentation/src/main/asciidoc/userguide/chapters/caching/Caching.adoc
    M documentation/src/main/asciidoc/userguide/chapters/domain/collections.adoc
    M documentation/src/main/asciidoc/userguide/chapters/domain/embeddables.adoc
    M documentation/src/main/asciidoc/userguide/chapters/domain/entity.adoc
    M documentation/src/main/asciidoc/userguide/chapters/domain/identifiers.adoc
    M documentation/src/main/asciidoc/userguide/chapters/events/Events.adoc
    M documentation/src/main/asciidoc/userguide/chapters/fetching/Fetching.adoc
    M documentation/src/main/asciidoc/userguide/chapters/flushing/Flushing.adoc
    M documentation/src/main/asciidoc/userguide/chapters/locking/Locking.adoc
    M documentation/src/main/asciidoc/userguide/chapters/pc/PersistenceContext.adoc
    M documentation/src/main/asciidoc/userguide/chapters/query/hql/HQL.adoc
    M documentation/src/main/asciidoc/userguide/chapters/query/native/Native.adoc
    M documentation/src/main/asciidoc/userguide/chapters/schema/Schema.adoc

  Log Message:
  -----------
  HHH-13947 Switch the JPA Javadoc prefix URL to a build parameter

Applying the following script, and setting the current value as a
documentation parameter:

find . -type f -name '*.java' -o -name '*.adoc'  -o -name '.xml' | xargs sed -i 's/https:\/\/javaee\.github\.io\/javaee-spec\/javadocs\/javax\/persistence\//\{jpaJavadocUrlPrefix\}/g'

Having the script might help re-migrating existing documentation patches,
or forward porting subsequent improvements from previous branches.

The javadocs for JPA 3.0 have not been published yet at this point;
having a parameter will make it easier to leave this single task for
a later point in time.


  Commit: 588115bb0a055573a85a8fa01c50490390870ca2
      https://github.com/hibernate/hibernate-orm/commit/588115bb0a055573a85a8fa01c50490390870ca2
  Author: Yoann Rodière <yoann at hibernate.org>
  Date:   2020-04-16 (Thu, 16 Apr 2020)

  Changed paths:
    M gradle/java-module.gradle

  Log Message:
  -----------
  HHH-13682 Restore the system property net.bytebuddy.experimental=true in tests on JDK15+

Turns out it's necessary for JDKs with experimental support.


  Commit: 2ccf7fab9ed29029f6b071f6c8c3c6f017b5013c
      https://github.com/hibernate/hibernate-orm/commit/2ccf7fab9ed29029f6b071f6c8c3c6f017b5013c
  Author: Andrea Boriero <andrea at hibernate.org>
  Date:   2020-04-16 (Thu, 16 Apr 2020)

  Changed paths:
    M build.gradle
    M documentation/documentation.gradle
    M documentation/src/main/asciidoc/userguide/appendices/Annotations.adoc
    M documentation/src/main/asciidoc/userguide/chapters/bootstrap/Bootstrap.adoc
    M documentation/src/main/asciidoc/userguide/chapters/caching/Caching.adoc
    M documentation/src/main/asciidoc/userguide/chapters/domain/collections.adoc
    M documentation/src/main/asciidoc/userguide/chapters/domain/embeddables.adoc
    M documentation/src/main/asciidoc/userguide/chapters/domain/entity.adoc
    M documentation/src/main/asciidoc/userguide/chapters/domain/identifiers.adoc
    M documentation/src/main/asciidoc/userguide/chapters/events/Events.adoc
    M documentation/src/main/asciidoc/userguide/chapters/fetching/Fetching.adoc
    M documentation/src/main/asciidoc/userguide/chapters/flushing/Flushing.adoc
    M documentation/src/main/asciidoc/userguide/chapters/locking/Locking.adoc
    M documentation/src/main/asciidoc/userguide/chapters/pc/PersistenceContext.adoc
    M documentation/src/main/asciidoc/userguide/chapters/query/hql/HQL.adoc
    M documentation/src/main/asciidoc/userguide/chapters/query/native/Native.adoc
    M documentation/src/main/asciidoc/userguide/chapters/schema/Schema.adoc
    M gradle/java-module.gradle
    M gradle/published-java-module.gradle
    M hibernate-core/src/test/java/org/hibernate/test/bytecode/enhancement/lazy/NaturalIdInUninitializedAssociationTest.java
    M hibernate-integrationtest-java-modules/hibernate-integrationtest-java-modules.gradle
    M settings.gradle

  Log Message:
  -----------
  Merge remote-tracking branch 'upstream/master' into wip/6.0_merge_30


  Commit: 132a4121b5b2bb829221f9a877d559b2ca15b561
      https://github.com/hibernate/hibernate-orm/commit/132a4121b5b2bb829221f9a877d559b2ca15b561
  Author: Andrea Boriero <andrea at hibernate.org>
  Date:   2020-04-16 (Thu, 16 Apr 2020)

  Changed paths:
    M build.gradle
    M gradle/java-module.gradle
    M hibernate-core/src/main/java/org/hibernate/query/spi/QueryEngine.java

  Log Message:
  -----------
  Fix issues after merging master


Compare: https://github.com/hibernate/hibernate-orm/compare/299826b9b7d6...132a4121b5b2



More information about the hibernate-commits mailing list