Skip to content

Commit 2c68f65

Browse files
committed
Fix minor typing error
1 parent 7f9939f commit 2c68f65

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/cd/go/contrib/elasticagent/ClusterProfile.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818

1919
import com.google.gson.annotations.Expose;
2020
import com.google.gson.annotations.SerializedName;
21+
import com.google.gson.reflect.TypeToken;
2122

22-
import java.util.HashMap;
2323
import java.util.Objects;
2424

2525
import static cd.go.contrib.elasticagent.utils.Util.GSON;
@@ -100,6 +100,6 @@ public void setClusterProfileProperties(ClusterProfileProperties clusterProfileP
100100
}
101101

102102
public void setClusterProfileProperties(PluginSettings pluginSettings) {
103-
this.clusterProfileProperties = ClusterProfileProperties.fromConfiguration(GSON.fromJson(GSON.toJson(pluginSettings), HashMap.class));
103+
this.clusterProfileProperties = ClusterProfileProperties.fromConfiguration(GSON.fromJson(GSON.toJson(pluginSettings), new TypeToken<>() {}));
104104
}
105105
}

0 commit comments

Comments
 (0)