diff --git a/gradle/java-module.gradle b/gradle/java-module.gradle index c322a31ca6..7f651fd7ee 100644 --- a/gradle/java-module.gradle +++ b/gradle/java-module.gradle @@ -502,9 +502,6 @@ checkstyle { // exclude generated java sources - by explicitly setting the base source dir tasks.checkstyleMain.source = 'src/main/java' -// because cfg package is a mess mainly from annotation stuff -tasks.checkstyleMain.exclude '**/org/hibernate/cfg/**' -tasks.checkstyleMain.exclude '**/org/hibernate/cfg/*' // define a second checkstyle task for checking non-fatal violations task nonFatalCheckstyle(type:Checkstyle) { diff --git a/hibernate-core/src/main/java/org/hibernate/annotations/MapKeyType.java b/hibernate-core/src/main/java/org/hibernate/annotations/MapKeyType.java index 3f8a2e55d3..13bce5ec11 100644 --- a/hibernate-core/src/main/java/org/hibernate/annotations/MapKeyType.java +++ b/hibernate-core/src/main/java/org/hibernate/annotations/MapKeyType.java @@ -6,13 +6,25 @@ */ package org.hibernate.annotations; +import java.lang.annotation.Inherited; +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + import org.hibernate.usertype.UserType; +import static java.lang.annotation.ElementType.ANNOTATION_TYPE; +import static java.lang.annotation.ElementType.FIELD; +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + /** * Form of {@link Type} for use with map-keys * * @since 6.0 */ +@Target({METHOD, FIELD, ANNOTATION_TYPE}) +@Inherited +@Retention(RUNTIME) public @interface MapKeyType { /** * The custom type implementor class diff --git a/hibernate-core/src/main/java/org/hibernate/boot/CacheRegionDefinition.java b/hibernate-core/src/main/java/org/hibernate/boot/CacheRegionDefinition.java index 88b38982ec..9cad2d20bb 100644 --- a/hibernate-core/src/main/java/org/hibernate/boot/CacheRegionDefinition.java +++ b/hibernate-core/src/main/java/org/hibernate/boot/CacheRegionDefinition.java @@ -7,12 +7,12 @@ package org.hibernate.boot; /** - * Models the definition of caching settings for a particular region. Generally as found in either: