"null" string when trying to get String value of e.g. TRACK_TOTAL field
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)
-
repo owner -
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.
-
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.
-
Thanks again. All links starting with jaudiotagger-2.2.2 are broken.
-
The bug was fixed in at least the actual last version 2.2.2. The issue may be closed.
-
repo owner Hmm, not what happened to those links but now fixed thanks.
-
repo owner - changed status to invalid
Already fiixed some time ago
- Log in to comment
I cant find this code extract in the current code base, so suspect this is already fixed, please try the latest code