Skip to content

Commit

Permalink
clean up compiler warning
Browse files Browse the repository at this point in the history
Signed-off-by: mloufra <mloufra@amazon.com>
  • Loading branch information
mloufra committed Oct 14, 2022
1 parent 401c210 commit 47d7276
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,22 @@
*/
public class RegisterTransportActionsRequest extends TransportRequest {
private String uniqueId;
private Map<String, Class> transportActions;
private Map<String, Class<?>> transportActions;

public RegisterTransportActionsRequest(String uniqueId, Map<String, Class> transportActions) {
public RegisterTransportActionsRequest(String uniqueId, Map<String, Class<?>> transportActions) {
this.uniqueId = uniqueId;
this.transportActions = new HashMap<>(transportActions);
}

public RegisterTransportActionsRequest(StreamInput in) throws IOException {
super(in);
this.uniqueId = in.readString();
Map<String, Class> actions = new HashMap<>();
Map<String, Class<?>> actions = new HashMap<>();
int actionCount = in.readVInt();
for (int i = 0; i < actionCount; i++) {
try {
String actionName = in.readString();
Class transportAction = Class.forName(in.readString());
Class<?> transportAction = Class.forName(in.readString());
actions.put(actionName, transportAction);
} catch (ClassNotFoundException e) {
throw new IllegalArgumentException("Could not read transport action");
Expand All @@ -52,7 +52,7 @@ public String getUniqueId() {
return uniqueId;
}

public Map<String, Class> getTransportActions() {
public Map<String, Class<?>> getTransportActions() {
return transportActions;
}

Expand All @@ -61,7 +61,7 @@ public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);
out.writeString(uniqueId);
out.writeVInt(this.transportActions.size());
for (Map.Entry<String, Class> action : transportActions.entrySet()) {
for (Map.Entry<String, Class<?>> action : transportActions.entrySet()) {
out.writeString(action.getKey());
out.writeString(action.getValue().getName());
}
Expand Down

0 comments on commit 47d7276

Please sign in to comment.