Skip to content

Commit

Permalink
Disable handling of annotations with different retention at the same …
Browse files Browse the repository at this point in the history
…location
  • Loading branch information
cushon committed Nov 11, 2024
1 parent 6285661 commit 4965dd9
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2465,14 +2465,14 @@ private <T extends Type> Type reannotate(T t, BiFunction<T, Void, Type> f) {
// Runtime-visible and -invisible annotations are completed separately, so if the same
// type has annotations from both it will get annotated twice.
TypeMetadata metadata = mapped.getMetadata();
TypeMetadata.Annotations existing =
(TypeMetadata.Annotations) metadata.get(TypeMetadata.Entry.Kind.ANNOTATIONS);
if (existing != null) {
TypeMetadata.Annotations combined = new TypeMetadata.Annotations(
existing.getAnnotations().appendList(attributes));
return mapped.cloneWithMetadata(
metadata.without(TypeMetadata.Entry.Kind.ANNOTATIONS).combine(combined));
}
// TypeMetadata.Annotations existing =
// (TypeMetadata.Annotations) metadata.get(TypeMetadata.Entry.Kind.ANNOTATIONS);
// if (existing != null) {
// TypeMetadata.Annotations combined = new TypeMetadata.Annotations(
// existing.getAnnotations().appendList(attributes));
// return mapped.cloneWithMetadata(
// metadata.without(TypeMetadata.Entry.Kind.ANNOTATIONS).combine(combined));
// }
return mapped.annotatedType(attributes);
}

Expand Down

0 comments on commit 4965dd9

Please sign in to comment.