Skip to content

Commit 7545f02

Browse files
committed
#67 - Remove target arg from AnnotationDescriptor#ceateUsage forms
1 parent 9a79cdf commit 7545f02

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

src/main/java/org/hibernate/models/spi/AnnotationDescriptor.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,22 +93,19 @@ default <V> AttributeDescriptor<V> getAttribute(String name) {
9393
/**
9494
* Create a usage of this annotation with all attribute values defaulted.
9595
*
96-
* @param target The target of the annotation being created. May generally be {@code null}.
9796
* @param context Access to needed services
9897
*/
99-
default MutableAnnotationUsage<A> createUsage(AnnotationTarget target, SourceModelBuildingContext context) {
100-
return createUsage( target, null, context );
98+
default MutableAnnotationUsage<A> createUsage(SourceModelBuildingContext context) {
99+
return createUsage( null, context );
101100
}
102101

103102
/**
104103
* Create a usage of this annotation with all attribute values defaulted, allowing customization prior to return.
105104
*
106-
* @param target The target of the annotation being created. May generally be {@code null}.
107105
* @param adjuster Callback to allow adjusting the created usage prior to return.
108106
* @param context Access to needed services
109107
*/
110108
default MutableAnnotationUsage<A> createUsage(
111-
AnnotationTarget target,
112109
Consumer<MutableAnnotationUsage<A>> adjuster,
113110
SourceModelBuildingContext context) {
114111
// create the "empty" usage

src/main/java/org/hibernate/models/spi/MutableAnnotationTarget.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ default <A extends Annotation> MutableAnnotationUsage<A> applyAnnotationUsage(
5353
return existing;
5454
}
5555

56-
final MutableAnnotationUsage<A> usage = annotationType.createUsage( this, configuration, buildingContext );
56+
final MutableAnnotationUsage<A> usage = annotationType.createUsage( configuration, buildingContext );
5757
addAnnotationUsage( usage );
5858
return usage;
5959
}

0 commit comments

Comments
 (0)