opwvhk commented on code in PR #1624:
URL: https://github.com/apache/avro/pull/1624#discussion_r927597528
##########
lang/java/avro/src/main/java/org/apache/avro/generic/GenericData.java:
##########
@@ -184,11 +195,11 @@ public <T> Conversion<T> getConversionByClass(Class<T>
datumClass, LogicalType l
* @return the conversion for the logical type, or null
*/
@SuppressWarnings("unchecked")
- public Conversion<Object> getConversionFor(LogicalType logicalType) {
Review Comment:
Yes, they are:
1. The type erasure of a type variable is the erasure of its leftmost bound
(https://docs.oracle.com/javase/specs/jls/se11/html/jls-4.html#jls-4.6)
2. Because T has no bounds in the syntax, it's bound is `Object`
(https://docs.oracle.com/javase/specs/jls/se11/html/jls-4.html#jls-4.4)
So as far as binary compatibility is concerned, `<T> Conversion<T>` is the
same as `Conversion<Object>`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]