Rather than using JSR-305, migrate IdentitySchemaNode and its
implementation to JDT annotations.
Change-Id: I7e1ca793c86ca6a2576292cf0791dcaa17a5d346
JIRA: YANGTOOLS-907
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
package org.opendaylight.yangtools.yang.model.api;
import java.util.Set;
package org.opendaylight.yangtools.yang.model.api;
import java.util.Set;
-import javax.annotation.Nonnull;
+import org.eclipse.jdt.annotation.NonNull;
/**
* Interface describing YANG 'identity' statement.
/**
* Interface describing YANG 'identity' statement.
* @return set of existing identities from which the new identity is derived or an empty Set if the identity is
* a root identity.
*/
* @return set of existing identities from which the new identity is derived or an empty Set if the identity is
* a root identity.
*/
- @Nonnull Set<IdentitySchemaNode> getBaseIdentities();
+ @NonNull Set<IdentitySchemaNode> getBaseIdentities();
/**
* Get identities derived from this identity.
*
* @return collection of identities derived from this identity
*/
/**
* Get identities derived from this identity.
*
* @return collection of identities derived from this identity
*/
- Set<IdentitySchemaNode> getDerivedIdentities();
+ @NonNull Set<IdentitySchemaNode> getDerivedIdentities();
*/
package org.opendaylight.yangtools.yang.parser.rfc7950.stmt.identity;
*/
package org.opendaylight.yangtools.yang.parser.rfc7950.stmt.identity;
+import static com.google.common.base.Preconditions.checkState;
+
import com.google.common.base.MoreObjects;
import com.google.common.base.MoreObjects;
-import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableSet;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Objects;
import java.util.Set;
import com.google.common.collect.ImmutableSet;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Objects;
import java.util.Set;
-import javax.annotation.Nonnull;
+import org.eclipse.jdt.annotation.NonNull;
import org.opendaylight.yangtools.yang.common.QName;
import org.opendaylight.yangtools.yang.model.api.IdentitySchemaNode;
import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement;
import org.opendaylight.yangtools.yang.common.QName;
import org.opendaylight.yangtools.yang.model.api.IdentitySchemaNode;
import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement;
final class IdentityEffectiveStatementImpl extends AbstractEffectiveSchemaNode<IdentityStatement>
implements IdentityEffectiveStatement, IdentitySchemaNode, MutableStatement {
private final Set<IdentitySchemaNode> derivedIdentities;
final class IdentityEffectiveStatementImpl extends AbstractEffectiveSchemaNode<IdentityStatement>
implements IdentityEffectiveStatement, IdentitySchemaNode, MutableStatement {
private final Set<IdentitySchemaNode> derivedIdentities;
- private Set<IdentitySchemaNode> baseIdentities;
+ private @NonNull Set<IdentitySchemaNode> baseIdentities;
private boolean sealed;
IdentityEffectiveStatementImpl(
private boolean sealed;
IdentityEffectiveStatementImpl(
}
private void addBaseIdentity(final IdentityEffectiveStatementImpl baseIdentity) {
}
private void addBaseIdentity(final IdentityEffectiveStatementImpl baseIdentity) {
- Preconditions.checkState(!sealed, "Attempt to modify sealed identity effective statement %s", getQName());
+ checkState(!sealed, "Attempt to modify sealed identity effective statement %s", getQName());
this.baseIdentities.add(baseIdentity);
}
this.baseIdentities.add(baseIdentity);
}
@Override
public Set<IdentitySchemaNode> getBaseIdentities() {
@Override
public Set<IdentitySchemaNode> getBaseIdentities() {
- Preconditions.checkState(sealed,
- "Attempt to get base identities from unsealed identity effective statement %s", getQName());
+ checkState(sealed, "Attempt to get base identities from unsealed identity effective statement %s", getQName());