Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix BwC for PluginInfo with semver range support #12273

Merged
merged 1 commit into from
Feb 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions server/src/main/java/org/opensearch/plugins/PluginInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ public PluginInfo(final StreamInput in) throws IOException {
this.name = in.readString();
this.description = in.readString();
this.version = in.readString();
if (in.getVersion().onOrAfter(Version.V_3_0_0)) {
if (in.getVersion().onOrAfter(Version.V_2_13_0)) {
this.opensearchVersionRanges = (List<SemverRange>) in.readGenericValue();
} else {
this.opensearchVersionRanges = List.of(new SemverRange(in.readVersion(), SemverRange.RangeOperator.DEFAULT));
Expand All @@ -216,7 +216,7 @@ public void writeTo(final StreamOutput out) throws IOException {
out.writeString(name);
out.writeString(description);
out.writeString(version);
if (out.getVersion().onOrAfter(Version.V_3_0_0)) {
if (out.getVersion().onOrAfter(Version.V_2_13_0)) {
out.writeGenericValue(opensearchVersionRanges);
} else {
/*
Expand Down
Loading