From 32b480995d93941cd6ba7b3f0889141d3f610d84 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Fri, 22 Nov 2013 19:35:59 +0100 Subject: [PATCH] Use better check for whether the root album has been reached. --- src/main/java/net/pterodactylus/sone/template/AlbumAccessor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(); } -- 2.7.4