Enable modernizer in atomix-storage
[controller.git] / third-party / atomix / storage / src / main / java / io / atomix / storage / journal / JournalSegmentDescriptor.java
index 71ad15e398ccc51c08cf523bcaaf685485de30de..28072cec4dd9d60c3f2e8988a3628559f033adb2 100644 (file)
@@ -20,7 +20,7 @@ import com.google.common.annotations.VisibleForTesting;
 import java.nio.ByteBuffer;
 
 import static com.google.common.base.MoreObjects.toStringHelper;
-import static com.google.common.base.Preconditions.checkNotNull;
+import static java.util.Objects.requireNonNull;
 
 /**
  * Stores information about a {@link JournalSegment} of the log.
@@ -226,7 +226,7 @@ public final class JournalSegmentDescriptor {
     private final ByteBuffer buffer;
 
     private Builder(ByteBuffer buffer) {
-      this.buffer = checkNotNull(buffer, "buffer cannot be null");
+      this.buffer = requireNonNull(buffer, "buffer cannot be null");
       buffer.putInt(VERSION_POSITION, VERSION);
     }