-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Iterable<Tag>
vs Iterable<? extends Tag>
#2092
Comments
@Stephan202 As far as I can tell, this second argument of |
Because of type erasure, this should have no effect on the byte code. Also, since Also, micrometer/micrometer-core/src/main/java/io/micrometer/core/instrument/Tags.java Lines 194 to 196 in 73747e2
|
@jonatan-ivanov Be careful not to confuse source compatibility with binary compatibility. Whether it is binary compatible isn't immediately obvious (to me anyway), would have to test this. We've run afoul of this in the past. For example, changing an interface to an abstract class is source compatible but binary incompatible. |
I noticed that Micrometer methods sometimes accept
Iterable<? extends Tag>
:... but mostly require
Iterable<Tag>
:Two questions:
Tags.concat
also acceptIterable<? extends Tag>
?Tag
is an interface and even has a public subtype provided by Micrometer itself (ImmutableTag
), shouldn't most/all other methods also accept anIterable<? extends Tag>
?(I'm raising this question mostly because it came up while writing a Refaster template. I can understand if the suggested changes aren't worth potentially breaking client code, even though I expect that the suggested changes are mostly safe. If there's interest in this change I'm willing to prepare a PR.)
The text was updated successfully, but these errors were encountered: