Replace unnecessary type parameters with <>
[Sone.git] / src / main / java / net / pterodactylus / sone / database / memory / MemoryPost.java
index e0f83c2..5c294c0 100644 (file)
@@ -120,7 +120,7 @@ class MemoryPost implements Post {
         */
        @Override
        public Optional<Sone> getRecipient() {
-               return fromNullable(soneProvider.getSone(recipientId));
+               return recipientId == null ? Optional.<Sone>absent() : fromNullable(soneProvider.getSone(recipientId));
        }
 
        /**