import java.util.Map;
import java.util.Map.Entry;
import org.eclipse.jdt.annotation.NonNull;
-import org.eclipse.jdt.annotation.Nullable;
import org.opendaylight.restconf.nb.rfc8040.legacy.InstanceIdentifierContext;
import org.opendaylight.yangtools.yang.common.QNameModule;
import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext;
* @param context Context to use
* @return Content of HTTP GET operation as a String
*/
- public final @NonNull String bodyFor(final @Nullable EffectiveModelContext context) {
+ public final @NonNull String bodyFor(final EffectiveModelContext context) {
if (isEmptyContext(context)) {
// No modules, or defensive return empty content
return emptyBody;
}
private static boolean isEmptyContext(final EffectiveModelContext context) {
- if (context == null) {
- return true;
- }
return context.getModuleStatements().isEmpty();
}