mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-17 10:25:15 +00:00
Fixing compilation problem in Eclipse (#22956)
This commit is contained in:
parent
ed324d373a
commit
c33f894846
@ -31,6 +31,7 @@ import org.elasticsearch.rest.RestRequest;
|
|||||||
import org.elasticsearch.transport.netty4.Netty4Utils;
|
import org.elasticsearch.transport.netty4.Netty4Utils;
|
||||||
|
|
||||||
import java.net.SocketAddress;
|
import java.net.SocketAddress;
|
||||||
|
import java.util.AbstractMap;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -199,23 +200,8 @@ public class Netty4HttpRequest extends RestRequest {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Set<Entry<String, List<String>>> entrySet() {
|
public Set<Entry<String, List<String>>> entrySet() {
|
||||||
return httpHeaders.names().stream().map(k -> new Entry<String, List<String>>() {
|
return httpHeaders.names().stream().map(k -> new AbstractMap.SimpleImmutableEntry<>(k, httpHeaders.getAll(k)))
|
||||||
|
.collect(Collectors.toSet());
|
||||||
@Override
|
|
||||||
public String getKey() {
|
|
||||||
return k;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<String> getValue() {
|
|
||||||
return httpHeaders.getAll(k);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<String> setValue(List<String> value) {
|
|
||||||
throw new UnsupportedOperationException("modifications are not supported");
|
|
||||||
}
|
|
||||||
}).collect(Collectors.toSet());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user