pivotal-jbarrett commented on a change in pull request #7103:
URL: https://github.com/apache/geode/pull/7103#discussion_r766290306



##########
File path: 
geode-core/src/main/java/org/apache/geode/internal/cache/InterestRegistrationEventImpl.java
##########
@@ -73,84 +75,81 @@ public InterestRegistrationEventImpl() {}
    *
    * @param regionName The name of the region to which this interest event 
belongs
    */
-
-  public InterestRegistrationEventImpl(CacheClientProxy clientSession, String 
regionName,
-      Set keysOfInterest, int interestType, boolean isRegister) {
-    this.cache = clientSession.getCache();
+  public InterestRegistrationEventImpl(final @NotNull CacheClientProxy 
clientSession,
+      final @NotNull String regionName, final @NotNull Set<?> keysOfInterest,
+      final @NotNull InterestType interestType, final boolean isRegister) {
+    cache = clientSession.getCache();
     this.clientSession = clientSession;
     this.regionName = regionName;
     this.keysOfInterest = keysOfInterest;
-    this.interestType = interestType;
+    this.interestType = interestType.ordinal();
     this.isRegister = isRegister;
   }
 
-
   @Override
   public ClientSession getClientSession() {
-    return this.clientSession;
+    return clientSession;
   }
 
   @Override
   public String getRegionName() {
-    return this.regionName;
+    return regionName;
   }
 
   @Override
-  public Region getRegion() {
-    return this.cache.getRegion(this.regionName);
+  public Region<?, ?> getRegion() {
+    return cache.getRegion(regionName);
   }
 
   @Override
-  public Set getKeysOfInterest() {
-    return this.keysOfInterest;
+  public Set<?> getKeysOfInterest() {
+    return keysOfInterest;
   }
 
   @Override
   public int getInterestType() {
-    return this.interestType;
+    return interestType;

Review comment:
       Ok, this is the implementation of a public interface that has a method 
that returns the `InterestType` ordinal as `int`. We can't create a new method 
that returns the enum `InterestType` because it is internal. We could create a 
new method that returns the public enum-like 
`org.apache.geode.cache.operations.InterestType` but that felt like a 
ballooning scope.




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