mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-11 23:45:15 +00:00
org.elasticsearch.common.collect.Tuple have 2 identical methods, closes #1922.
This commit is contained in:
parent
68a321ec0c
commit
927b4385a8
@ -171,7 +171,7 @@ public class TransportShardBulkAction extends TransportShardReplicationOperation
|
||||
if (mappingsToUpdate == null) {
|
||||
mappingsToUpdate = Sets.newHashSet();
|
||||
}
|
||||
mappingsToUpdate.add(Tuple.create(indexRequest.index(), indexRequest.type()));
|
||||
mappingsToUpdate.add(Tuple.tuple(indexRequest.index(), indexRequest.type()));
|
||||
}
|
||||
|
||||
// if we are going to percolate, then we need to keep this op for the postPrimary operation
|
||||
|
@ -63,15 +63,4 @@ public class Tuple<V1, V2> {
|
||||
result = 31 * result + (v2 != null ? v2.hashCode() : 0);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper function to create a tuple.
|
||||
*
|
||||
* @param v1 the first element for the resulting tuple
|
||||
* @param v2 the second element for the resulting tuple
|
||||
* @return the tuple (<code>v1</code>,<code>v2</code>)
|
||||
*/
|
||||
public static <V1, V2> Tuple<V1, V2> create(V1 v1, V2 v2) {
|
||||
return new Tuple<V1, V2>(v1, v2);
|
||||
}
|
||||
}
|
||||
|
@ -65,9 +65,9 @@ public class XContentHelper {
|
||||
parser = XContentFactory.xContent(contentType).createParser(data, offset, length);
|
||||
}
|
||||
if (ordered) {
|
||||
return Tuple.create(contentType, parser.mapOrderedAndClose());
|
||||
return Tuple.tuple(contentType, parser.mapOrderedAndClose());
|
||||
} else {
|
||||
return Tuple.create(contentType, parser.mapAndClose());
|
||||
return Tuple.tuple(contentType, parser.mapAndClose());
|
||||
}
|
||||
} catch (IOException e) {
|
||||
throw new ElasticSearchParseException("Failed to parse content to map", e);
|
||||
|
Loading…
x
Reference in New Issue
Block a user