import com.google.common.base.Preconditions;
import java.util.Collections;
import java.util.List;
+import java.util.Objects;
import org.opendaylight.yangtools.yang.common.QName;
import org.opendaylight.yangtools.yang.model.api.RevisionAwareXPath;
import org.opendaylight.yangtools.yang.model.api.SchemaPath;
@Override
public Object getDefaultValue() {
- return this;
+ return null;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
- result = prime * result + ((xpath == null) ? 0 : xpath.hashCode());
+ result = prime * result + Objects.hashCode(xpath);
return result;
}
return false;
}
Leafref other = (Leafref) obj;
- if (xpath == null) {
- if (other.xpath != null) {
- return false;
- }
- } else if (!xpath.equals(other.xpath)) {
- return false;
- }
- return true;
+ return Objects.equals(xpath, other.xpath);
}
@Override