You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think I see an improvement needed in method base.sublist around ln 109 in
Base.cs
Seeing as though 'sublist' is called to create a sublist of things like top
tags, for example if Last.Fm returns 0 tags for an artist - an Out Of Range
Exception occurs at 'original[i]' as the original list is empty . I have added
a length check that returns an empty array if needed:
internal T[] sublist<T> (T[] original, int length)
{
List<T> list = new List<T>();
// IMPROVEMENT - if original is empty - return
if (original.Length < 1) return list.ToArray();
for(int i=0; i<length; i++)
list.Add(original[i]);
return list.ToArray();
}
This will occur when calling:
:Artist.GetTopTags(int limit)
:Track.GetTopFans(int limit)
:Track.GetTopTags(int limit)
:Album.GetTopTags(int limit)
:User.GetTopTags(int limit)
:User.GetNeighbours(int limit)
:User.GetFriends(int limit)
Original issue reported on code.google.com by sa...@trackn.fm on 19 Nov 2013 at 7:55
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
sa...@trackn.fm
on 19 Nov 2013 at 7:55The text was updated successfully, but these errors were encountered: