File tree 5 files changed +7
-8
lines changed
main/java/org/elasticsearch/action/support
test/java/org/elasticsearch/action
5 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -223,7 +223,7 @@ public EnumSet<WildcardStates> getExpandWildcards() {
223
223
224
224
public void writeIndicesOptions (StreamOutput out ) throws IOException {
225
225
out .writeEnumSet (options );
226
- if (out .getVersion ().before (Version .V_8_0_0 ) && expandWildcards .contains (WildcardStates .HIDDEN )) {
226
+ if (out .getVersion ().before (Version .V_7_7_0 ) && expandWildcards .contains (WildcardStates .HIDDEN )) {
227
227
final EnumSet <WildcardStates > states = EnumSet .copyOf (expandWildcards );
228
228
states .remove (WildcardStates .HIDDEN );
229
229
out .writeEnumSet (states );
@@ -235,7 +235,7 @@ public void writeIndicesOptions(StreamOutput out) throws IOException {
235
235
public static IndicesOptions readIndicesOptions (StreamInput in ) throws IOException {
236
236
EnumSet <Option > options = in .readEnumSet (Option .class );
237
237
EnumSet <WildcardStates > states = in .readEnumSet (WildcardStates .class );
238
- if (in .getVersion ().before (Version .V_8_0_0 )) {
238
+ if (in .getVersion ().before (Version .V_7_7_0 )) {
239
239
states .add (WildcardStates .HIDDEN );
240
240
}
241
241
return new IndicesOptions (options , states );
Original file line number Diff line number Diff line change @@ -53,8 +53,7 @@ public void testOriginalIndicesSerialization() throws IOException {
53
53
// indices options are not equivalent when sent to an older version and re-read due
54
54
// to the addition of hidden indices as expand to hidden indices is always true when
55
55
// read from a prior version
56
- // TODO update version on backport!
57
- if (out .getVersion ().onOrAfter (Version .V_8_0_0 ) || originalIndices .indicesOptions ().expandWildcardsHidden ()) {
56
+ if (out .getVersion ().onOrAfter (Version .V_7_7_0 ) || originalIndices .indicesOptions ().expandWildcardsHidden ()) {
58
57
assertThat (originalIndices2 .indicesOptions (), equalTo (originalIndices .indicesOptions ()));
59
58
} else if (originalIndices .indicesOptions ().expandWildcardsHidden ()) {
60
59
assertThat (originalIndices2 .indicesOptions (), equalTo (originalIndices .indicesOptions ()));
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ public void testSerialization() throws Exception {
65
65
// indices options are not equivalent when sent to an older version and re-read due
66
66
// to the addition of hidden indices as expand to hidden indices is always true when
67
67
// read from a prior version
68
- if (version .onOrAfter (Version .V_8_0_0 ) || request .indicesOptions ().expandWildcardsHidden ()) { // TODO change on backport!
68
+ if (version .onOrAfter (Version .V_7_7_0 ) || request .indicesOptions ().expandWildcardsHidden ()) {
69
69
assertEquals (request .indicesOptions (), deserialized .indicesOptions ());
70
70
}
71
71
assertEquals (request .routing (), deserialized .routing ());
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ public void testBwcSerialization() throws Exception {
66
66
// to the addition of hidden indices as expand to hidden indices is always true when
67
67
// read from a prior version
68
68
// TODO update version on backport!
69
- if (out .getVersion ().onOrAfter (Version .V_8_0_0 ) || request .indicesOptions ().expandWildcardsHidden ()) {
69
+ if (out .getVersion ().onOrAfter (Version .V_7_7_0 ) || request .indicesOptions ().expandWildcardsHidden ()) {
70
70
assertEquals (request .indicesOptions (), indicesOptions );
71
71
}
72
72
if (in .getVersion ().onOrAfter (Version .V_7_2_0 )) {
@@ -104,7 +104,7 @@ public void testBwcSerialization() throws Exception {
104
104
// to the addition of hidden indices as expand to hidden indices is always true when
105
105
// read from a prior version
106
106
// TODO change version on backport
107
- if (out .getVersion ().onOrAfter (Version .V_8_0_0 ) || sample .indicesOptions ().expandWildcardsHidden ()) {
107
+ if (out .getVersion ().onOrAfter (Version .V_7_7_0 ) || sample .indicesOptions ().expandWildcardsHidden ()) {
108
108
assertEquals (sample .indicesOptions (), deserializedRequest .indicesOptions ());
109
109
}
110
110
if (out .getVersion ().onOrAfter (Version .V_7_2_0 )) {
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ public void testSerialization() throws Exception {
70
70
assertThat (indicesOptions2 .allowNoIndices (), equalTo (indicesOptions .allowNoIndices ()));
71
71
assertThat (indicesOptions2 .expandWildcardsOpen (), equalTo (indicesOptions .expandWildcardsOpen ()));
72
72
assertThat (indicesOptions2 .expandWildcardsClosed (), equalTo (indicesOptions .expandWildcardsClosed ()));
73
- if (version .before (Version .V_8_0_0 )) {
73
+ if (version .before (Version .V_7_7_0 )) {
74
74
assertThat (indicesOptions2 .expandWildcardsHidden (), is (true ));
75
75
} else {
76
76
assertThat (indicesOptions2 .expandWildcardsHidden (), equalTo (indicesOptions .expandWildcardsHidden ()));
You can’t perform that action at this time.
0 commit comments