From: David ‘Bombe’ Roden Date: Fri, 22 Nov 2013 18:35:59 +0000 (+0100) Subject: Use better check for whether the root album has been reached. X-Git-Tag: 0.8.8^2~7 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=32b480995d93941cd6ba7b3f0889141d3f610d84;p=Sone.git Use better check for whether the root album has been reached. --- diff --git a/src/main/java/net/pterodactylus/sone/template/AlbumAccessor.java b/src/main/java/net/pterodactylus/sone/template/AlbumAccessor.java index 13b4d65..9ef168a 100644 --- a/src/main/java/net/pterodactylus/sone/template/AlbumAccessor.java +++ b/src/main/java/net/pterodactylus/sone/template/AlbumAccessor.java @@ -43,7 +43,7 @@ public class AlbumAccessor extends ReflectionAccessor { if ("backlinks".equals(member)) { List backlinks = new ArrayList(); Album currentAlbum = album; - while (!currentAlbum.equals(album.getSone().getRootAlbum())) { + while (!currentAlbum.isRoot()) { backlinks.add(0, new Link("imageBrowser.html?album=" + currentAlbum.getId(), currentAlbum.getTitle())); currentAlbum = currentAlbum.getParent(); }