gora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lewi...@apache.org
Subject [5/7] gora git commit: Potential bugs are resolved.
Date Sat, 05 Sep 2015 14:47:09 GMT
Potential bugs are resolved.


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

Branch: refs/heads/master
Commit: 7cf4ec1d5f0ec50bb205d7fd786cfa9062aa9d8f
Parents: 1507a59
Author: Furkan KAMACI <furkankamaci@gmail.com>
Authored: Fri Sep 4 16:53:29 2015 +0300
Committer: Furkan KAMACI <furkankamaci@gmail.com>
Committed: Fri Sep 4 16:53:29 2015 +0300

----------------------------------------------------------------------
 .../org/apache/gora/cassandra/query/CassandraSuperColumn.java   | 5 +++--
 .../apache/gora/cassandra/store/CassandraMappingManager.java    | 1 +
 .../org/apache/gora/mongodb/store/MongoStoreParameters.java     | 2 +-
 3 files changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/gora/blob/7cf4ec1d/gora-cassandra/src/main/java/org/apache/gora/cassandra/query/CassandraSuperColumn.java
----------------------------------------------------------------------
diff --git a/gora-cassandra/src/main/java/org/apache/gora/cassandra/query/CassandraSuperColumn.java
b/gora-cassandra/src/main/java/org/apache/gora/cassandra/query/CassandraSuperColumn.java
index 5096c5c..b529316 100644
--- a/gora-cassandra/src/main/java/org/apache/gora/cassandra/query/CassandraSuperColumn.java
+++ b/gora-cassandra/src/main/java/org/apache/gora/cassandra/query/CassandraSuperColumn.java
@@ -114,12 +114,13 @@ public class CassandraSuperColumn extends CassandraColumn {
 
           for (HColumn<ByteBuffer, ByteBuffer> hColumn : this.hSuperColumn.getColumns())
{
             String memberName = StringSerializer.get().fromByteBuffer(hColumn.getName());
-            if (memberName.indexOf(CassandraStore.UNION_COL_SUFIX) < 0) {
-              
+
             if (memberName == null || memberName.length() == 0) {
               LOG.warn("member name is null or empty.");
               continue;
             }
+
+            if (!memberName.contains(CassandraStore.UNION_COL_SUFIX)) {
             Field memberField = fieldSchema.getField(memberName);
             Schema memberSchema = memberField.schema();
             Type memberType = memberSchema.getType();

http://git-wip-us.apache.org/repos/asf/gora/blob/7cf4ec1d/gora-cassandra/src/main/java/org/apache/gora/cassandra/store/CassandraMappingManager.java
----------------------------------------------------------------------
diff --git a/gora-cassandra/src/main/java/org/apache/gora/cassandra/store/CassandraMappingManager.java
b/gora-cassandra/src/main/java/org/apache/gora/cassandra/store/CassandraMappingManager.java
index 536c8ce..1e55178 100644
--- a/gora-cassandra/src/main/java/org/apache/gora/cassandra/store/CassandraMappingManager.java
+++ b/gora-cassandra/src/main/java/org/apache/gora/cassandra/store/CassandraMappingManager.java
@@ -106,6 +106,7 @@ public class CassandraMappingManager {
     Document document = saxBuilder.build(inputStream);
     if (document == null) {
       LOG.warn("Mapping file '" + MAPPING_FILE + "' could not be found!");
+      throw new IOException("Mapping file '" + MAPPING_FILE + "' could not be found!");
     }
     Element root = document.getRootElement();
     // find cassandra keyspace element

http://git-wip-us.apache.org/repos/asf/gora/blob/7cf4ec1d/gora-mongodb/src/main/java/org/apache/gora/mongodb/store/MongoStoreParameters.java
----------------------------------------------------------------------
diff --git a/gora-mongodb/src/main/java/org/apache/gora/mongodb/store/MongoStoreParameters.java
b/gora-mongodb/src/main/java/org/apache/gora/mongodb/store/MongoStoreParameters.java
index 2288156..890e6d3 100644
--- a/gora-mongodb/src/main/java/org/apache/gora/mongodb/store/MongoStoreParameters.java
+++ b/gora-mongodb/src/main/java/org/apache/gora/mongodb/store/MongoStoreParameters.java
@@ -73,7 +73,7 @@ public class MongoStoreParameters {
   /**
    * Property to select the database
    */
-  public static String PROP_MONGO_DB = "gora.mongodb.db";
+  public static final String PROP_MONGO_DB = "gora.mongodb.db";
 
   private final String mappingFile;
   private final String servers;


Mime
View raw message