Elffuss BraidHub

kikocis/java-driver public

Don't crash if replicate_on_write is null on a table

JAVA-254 #fixes
Changeset02f35b6b662db22ac05231ec67f0a392caed4be7735788adc9d15f670d5f828f
AuthorSylvain Lebresne <sylvain@datastax.com> · 2014-01-31 11:44 +01:00
CommitterSylvain Lebresne <sylvain@datastax.com> · 2014-01-31 11:44 +01:00
Parents639e297e1846

Browse the files at this changeset

1 file changed

modified driver-core/src/main/java/com/datastax/driver/core/TableMetadata.java +1 −1
@@ -501,7 +501,7 @@
501501 this.comment = row.isNull(COMMENT) ? "" : row.getString(COMMENT);
502502 this.readRepair = row.getDouble(READ_REPAIR);
503503 this.localReadRepair = row.getDouble(LOCAL_READ_REPAIR);
504- this.replicateOnWrite = row.getBool(REPLICATE_ON_WRITE);
504+ this.replicateOnWrite = row.isNull(REPLICATE_ON_WRITE) ? true : row.getBool(REPLICATE_ON_WRITE);
505505 this.gcGrace = row.getInt(GC_GRACE);
506506 this.bfFpChance = row.isNull(BF_FP_CHANCE) ? DEFAULT_BF_FP_CHANCE : row.getDouble(BF_FP_CHANCE);
507507 this.caching = row.getString(CACHING);