streams-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sblack...@apache.org
Subject [26/41] git commit: STREAMS-152 | Removed possibility of NPE if forceUseConfig flag is not set
Date Thu, 04 Sep 2014 17:12:14 GMT
STREAMS-152 | Removed possibility of NPE if forceUseConfig flag is not set


Project: http://git-wip-us.apache.org/repos/asf/incubator-streams/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-streams/commit/78a716aa
Tree: http://git-wip-us.apache.org/repos/asf/incubator-streams/tree/78a716aa
Diff: http://git-wip-us.apache.org/repos/asf/incubator-streams/diff/78a716aa

Branch: refs/heads/pp
Commit: 78a716aa0b401aeb82c7f20d0bac05f640662def
Parents: 14f5d08
Author: Robert Douglas <rdouglas@w2odigital.com>
Authored: Thu Aug 21 11:02:44 2014 -0500
Committer: Robert Douglas <rdouglas@w2odigital.com>
Committed: Thu Aug 21 11:02:44 2014 -0500

----------------------------------------------------------------------
 .../apache/streams/elasticsearch/ElasticsearchPersistWriter.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/78a716aa/streams-contrib/streams-persist-elasticsearch/src/main/java/org/apache/streams/elasticsearch/ElasticsearchPersistWriter.java
----------------------------------------------------------------------
diff --git a/streams-contrib/streams-persist-elasticsearch/src/main/java/org/apache/streams/elasticsearch/ElasticsearchPersistWriter.java
b/streams-contrib/streams-persist-elasticsearch/src/main/java/org/apache/streams/elasticsearch/ElasticsearchPersistWriter.java
index 67866cc..4edc60f 100644
--- a/streams-contrib/streams-persist-elasticsearch/src/main/java/org/apache/streams/elasticsearch/ElasticsearchPersistWriter.java
+++ b/streams-contrib/streams-persist-elasticsearch/src/main/java/org/apache/streams/elasticsearch/ElasticsearchPersistWriter.java
@@ -150,10 +150,10 @@ public class ElasticsearchPersistWriter implements StreamsPersistWriter,
DatumSt
                 (String) streamsDatum.getMetadata().get("id"))
                 .or(streamsDatum.getId());
 
-        if(index == null || config.getForceUseConfig()) {
+        if(index == null || (config.getForceUseConfig() != null && config.getForceUseConfig()))
{
             index = config.getIndex();
         }
-        if(type == null || config.getForceUseConfig()) {
+        if(type == null || (config.getForceUseConfig() != null && config.getForceUseConfig()))
{
             type = config.getType();
         }
 


Mime
View raw message