cpoerschke commented on a change in pull request #169:
URL: https://github.com/apache/solr/pull/169#discussion_r652001948
##########
File path: solr/solrj/src/java/org/apache/solr/client/solrj/io/Tuple.java
##########
@@ -267,22 +255,21 @@ public void setFieldNames(List<String> fieldNames) {
this.fieldNames = fieldNames;
}
- @SuppressWarnings({"unchecked", "rawtypes"})
- public List<Map> getMaps(Object key) {
- return (List<Map>) this.fields.get(key);
+ @SuppressWarnings({"unchecked"})
+ public List<Map<?,?>> getMaps(String key) {
+ return (List<Map<?,?>>) this.fields.get(key);
}
- public void setMaps(Object key, @SuppressWarnings({"rawtypes"})List<Map>
maps) {
+ public void setMaps(String key, List<Map<?,?>> maps) {
this.fields.put(key, maps);
}
- @SuppressWarnings({"unchecked", "rawtypes"})
- public Map<String, Map> getMetrics() {
- return (Map<String, Map>) this.fields.get(StreamParams.METRICS);
+ @SuppressWarnings({"unchecked"})
+ public Map<String, Map<?,?>> getMetrics() {
+ return (Map<String, Map<?,?>>) this.fields.get(StreamParams.METRICS);
}
- @SuppressWarnings({"rawtypes"})
- public void setMetrics(Map<String, Map> metrics) {
+ public void setMetrics(Map<String, Map<?,?>> metrics) {
Review comment:
The UI won't let me add a comment there but I think (unrelated to the
changes in this pull request) there's some surprises in the `clone` and `merge`
methods below i.e. `clone` does not clone EOF/EXCEPTION/fieldNames/fieldLabels
and if `merge` called the `put` method instead of direct `fields.putAll` then
EOF and EXCEPTION might change as part of the merge.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]