You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by GitBox <gi...@apache.org> on 2022/04/27 01:48:51 UTC

[GitHub] [geode] jinmeiliao opened a new pull request, #7627: GEODE-10260: refactor out Filter interface to use Predicate

jinmeiliao opened a new pull request, #7627:
URL: https://github.com/apache/geode/pull/7627

   Just a simple refactor to use an existing java interface


-- 
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: notifications-unsubscribe@geode.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [geode] jinmeiliao commented on a diff in pull request #7627: GEODE-10260: refactor out Filter interface to use Predicate

Posted by GitBox <gi...@apache.org>.
jinmeiliao commented on code in PR #7627:
URL: https://github.com/apache/geode/pull/7627#discussion_r860264889


##########
geode-core/src/main/java/org/apache/geode/management/internal/JmxManagerAdvisor.java:
##########
@@ -102,13 +103,13 @@ protected Profile instantiateProfile(InternalDistributedMember memberId, int ver
    * Overridden to also include our profile. If our profile is included it will always be first.
    */
   @Override
-  protected List/* <Profile> */ fetchProfiles(Filter f) {
+  protected List/* <Profile> */ fetchProfiles(Predicate<Profile> f) {

Review Comment:
   Tried this, more involved than expected.



-- 
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: notifications-unsubscribe@geode.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [geode] DonalEvans commented on a diff in pull request #7627: GEODE-10260: refactor out Filter interface to use Predicate

Posted by GitBox <gi...@apache.org>.
DonalEvans commented on code in PR #7627:
URL: https://github.com/apache/geode/pull/7627#discussion_r860245573


##########
geode-core/src/main/java/org/apache/geode/distributed/internal/DistributionAdvisor.java:
##########
@@ -1396,12 +1397,6 @@ boolean visit(DistributionAdvisor advisor, Profile profile, int profileIndex, in
         T aggregate);
   }
 
-  @FunctionalInterface
-  protected interface Filter {

Review Comment:
   Removing this class has broken the javadoc on line 1376



##########
geode-core/src/main/java/org/apache/geode/distributed/internal/DistributionAdvisor.java:
##########
@@ -1179,12 +1180,12 @@ protected void profileRemoved(Profile profile) {
   /**
    * All advise methods go through this method

Review Comment:
   Since you're cleaning up code here, this comment does not follow Javadoc syntax requirements (no `@return` or `@param` tags) so either those should be added, or the comment changed to just be a regular comment rather than a javadoc.



##########
geode-core/src/main/java/org/apache/geode/distributed/internal/DistributionAdvisor.java:
##########
@@ -1179,12 +1180,12 @@ protected void profileRemoved(Profile profile) {
   /**
    * All advise methods go through this method
    */
-  protected Set<InternalDistributedMember> adviseFilter(Filter f) {
+  protected Set<InternalDistributedMember> adviseFilter(Predicate<Profile> f) {

Review Comment:
   This change has broken the javadoc on line 1219



-- 
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: notifications-unsubscribe@geode.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [geode] jinmeiliao merged pull request #7627: GEODE-10260: refactor out Filter interface to use Predicate

Posted by GitBox <gi...@apache.org>.
jinmeiliao merged PR #7627:
URL: https://github.com/apache/geode/pull/7627


-- 
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: notifications-unsubscribe@geode.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [geode] pivotal-jbarrett commented on a diff in pull request #7627: GEODE-10260: refactor out Filter interface to use Predicate

Posted by GitBox <gi...@apache.org>.
pivotal-jbarrett commented on code in PR #7627:
URL: https://github.com/apache/geode/pull/7627#discussion_r859354621


##########
geode-core/src/main/java/org/apache/geode/management/internal/JmxManagerAdvisor.java:
##########
@@ -102,13 +103,13 @@ protected Profile instantiateProfile(InternalDistributedMember memberId, int ver
    * Overridden to also include our profile. If our profile is included it will always be first.
    */
   @Override
-  protected List/* <Profile> */ fetchProfiles(Filter f) {
+  protected List/* <Profile> */ fetchProfiles(Predicate<Profile> f) {

Review Comment:
   Can we fix this raw type here?



-- 
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: notifications-unsubscribe@geode.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org