Skip to content

Commit

Permalink
iter
Browse files Browse the repository at this point in the history
  • Loading branch information
Christoph Büscher committed Jul 20, 2018
1 parent 7fc10a2 commit 91c7d5a
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
* @deprecated {@link TransportClient} is deprecated in favour of the High Level REST client and will
* be removed in Elasticsearch 8.0.
*/
@SuppressWarnings({"unchecked","varargs"})
@Deprecated
public class PreBuiltTransportClient extends TransportClient {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ private void constructorArg(int position, ParseField parseField, Object value) {
private void queue(Consumer<Value> queueMe) {
assert targetObject == null: "Don't queue after the targetObject has been built! Just apply the consumer directly.";
if (queuedFields == null) {
@SuppressWarnings({"unchecked"})
@SuppressWarnings({"unchecked", "rawtypes"})
Consumer<Value>[] queuedFields = new Consumer[numberOfFields];
this.queuedFields = queuedFields;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,10 +234,11 @@ protected static QueryBuilder randomNestedFilter() {
}
}

@SuppressWarnings("unchecked")
private T copy(T original) throws IOException {
/* The cast below is required to make Java 9 happy. Java 8 infers the T in copyWriterable to be the same as AbstractSortTestCase's
* T but Java 9 infers it to be SortBuilder. */
return copyWriteable(original, namedWriteableRegistry,
return (T) copyWriteable(original, namedWriteableRegistry,
namedWriteableRegistry.getReader(SortBuilder.class, original.getWriteableName()));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@ static <T> Constructor<T> longestCtor(Class<T> clazz) {
* checks if they are subclasses of {@link Node}.
*/
@ParametersFactory
@SuppressWarnings("rawtypes")
public static List<Object[]> nodeSubclasses() throws IOException {
return subclassesOf(Node.class).stream()
.filter(c -> testClassFor(c) == null)
Expand Down Expand Up @@ -459,6 +460,7 @@ public boolean equals(Object obj) {
* and emulate them we just try and instantiate an
* appropriate subclass
*/
@SuppressWarnings("unchecked") // safe because this is the lowest possible bounds for Node
Class<? extends Node<?>> asNodeSubclass = (Class<? extends Node<?>>) argType;
return makeNode(asNodeSubclass);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

import io.netty.util.ThreadDeathWatcher;
import io.netty.util.concurrent.GlobalEventExecutor;

import org.elasticsearch.client.transport.TransportClient;
import org.elasticsearch.common.network.NetworkModule;
import org.elasticsearch.common.settings.Settings;
Expand All @@ -30,6 +29,7 @@
*
* @deprecated {@link TransportClient} is deprecated in favour of the high-level REST client and will be removed in Elasticsearch 8.0
*/
@SuppressWarnings({"unchecked","varargs"})
@Deprecated
public class PreBuiltXPackTransportClient extends PreBuiltTransportClient {

Expand Down

0 comments on commit 91c7d5a

Please sign in to comment.