Open MaWiLi opened 3 years ago
Hi @MaWiLi
have you seen this test case?
@Test
public void shouldStoreAndRetrieveBPM() throws Exception {
final ID3v22Tag id3tag = new ID3v22Tag();
final int bpm = 8 * 44100;
id3tag.setBPM(bpm);
final byte[] bytes = id3tag.toBytes();
final ID3v22Tag newId3tag = new ID3v22Tag(bytes);
assertEquals(bpm, newId3tag.getBPM());
}
It works fine. What is the code you use to produce the above exception?
Problems to set the result ob getBpm() into an int variable.
Exception in thread "main" java.lang.NumberFormatException: For input string: "0 Bpm" at java.base/jdk.internal.math.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2054) at java.base/jdk.internal.math.FloatingDecimal.parseFloat(FloatingDecimal.java:122) at java.base/java.lang.Float.parseFloat(Float.java:455) at com.mpatric.mp3agic.AbstractID3v2Tag.getBPM(AbstractID3v2Tag.java:600)