/** * Parses the primary filter from the given key at the given offset and adds * it to the given entity. */ private static void addPrimaryFilter(TimelineEntity entity, byte[] key, int offset) throws IOException { KeyParser kp = new KeyParser(key, offset); String name = kp.getNextString(); byte[] bytes = kp.getRemainingBytes(); Object value = null; try { value = fstConf.asObject(bytes); entity.addPrimaryFilter(name, value); } catch (Exception ignore) { try { // Fall back to 2.24 parser value = fstConf224.asObject(bytes); entity.addPrimaryFilter(name, value); } catch (Exception e) { LOG.warn("Error while decoding " + name, e); } } }