Skip to content

Commit

Permalink
address commit
Browse files Browse the repository at this point in the history
Signed-off-by: Frank Lou <mloufra@amazon.com>
  • Loading branch information
mloufra committed Dec 6, 2022
1 parent 3fe9215 commit 4a59215
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ public DiscoveryExtension(
) {
super(name, id, ephemeralId, hostName, hostAddress, address, attributes, DiscoveryNodeRole.BUILT_IN_ROLES, version);
this.pluginInfo = pluginInfo;
this.dependencies = dependencies;
this.dependencies = dependencies;
}

@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);
pluginInfo.writeTo(out);
out.writeVInt(dependencies.size());
for(ExtensionDependency result : dependencies){
for (ExtensionDependency result : dependencies) {
result.writeTo(out);
}
}
Expand All @@ -72,7 +72,7 @@ public DiscoveryExtension(final StreamInput in) throws IOException {
this.pluginInfo = new PluginInfo(in);
int size = in.readVInt();
dependencies = new ArrayList<>(size);
for(int i = 0; i < size; i++){
for (int i = 0; i < size; i++) {
dependencies.add(new ExtensionDependency(in));
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
import org.opensearch.common.io.stream.Writeable;

/**
* The extension dependency information
* The extension dependency information
*
* @opensearch.internal
*/
public class ExtensionDependency implements Writeable {
private String uniqueId;
private String version;

public ExtensionDependency(String uniqueId, String version){
public ExtensionDependency(String uniqueId, String version) {
this.uniqueId = uniqueId;
this.version = version;
}
Expand All @@ -51,7 +51,7 @@ public void writeTo(StreamOutput out) throws IOException {
*
* @return the extension uniqueId
*/
public String getUniqueId(){
public String getUniqueId() {
return uniqueId;
}

Expand All @@ -60,10 +60,10 @@ public String getUniqueId(){
*
* @return the extension version
*/
public String getVersion(){
public String getVersion() {
return version;
}

public String toString() {
return "ExtensionDependency:{uniqueId=" + uniqueId + ", version=" + version + "}";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
Expand Down

0 comments on commit 4a59215

Please sign in to comment.