pivotal-jbarrett commented on code in PR #7262:
URL: https://github.com/apache/geode/pull/7262#discussion_r881053181


##########
geode-core/src/main/java/org/apache/geode/cache/client/internal/ClientMetadataService.java:
##########
@@ -98,11 +96,13 @@ public ClientMetadataService(Cache cache) {
   private final Map<String, Set<ClientPartitionAdvisor>> colocatedPRAdvisors =
       new ConcurrentHashMap<>();
 
-  private PartitionResolver getResolver(Region r, Object key, Object 
callbackArgument) {
+  @SuppressWarnings("unchecked")

Review Comment:
   In this particular case this method is taking raw values and converting them 
to the generic typed version requested. Like many other methods that have to do 
this we need to suppress that unchecked conversion. It is a necessary evil of 
Java's broken generics system. 
   
   In general this annotation should be reserved for places where it is 
absolutely required by the language. In some cases it is used where refactoring 
the callee would introduce a breaking API change or balloon the cleanup too far 
out of scope. To get any progress we must be ok with the dirty edges along the 
way to cleaner code.



-- 
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]

Reply via email to