X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Ftemplate%2FProfileAccessor.java;h=d215c82cc23cd3aef649a72d49c108e123cd4564;hb=115487bc44d755f1ae836bafc610fb49a04d9d02;hp=19177c3fb4b1a150bf51b3fdf70ddd7d815db877;hpb=a88e930a23b550dae75116d7759924d760941776;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/template/ProfileAccessor.java b/src/main/java/net/pterodactylus/sone/template/ProfileAccessor.java index 19177c3..d215c82 100644 --- a/src/main/java/net/pterodactylus/sone/template/ProfileAccessor.java +++ b/src/main/java/net/pterodactylus/sone/template/ProfileAccessor.java @@ -1,5 +1,5 @@ /* - * Sone - ProfileAccessor.java - Copyright © 2011–2012 David Roden + * Sone - ProfileAccessor.java - Copyright © 2011–2013 David Roden * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -49,9 +49,6 @@ public class ProfileAccessor extends ReflectionAccessor { this.core = core; } - /** - * {@inheritDoc} - */ @Override public Object get(TemplateContext templateContext, Object object, String member) { Profile profile = (Profile) object; @@ -65,7 +62,7 @@ public class ProfileAccessor extends ReflectionAccessor { if (avatarId == null) { return null; } - if (core.getImage(avatarId, false) == null) { + if (!core.getImage(avatarId).isPresent()) { /* avatar ID but no matching image? show nothing. */ return null; }