"null" string when trying to get String value of e.g. TRACK_TOTAL field

Issue #54 invalid
Former user created an issue

Hi. I use the last (2.0.3) version of the jaudiotagger.

If the code snippet below will be executed for the file which ID3v2 tag does not contain TRACK_TOTAL field but TRACK field is present, the 'total' string will equal to "null" (!) when it should be at least empty.

Tag tag = ...
String total = tag.getFirst(FieldKey.TRACK_TOTAL);

That is very unusual, so I think it is a bug. And one is caused by the following code (ID3v23Tag):

// ... getFirst(...)
else if (id3v23FieldKey == ID3v23FieldKey.TRACK_TOTAL)
{
    AbstractID3v2Frame frame = getFirstField(frameAndSubId.getFrameId());
    return String.valueOf(((FrameBodyTRCK)frame.getBody()).getTrackTotal());
}

Here getTrackTotal() will return null and "null" string will be returned from the getFirst() method.

Comments (7)

  1. IJabz repo owner

    I cant find this code extract in the current code base, so suspect this is already fixed, please try the latest code

  2. Alexander Vasilevsky

    Oh, thanks for quick response. I'm using Maven and there is only 2.0.3 (and earlier) version of the product available in central repository, so I decieded it is the last... What about to upload the last version in Maven repo? And by the way there are broken links in downloads section.

  3. IJabz repo owner

    Im not sure how to do that, for now just use git to download source from here and use maven to build it, where are the broken links I cant see them.

  4. Log in to comment