private SchemaRule readSchemaRule(Collection<DynamicRecord> recordsBefore) { assert first(recordsBefore).inUse() : "Asked to deserialize schema records that were not in use."; SchemaRule rule; ByteBuffer deserialized = AbstractDynamicStore.concatData(recordsBefore, new byte[100]); try { rule = SchemaRule.Kind.deserialize(first(recordsBefore).getId(), deserialized); } catch (MalformedSchemaRuleException e) { // TODO This is bad. We should probably just shut down if that happens throw launderedException(e); } return rule; }