import java.net.URI;
import java.net.URISyntaxException;
import java.util.Date;
+import java.util.Objects;
import org.opendaylight.yangtools.concepts.Immutable;
import org.opendaylight.yangtools.objcache.ObjectCache;
import org.opendaylight.yangtools.objcache.ObjectCacheFactory;
return false;
}
final QNameModule other = (QNameModule) obj;
- if (revision == null) {
- if (other.revision != null) {
- return false;
- }
- } else if (!revision.equals(other.revision)) {
+ if (!Objects.equals(revision, other.revision)) {
return false;
}
- if (namespace == null) {
- if (other.namespace != null) {
- return false;
- }
- } else if (!namespace.equals(other.namespace)) {
+ if (!Objects.equals(namespace, other.namespace)) {
return false;
}
return true;
try {
compositeURI = new URI(namespace.getScheme(), namespace.getUserInfo(), namespace.getHost(),
namespace.getPort(), namespace.getPath(), query, namespace.getFragment());
- } catch (URISyntaxException e) {
+ } catch (final URISyntaxException e) {
LOG.error("", e);
}
return compositeURI;