-
-
Notifications
You must be signed in to change notification settings - Fork 15.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ChannelPromiseAggregator methods now have warnings #3147
Comments
@ysammy and @normanmaurer FYI. Any thoughts? |
You can fix this in JDK7+ with @SafeVarargs on the method declaration for PromiseAggregator#add. I believe JDK6 and lower will ignore this. @normanmaurer, can you comment on whether this would be acceptable style for Netty? |
normanmaurer
pushed a commit
that referenced
this issue
Dec 1, 2014
…3147 Motivation: 8fbc513 introduced stray warnings in callsites of PromiseAggregator#add and PromiseNotifier#(...). Modifications: This commit adds the @SafeVarargs annotation to PromiseAggregator#add and PromiseNotifier#(...). As Netty is built with JDK7, this is a recognized annotation and should not affect runtime VM versions 1.5 and 1.6. Result: Building Netty with JDK7 will no longer produce warnings in the callsites mentioned above.
normanmaurer
pushed a commit
that referenced
this issue
Dec 1, 2014
…3147 Motivation: 8fbc513 introduced stray warnings in callsites of PromiseAggregator#add and PromiseNotifier#(...). Modifications: This commit adds the @SafeVarargs annotation to PromiseAggregator#add and PromiseNotifier#(...). As Netty is built with JDK7, this is a recognized annotation and should not affect runtime VM versions 1.5 and 1.6. Result: Building Netty with JDK7 will no longer produce warnings in the callsites mentioned above.
normanmaurer
pushed a commit
that referenced
this issue
Dec 1, 2014
…3147 Motivation: 8fbc513 introduced stray warnings in callsites of PromiseAggregator#add and PromiseNotifier#(...). Modifications: This commit adds the @SafeVarargs annotation to PromiseAggregator#add and PromiseNotifier#(...). As Netty is built with JDK7, this is a recognized annotation and should not affect runtime VM versions 1.5 and 1.6. Result: Building Netty with JDK7 will no longer produce warnings in the callsites mentioned above.
This was fixed by @3191 |
pulllock
pushed a commit
to pulllock/netty
that referenced
this issue
Oct 19, 2023
…etty#3147 Motivation: 8fbc513 introduced stray warnings in callsites of PromiseAggregator#add and PromiseNotifier#(...). Modifications: This commit adds the @SafeVarargs annotation to PromiseAggregator#add and PromiseNotifier#(...). As Netty is built with JDK7, this is a recognized annotation and should not affect runtime VM versions 1.5 and 1.6. Result: Building Netty with JDK7 will no longer produce warnings in the callsites mentioned above.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It seems like the generic base classes introduced by 8fbc513 now results in warnings at the call sites of some of the generic methods.
An example of a warning is here and the warning is
Type safety: A generic array of Promise<Void> is created for a varargs parameter
.How should we be handling this (I'm assuming this applies to more methods and is impacting more calls sites)? Is there a better way to handle this rather than adding a
@suppreswarning
statement? Can this issue serve as the followup task for the related cleanup?The text was updated successfully, but these errors were encountered: