Closed
Description
From cus...@google.com on November 12, 2014 15:52:32
The signature of om.google.api.client.util.Data#nullOf(Class) doesn't make sense. The existing signature is:
T nullOf(Class<?> objClass);
If the return type's class should always be the same as objClass, the signature should be:
T nullOf(Class objClass);
If that isn't true, the signature should be:
Object nullOf(Class objClass);
In the second case, callers can perform explicit casts as necessary. The current behaviour results in an implicit unchecked cast at the callsite.
The existing signature also interacts badly with the improved target-type inference in Java 8.
Original issue: http://code.google.com/p/google-http-java-client/issues/detail?id=273