Use better check for whether the root album has been reached.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 22 Nov 2013 18:35:59 +0000 (19:35 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 22 Nov 2013 18:35:59 +0000 (19:35 +0100)
src/main/java/net/pterodactylus/sone/template/AlbumAccessor.java

index 13b4d65..9ef168a 100644 (file)
@@ -43,7 +43,7 @@ public class AlbumAccessor extends ReflectionAccessor {
                if ("backlinks".equals(member)) {
                        List<Link> backlinks = new ArrayList<Link>();
                        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();
                        }