32
32
33
33
package org .opensearch .action .admin .cluster .settings ;
34
34
35
- import org .opensearch .LegacyESVersion ;
36
35
import org .opensearch .action .support .master .AcknowledgedResponse ;
37
36
import org .opensearch .common .ParseField ;
38
37
import org .opensearch .common .io .stream .StreamInput ;
@@ -70,15 +69,9 @@ public class ClusterUpdateSettingsResponse extends AcknowledgedResponse {
70
69
final Settings persistentSettings ;
71
70
72
71
ClusterUpdateSettingsResponse (StreamInput in ) throws IOException {
73
- super (in , in .getVersion ().onOrAfter (LegacyESVersion .V_6_4_0 ));
74
- if (in .getVersion ().onOrAfter (LegacyESVersion .V_6_4_0 )) {
75
- transientSettings = Settings .readSettingsFromStream (in );
76
- persistentSettings = Settings .readSettingsFromStream (in );
77
- } else {
78
- transientSettings = Settings .readSettingsFromStream (in );
79
- persistentSettings = Settings .readSettingsFromStream (in );
80
- acknowledged = in .readBoolean ();
81
- }
72
+ super (in );
73
+ transientSettings = Settings .readSettingsFromStream (in );
74
+ persistentSettings = Settings .readSettingsFromStream (in );
82
75
}
83
76
84
77
ClusterUpdateSettingsResponse (boolean acknowledged , Settings transientSettings , Settings persistentSettings ) {
@@ -97,15 +90,9 @@ public Settings getPersistentSettings() {
97
90
98
91
@ Override
99
92
public void writeTo (StreamOutput out ) throws IOException {
100
- if (out .getVersion ().onOrAfter (LegacyESVersion .V_6_4_0 )) {
101
- super .writeTo (out );
102
- Settings .writeSettingsToStream (transientSettings , out );
103
- Settings .writeSettingsToStream (persistentSettings , out );
104
- } else {
105
- Settings .writeSettingsToStream (transientSettings , out );
106
- Settings .writeSettingsToStream (persistentSettings , out );
107
- out .writeBoolean (acknowledged );
108
- }
93
+ super .writeTo (out );
94
+ Settings .writeSettingsToStream (transientSettings , out );
95
+ Settings .writeSettingsToStream (persistentSettings , out );
109
96
}
110
97
111
98
@ Override
0 commit comments