usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sfeld...@apache.org
Subject usergrid git commit: add new exception for empty sequences
Date Mon, 12 Oct 2015 17:06:50 GMT
Repository: usergrid
Updated Branches:
  refs/heads/2.1-release 5b6508609 -> a2a07aac1


add new exception for empty sequences


Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/a2a07aac
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/a2a07aac
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/a2a07aac

Branch: refs/heads/2.1-release
Commit: a2a07aac1c7f53b5bbaffe0a9bc433d05777cbdf
Parents: 5b65086
Author: Shawn Feldman <sfeldman@apache.org>
Authored: Mon Oct 12 11:05:49 2015 -0600
Committer: Shawn Feldman <sfeldman@apache.org>
Committed: Mon Oct 12 11:05:49 2015 -0600

----------------------------------------------------------------------
 .../corepersistence/asyncevents/AmazonAsyncEventService.java     | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/usergrid/blob/a2a07aac/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AmazonAsyncEventService.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AmazonAsyncEventService.java
b/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AmazonAsyncEventService.java
index 4ee2094..45d83cd 100644
--- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AmazonAsyncEventService.java
+++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AmazonAsyncEventService.java
@@ -302,6 +302,10 @@ public class AmazonAsyncEventService implements AsyncEventService {
                         .collect(() -> new IndexOperationMessage(), (collector, single
) -> collector.ingest(single))
                         .toBlocking().lastOrDefault(null);
 
+                if(indexOperationMessage == null){
+                    throw new IllegalArgumentException("Received null index operation.");
+                }
+
                 //return type that can be indexed and ack'd later
                 return new IndexEventResult(Optional.fromNullable(message), Optional.fromNullable(indexOperationMessage),
thisEvent.getCreationTime());
             } catch (Exception e) {


Mime
View raw message