X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fdata%2Fimpl%2FAlbumImpl.java;h=41668abe0ad45411b95e483320f44cd401db6f9b;hp=fa1538d49fab3dd3642da388d09809e6786a568e;hb=419098bcd6215125408b29e60bd888e60979d37b;hpb=851d4fd51d44b92452aef92450022999a97a0483 diff --git a/src/main/java/net/pterodactylus/sone/data/impl/AlbumImpl.java b/src/main/java/net/pterodactylus/sone/data/impl/AlbumImpl.java index fa1538d..41668ab 100644 --- a/src/main/java/net/pterodactylus/sone/data/impl/AlbumImpl.java +++ b/src/main/java/net/pterodactylus/sone/data/impl/AlbumImpl.java @@ -1,5 +1,5 @@ /* - * Sone - Album.java - Copyright © 2011–2013 David Roden + * Sone - AlbumImpl.java - Copyright © 2011–2015 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 @@ -134,7 +134,7 @@ public class AlbumImpl implements Album { checkArgument(equals(album.getParent()), "album must belong to this album"); int oldIndex = albums.indexOf(album); if (oldIndex <= 0) { - return null; + return album; } albums.remove(oldIndex); albums.add(oldIndex - 1, album); @@ -148,7 +148,7 @@ public class AlbumImpl implements Album { checkArgument(equals(album.getParent()), "album must belong to this album"); int oldIndex = albums.indexOf(album); if ((oldIndex < 0) || (oldIndex >= (albums.size() - 1))) { - return null; + return album; } albums.remove(oldIndex); albums.add(oldIndex + 1, album);