From: David ‘Bombe’ Roden Date: Wed, 9 Oct 2013 17:29:47 +0000 (+0200) Subject: Improve static imports. X-Git-Tag: 0.8.8^2~25 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=b6d309d2befe368814220ecb4e609616cf070cab;p=Sone.git Improve static imports. --- 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(); }