Sho SHIMIZU

Expose empty annotations as SparseAnnotations to move down cast

Change-Id: I9e8a7d61b770faaec1b7e0ea1cf78bdb367b68ee
......@@ -29,7 +29,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
*/
public final class DefaultAnnotations implements SparseAnnotations {
public static final Annotations EMPTY = DefaultAnnotations.builder().build();
public static final SparseAnnotations EMPTY = DefaultAnnotations.builder().build();
private final Map<String, String> map;
......
......@@ -465,7 +465,7 @@ class ConfigProvider implements DeviceProvider, LinkProvider, HostProvider {
// Produces set of annotations from the given JSON node.
private SparseAnnotations annotations(JsonNode node) {
if (node == null) {
return (SparseAnnotations) DefaultAnnotations.EMPTY;
return DefaultAnnotations.EMPTY;
}
DefaultAnnotations.Builder builder = DefaultAnnotations.builder();
......