gora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From madh...@apache.org
Subject gora git commit: Fix validation for persistentSchema in avro serialization
Date Mon, 25 Sep 2017 14:56:56 GMT
Repository: gora
Updated Branches:
  refs/heads/master 6737f0f1a -> 1d5ce0051


Fix validation for persistentSchema in avro serialization


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

Branch: refs/heads/master
Commit: 1d5ce0051975f0aca46258ba1efe714768589b2d
Parents: 6737f0f
Author: madhawa-gunasekara <madhawag@wso2.com>
Authored: Thu Sep 21 22:34:23 2017 -0500
Committer: madhawa-gunasekara <madhawag@wso2.com>
Committed: Thu Sep 21 22:34:23 2017 -0500

----------------------------------------------------------------------
 .../java/org/apache/gora/cassandra/serializers/AvroSerializer.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/gora/blob/1d5ce005/gora-cassandra/src/main/java/org/apache/gora/cassandra/serializers/AvroSerializer.java
----------------------------------------------------------------------
diff --git a/gora-cassandra/src/main/java/org/apache/gora/cassandra/serializers/AvroSerializer.java
b/gora-cassandra/src/main/java/org/apache/gora/cassandra/serializers/AvroSerializer.java
index 204ae52..0ab21c5 100644
--- a/gora-cassandra/src/main/java/org/apache/gora/cassandra/serializers/AvroSerializer.java
+++ b/gora-cassandra/src/main/java/org/apache/gora/cassandra/serializers/AvroSerializer.java
@@ -64,7 +64,7 @@ class AvroSerializer<K, T extends PersistentBase> extends CassandraSerializer
{
     if (PersistentBase.class.isAssignableFrom(dataStore.getPersistentClass())) {
       persistentSchema = ((PersistentBase) dataStore.getBeanFactory().getCachedPersistent()).getSchema();
     } else {
-      persistentSchema = null;
+      throw new RuntimeException("Unsupported persistent class, couldn't able to find the
Avro schema.");
     }
     this.cassandraDataStore = dataStore;
     try {


Mime
View raw message