Cleanup use of Guava library
[yangtools.git] / yang / yang-data-codec-xml / src / main / java / org / opendaylight / yangtools / yang / data / codec / xml / SchemaAwareXMLStreamWriterUtils.java
index 4e25cca2aa97eb2fe41e68638f0dc663c51dedaf..55a08c8fecd70d95f45dcfccae9c492b4b92a367 100644 (file)
@@ -7,8 +7,9 @@
  */
 package org.opendaylight.yangtools.yang.data.codec.xml;
 
-import com.google.common.base.Preconditions;
-import com.google.common.base.Verify;
+import static com.google.common.base.Verify.verifyNotNull;
+import static java.util.Objects.requireNonNull;
+
 import java.net.URI;
 import java.util.Map.Entry;
 import javax.xml.stream.XMLStreamException;
@@ -24,13 +25,13 @@ final class SchemaAwareXMLStreamWriterUtils extends XMLStreamWriterUtils {
     private final SchemaContext schemaContext;
 
     SchemaAwareXMLStreamWriterUtils(final SchemaContext schemaContext) {
-        this.schemaContext = Preconditions.checkNotNull(schemaContext);
+        this.schemaContext = requireNonNull(schemaContext);
     }
 
     @Override
     TypeDefinition<?> getBaseTypeForLeafRef(final SchemaNode schemaNode, final LeafrefTypeDefinition type) {
         final TypeDefinition<?> ret = SchemaContextUtil.getBaseTypeForLeafRef(type, schemaContext, schemaNode);
-        return Verify.verifyNotNull(ret, "Unable to find base type for leafref node '%s'.", schemaNode.getPath());
+        return verifyNotNull(ret, "Unable to find base type for leafref node '%s'.", schemaNode.getPath());
     }
 
     @Override