RFC7951JSONInstanceIdentifierCodec overrides createQName with a
mismatched lastModule annotations; this patch aligns the annotations
(@Nonnull) without changing the implementation (which throws an
IllegalArgumentException if lastModule is null).
(Caught by SpotBugs.)
Change-Id: I9e08241a5ec1c58554a0cd178e46ad4aeb061a77
Signed-off-by: Stephen Kitt <skitt@redhat.com>
import static com.google.common.base.Preconditions.checkArgument;
+import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import org.opendaylight.yangtools.yang.common.QName;
import org.opendaylight.yangtools.yang.common.QNameModule;
}
@Override
- protected QName createQName(final @Nullable QNameModule lastModule, final String localName) {
+ protected QName createQName(final @Nonnull QNameModule lastModule, final String localName) {
checkArgument(lastModule != null, "Unprefixed leading name %s", localName);
return QName.create(lastModule, localName);
}