Skip to content

Commit c18b3ab

Browse files
committed
Remove @UpdateForV9 annotation on code that has been deprecated and removed
1 parent bd52363 commit c18b3ab

File tree

3 files changed

+4
-22
lines changed

3 files changed

+4
-22
lines changed

x-pack/plugin/core/src/main/java/org/elasticsearch/license/License.java

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,6 @@ static boolean isEnterprise(String typeName) {
137137
* to a specific license version
138138
*/
139139
public static final String LICENSE_VERSION_MODE = "license_version";
140-
/**
141-
* Set for RestApiVersion#V_7 requests only
142-
* XContent param name to map the "enterprise" license type to "platinum"
143-
* for backwards compatibility with older clients
144-
*/
145-
@UpdateForV9(owner = UpdateForV9.Owner.SECURITY) // v7 REST API no longer exists: eliminate ref to RestApiVersion.V_7
146-
public static final String XCONTENT_HIDE_ENTERPRISE = "hide_enterprise";
147140

148141
public static final Comparator<License> LATEST_ISSUE_DATE_FIRST = Comparator.comparing(License::issueDate).reversed();
149142

@@ -497,7 +490,6 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws
497490
public XContentBuilder toInnerXContent(XContentBuilder builder, Params params) throws IOException {
498491
boolean licenseSpecMode = params.paramAsBoolean(LICENSE_SPEC_VIEW_MODE, false);
499492
boolean restViewMode = params.paramAsBoolean(REST_VIEW_MODE, false);
500-
boolean hideEnterprise = params.paramAsBoolean(XCONTENT_HIDE_ENTERPRISE, false);
501493

502494
boolean previouslyHumanReadable = builder.humanReadable();
503495
if (licenseSpecMode && restViewMode) {
@@ -517,7 +509,7 @@ public XContentBuilder toInnerXContent(XContentBuilder builder, Params params) t
517509
builder.field(Fields.STATUS, LicenseUtils.status(this).label());
518510
}
519511
builder.field(Fields.UID, uid);
520-
final String bwcType = hideEnterprise && LicenseType.isEnterprise(type) ? LicenseType.PLATINUM.getTypeName() : type;
512+
final String bwcType = LicenseType.isEnterprise(type) ? LicenseType.PLATINUM.getTypeName() : type;
521513
builder.field(Fields.TYPE, bwcType);
522514
if (licenseVersion == VERSION_START) {
523515
builder.field(Fields.SUBSCRIPTION_TYPE, subscriptionType);
@@ -534,7 +526,7 @@ public XContentBuilder toInnerXContent(XContentBuilder builder, Params params) t
534526
if (licenseVersion >= VERSION_ENTERPRISE) {
535527
builder.field(Fields.MAX_NODES, maxNodes == -1 ? null : maxNodes);
536528
builder.field(Fields.MAX_RESOURCE_UNITS, maxResourceUnits == -1 ? null : maxResourceUnits);
537-
} else if (hideEnterprise && maxNodes == -1) {
529+
} else if (maxNodes == -1) {
538530
builder.field(Fields.MAX_NODES, maxResourceUnits);
539531
} else {
540532
builder.field(Fields.MAX_NODES, maxNodes);

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/settings/GetSecuritySettingsAction.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,8 @@ public Request(TimeValue masterNodeTimeout) {
4040
super(masterNodeTimeout);
4141
}
4242

43-
@UpdateForV9(owner = UpdateForV9.Owner.SECURITY) // no need for bwc any more, this can be inlined
4443
public static Request readFrom(StreamInput in) throws IOException {
45-
if (in.getTransportVersion().onOrAfter(TransportVersions.V_8_15_0)) {
46-
return new Request(in);
47-
} else {
48-
return new Request(TimeValue.THIRTY_SECONDS);
49-
}
44+
return new Request(in);
5045
}
5146

5247
private Request(StreamInput in) throws IOException {

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/settings/UpdateSecuritySettingsAction.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,13 +116,8 @@ public Request(
116116
this.profilesIndexSettings = Objects.requireNonNullElse(profilesIndexSettings, Collections.emptyMap());
117117
}
118118

119-
@UpdateForV9(owner = UpdateForV9.Owner.SECURITY) // no need for bwc any more, this can be inlined
120119
public static Request readFrom(StreamInput in) throws IOException {
121-
if (in.getTransportVersion().onOrAfter(TransportVersions.V_8_15_0)) {
122-
return new Request(in);
123-
} else {
124-
return new Request(TimeValue.THIRTY_SECONDS, TimeValue.THIRTY_SECONDS, in);
125-
}
120+
return new Request(in);
126121
}
127122

128123
private Request(StreamInput in) throws IOException {

0 commit comments

Comments
 (0)