remove 1.7 version check

This commit is contained in:
Shay Banon 2015-06-18 09:34:39 +02:00
parent 68aacb7078
commit cc97a4159e
1 changed files with 7 additions and 11 deletions

View File

@ -242,10 +242,8 @@ public class ImmutableShardRouting implements Streamable, Serializable, ShardRou
state = ShardRoutingState.fromValue(in.readByte()); state = ShardRoutingState.fromValue(in.readByte());
restoreSource = RestoreSource.readOptionalRestoreSource(in); restoreSource = RestoreSource.readOptionalRestoreSource(in);
if (in.getVersion().onOrAfter(Version.V_1_7_0)) { if (in.readBoolean()) {
if (in.readBoolean()) { unassignedInfo = new UnassignedInfo(in);
unassignedInfo = new UnassignedInfo(in);
}
} }
} }
@ -286,13 +284,11 @@ public class ImmutableShardRouting implements Streamable, Serializable, ShardRou
} else { } else {
out.writeBoolean(false); out.writeBoolean(false);
} }
if (out.getVersion().onOrAfter(Version.V_1_7_0)) { if (unassignedInfo != null) {
if (unassignedInfo != null) { out.writeBoolean(true);
out.writeBoolean(true); unassignedInfo.writeTo(out);
unassignedInfo.writeTo(out); } else {
} else { out.writeBoolean(false);
out.writeBoolean(false);
}
} }
} }