import com.google.common.collect.ImmutableList;
import com.google.common.collect.Maps;
import com.google.common.io.CharStreams;
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.io.IOException;
import java.io.Reader;
import java.util.Collection;
return modelsInProject.values();
}
- @SuppressFBWarnings(value = "RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE",
- justification = "https://github.com/spotbugs/spotbugs/issues/600")
private static Collection<YangTextSchemaSource> toUniqueSources(final Collection<ScannedDependency> dependencies)
throws IOException {
final Map<String, YangTextSchemaSource> byContent = new HashMap<>();
<groupId>org.opendaylight.yangtools</groupId>
<artifactId>yang-model-api</artifactId>
</dependency>
- <dependency>
- <groupId>com.github.spotbugs</groupId>
- <artifactId>spotbugs-annotations</artifactId>
- <optional>true</optional>
- </dependency>
<dependency>
<groupId>org.opendaylight.yangtools</groupId>
<artifactId>yang-repo-api</artifactId>
requires org.opendaylight.yangtools.yang.common;
requires org.opendaylight.yangtools.yang.model.api;
requires org.slf4j;
-
- // Annotations
- requires static com.github.spotbugs.annotations;
}
import static org.opendaylight.yangtools.util.concurrent.FluentFutures.immediateFluentFuture;
import com.google.common.util.concurrent.FluentFuture;
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.io.File;
import java.io.FilenameFilter;
import java.io.IOException;
}
@Override
- @SuppressFBWarnings(value = "RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE",
- justification = "https://github.com/spotbugs/spotbugs/issues/600")
protected void storeAsType(final File file, final YangTextSchemaSource cast) {
try (var castStream = cast.asByteSource(StandardCharsets.UTF_8).openStream()) {
Files.copy(castStream, file.toPath(), StandardCopyOption.REPLACE_EXISTING);