Checking for ImmutableCollection before going to Iterable is not quite
obvious, use a cast to ImmutableCollection.
Change-Id: I3e06a81126ed24310f78e2dc97ceab23be537141
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
* contains a null element.
*/
public static @NonNull InstanceIdentifier<?> create(final Iterable<? extends PathArgument> pathArguments) {
- if (pathArguments instanceof ImmutableCollection<?>) {
+ if (pathArguments instanceof ImmutableCollection) {
@SuppressWarnings("unchecked")
- final Iterable<PathArgument> immutableArguments = (Iterable<PathArgument>) pathArguments;
+ final var immutableArguments = (ImmutableCollection<PathArgument>) pathArguments;
return internalCreate(immutableArguments);
}