Skip to content

Commit

Permalink
refactor: Suppress unfixable warning in CRDGenerator
Browse files Browse the repository at this point in the history
  • Loading branch information
Donnerbart committed Aug 16, 2023
1 parent 83eb6cc commit 0b335ad
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,10 @@ Map<String, AbstractCustomResourceHandler> getHandlers() {
return handlers;
}

public CRDGenerator customResourceClasses(Class<? extends CustomResource<?, ?>>... crClasses) {
// this is public API, so we cannot change the signature, so there is no way to prevent the possible heap pollution
// (we also cannot use @SafeVarargs, because that requires the method to be final, which is another signature change)
@SuppressWarnings("unchecked")
public final CRDGenerator customResourceClasses(Class<? extends CustomResource<?, ?>>... crClasses) {
return customResources(Stream.of(crClasses).map(CustomResourceInfo::fromClass).toArray(CustomResourceInfo[]::new));
}

Expand Down

0 comments on commit 0b335ad

Please sign in to comment.