Created
April 22, 2016 10:38
-
-
Save paulhoadley/14c333a85f1a5a19b0ca45c67f9784e9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git diff Sources/net/logicsquad/wipe/model/Invitation.java | |
diff --git a/Sources/net/logicsquad/wipe/model/Invitation.java b/Sources/net/logicsquad/wipe/model/Invitation.java | |
index 92e6484..b1b503c 100644 | |
--- a/Sources/net/logicsquad/wipe/model/Invitation.java | |
+++ b/Sources/net/logicsquad/wipe/model/Invitation.java | |
@@ -243,12 +243,9 @@ public class Invitation extends _Invitation { | |
NSArray<Invitation> result = Invitation.fetchInvitations( | |
editingContext(), Invitation.EMAIL.likeInsensitive(email()), | |
null); | |
- for (Invitation i : result) { | |
- if (!ERXEOControlUtilities.eoEquals(this, i) && i.isRedeemable()) { | |
- return true; | |
- } | |
- } | |
- return false; | |
+ return result.stream().anyMatch( | |
+ (i) -> !ERXEOControlUtilities.eoEquals(this, i) | |
+ && i.isRedeemable()); | |
} | |
/** |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment