From b6d309d2befe368814220ecb4e609616cf070cab Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Wed, 9 Oct 2013 19:29:47 +0200 Subject: [PATCH] Improve static imports. --- .../net/pterodactylus/sone/database/memory/MemoryDatabase.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/net/pterodactylus/sone/database/memory/MemoryDatabase.java b/src/main/java/net/pterodactylus/sone/database/memory/MemoryDatabase.java index 3f30d11..504d155 100644 --- a/src/main/java/net/pterodactylus/sone/database/memory/MemoryDatabase.java +++ b/src/main/java/net/pterodactylus/sone/database/memory/MemoryDatabase.java @@ -17,7 +17,8 @@ package net.pterodactylus.sone.database.memory; -import static com.google.common.base.Preconditions.*; +import static com.google.common.base.Optional.fromNullable; +import static com.google.common.base.Preconditions.checkNotNull; import java.util.ArrayList; import java.util.Collection; @@ -160,7 +161,7 @@ public class MemoryDatabase extends AbstractService implements Database { public Optional getPost(String postId) { lock.readLock().lock(); try { - return Optional.fromNullable(allPosts.get(postId)); + return fromNullable(allPosts.get(postId)); } finally { lock.readLock().unlock(); } @@ -294,7 +295,7 @@ public class MemoryDatabase extends AbstractService implements Database { public Optional getPostReply(String id) { lock.readLock().lock(); try { - return Optional.fromNullable(allPostReplies.get(id)); + return fromNullable(allPostReplies.get(id)); } finally { lock.readLock().unlock(); } -- 2.7.4