Skip to content

Commit

Permalink
Suppress warning
Browse files Browse the repository at this point in the history
  • Loading branch information
szpak committed Aug 6, 2016
1 parent 163dc37 commit fb9df4a
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
*/
class LambdaAwareHandyReturnValues {

public <T> T returnForConsumerLambda(Consumer<T> consumer) {
@SuppressWarnings("unchecked")
<T> T returnForConsumerLambda(Consumer<T> consumer) {
Class<?>[] typeArgs = TypeResolver.resolveRawArguments(Consumer.class, consumer.getClass());
return (T) Primitives.defaultValue(typeArgs[0]);
}
Expand Down

0 comments on commit fb9df4a

Please sign in to comment.