Skip to content

Commit a6f2dd8

Browse files
committed
Suppress 'unchecked' compiler warning
This is necessary here as there is no type-safe API to copy all attributes from one Configuration to another.
1 parent 4e38775 commit a6f2dd8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/gradlex/javamodule/moduleinfo/PublishedMetadata.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ public class PublishedMetadata implements Serializable {
7575
});
7676
}
7777

78+
@SuppressWarnings({"UnstableApiUsage", "unchecked"})
7879
private List<String> componentVariant(Provider<String> versionsProvidingConfiguration, Project project, String usage) {
7980
Configuration versionsSource;
8081
if (versionsProvidingConfiguration.isPresent()) {
@@ -90,7 +91,6 @@ private List<String> componentVariant(Provider<String> versionsProvidingConfigur
9091
singleComponentVariantResolver.shouldResolveConsistentlyWith(versionsSource);
9192
versionsSource.getAttributes().keySet().forEach(a -> {
9293
@SuppressWarnings("rawtypes") Attribute untypedAttributeKey = a;
93-
//noinspection unchecked
9494
singleComponentVariantResolver.getAttributes().attribute(untypedAttributeKey, requireNonNull(versionsSource.getAttributes().getAttribute(a)));
9595
});
9696
singleComponentVariantResolver.getAttributes().attribute(USAGE_ATTRIBUTE, project.getObjects().named(Usage.class, usage));

0 commit comments

Comments
 (0)