<propertyExpansion>checkstyle.violationSeverity=error</propertyExpansion>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>findbugs-maven-plugin</artifactId>
+ <configuration>
+ <failOnError>true</failOnError>
+ </configuration>
+ </plugin>
</plugins>
</build>
</execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>findbugs-maven-plugin</artifactId>
+ <configuration>
+ <failOnError>true</failOnError>
+ </configuration>
+ </plugin>
</plugins>
</build>
<propertyExpansion>checkstyle.violationSeverity=error</propertyExpansion>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>findbugs-maven-plugin</artifactId>
+ <configuration>
+ <failOnError>true</failOnError>
+ </configuration>
+ </plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<propertyExpansion>checkstyle.violationSeverity=error</propertyExpansion>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>findbugs-maven-plugin</artifactId>
+ <configuration>
+ <failOnError>true</failOnError>
+ </configuration>
+ </plugin>
</plugins>
</build>
}
@Override
+ @SuppressWarnings("unchecked")
public <K, V, N extends IdentifierNamespace<K, V>> NamespaceBehaviour<K, V, N> getNamespaceBehaviour(
final Class<N> namespace) {
final NamespaceBehaviour<?, ?, ?> potential = namespaceDefinitions.get(namespace);
for (final StmtContext<?, ?, ?> stmt : stmtContext.declaredSubstatements()) {
if (YangStmtMapping.IF_FEATURE.equals(stmt.getPublicDefinition())) {
containsIfFeature = true;
- if (((Predicate<Set<QName>>) stmt.getStatementArgument()).test(supportedFeatures)) {
+ @SuppressWarnings("unchecked")
+ final Predicate<Set<QName>> argument = (Predicate<Set<QName>>) stmt.getStatementArgument();
+ if (argument.test(supportedFeatures)) {
isSupported = true;
} else {
isSupported = false;
import static java.util.Objects.requireNonNull;
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.util.Optional;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
public class SourceException extends RuntimeException {
private static final long serialVersionUID = 1L;
+ @SuppressFBWarnings(value = "SE_BAD_FIELD", justification = "Interface-specified member")
private final StatementSourceReference sourceRef;
/**
<propertyExpansion>checkstyle.violationSeverity=error</propertyExpansion>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>findbugs-maven-plugin</artifactId>
+ <configuration>
+ <failOnError>true</failOnError>
+ </configuration>
+ </plugin>
</plugins>
</build>
package org.opendaylight.yangtools.yang.test.util;
import com.google.common.annotations.Beta;
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.io.File;
import java.io.FileFilter;
import java.io.IOException;
* @param parserMode mode of statement parser
* @return effective schema context
*/
+ @SuppressFBWarnings(value = "NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE", justification = "Wrong inferent on listFiles")
public static SchemaContext parseYangResourceDirectory(final String resourcePath,
final Set<QName> supportedFeatures, final StatementParserMode parserMode) {
final URI directoryPath;
}
}
+ @SuppressFBWarnings(value = "NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE", justification = "Wrong inferent on listFiles")
private static Collection<File> getYangFiles(final String resourcePath) {
final URI directoryPath;
try {
<propertyExpansion>checkstyle.violationSeverity=error</propertyExpansion>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>findbugs-maven-plugin</artifactId>
+ <configuration>
+ <failOnError>true</failOnError>
+ </configuration>
+ </plugin>
</plugins>
</build>
</project>
import static java.util.Objects.requireNonNull;
import com.google.common.annotations.Beta;
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
/**
* YANG XPath binary operator.
*/
MOD("mod");
+ @SuppressFBWarnings(value = "SE_INNER_CLASS", justification = "Outer class is a retained enumeration")
private final class Expr extends YangBinaryExpr {
private static final long serialVersionUID = 1L;
import com.google.common.base.MoreObjects;
import com.google.common.base.MoreObjects.ToStringHelper;
import com.google.common.collect.ImmutableList;
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.io.Serializable;
import java.util.Arrays;
import java.util.Collection;
return getAxis().equals(other.getAxis()) && getPredicates().equals(other.getPredicates());
}
+ @SuppressFBWarnings(value = "SE_PRIVATE_READ_RESOLVE_NOT_INHERITED",
+ justification = "We have only one subclass, and that does not want to inherit this")
private Object readResolve() {
return getAxis().asStep();
}
}
}
+ @SuppressFBWarnings(value = "EQ_DOESNT_OVERRIDE_EQUALS",
+ justification = "https://github.com/spotbugs/spotbugs/issues/511")
static final class NodeTypeStepWithPredicates extends NodeTypeStep {
private static final long serialVersionUID = 1L;
import com.google.common.annotations.Beta;
import com.google.common.collect.ImmutableSet;
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.util.Collection;
import java.util.Set;
*/
UNION("|");
+ @SuppressFBWarnings(value = "SE_INNER_CLASS", justification = "Outer class is a retained enumeration")
private final class Expr extends YangNaryExpr {
private static final long serialVersionUID = 1L;