You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by sn...@apache.org on 2016/06/29 12:45:36 UTC
[26/38] usergrid git commit: Fix NPE with batch creation of entities.
Fix NPE with batch creation of entities.
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/e982ba4e
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/e982ba4e
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/e982ba4e
Branch: refs/heads/usergrid-1268-akka-211
Commit: e982ba4ed97cf9993cbc21460791207a8f6bb62d
Parents: 5749492
Author: Michael Russo <mr...@apigee.com>
Authored: Thu Jun 23 15:54:55 2016 -0700
Committer: Michael Russo <mr...@apigee.com>
Committed: Thu Jun 23 15:54:55 2016 -0700
----------------------------------------------------------------------
.../org/apache/usergrid/services/AbstractCollectionService.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/e982ba4e/stack/services/src/main/java/org/apache/usergrid/services/AbstractCollectionService.java
----------------------------------------------------------------------
diff --git a/stack/services/src/main/java/org/apache/usergrid/services/AbstractCollectionService.java b/stack/services/src/main/java/org/apache/usergrid/services/AbstractCollectionService.java
index cbea659..7539e0c 100644
--- a/stack/services/src/main/java/org/apache/usergrid/services/AbstractCollectionService.java
+++ b/stack/services/src/main/java/org/apache/usergrid/services/AbstractCollectionService.java
@@ -391,7 +391,7 @@ public class AbstractCollectionService extends AbstractService {
for ( Map<String, Object> p : batch ) {
// track unique name value in the batch to identify if duplicates are trying to be created
- String name = p.get("name").toString();
+ String name = (String) p.get("name");
if( name !=null && nameValues.get(name) !=null ){
logger.warn("Batch contains more than 1 entity with the same name: {}", name);
}else{