Open Aehrraid opened 7 years ago
@Aehrraid there's an existing test case for this, and it passes as expected; i.e. an IllegalArgumentException
is thrown.
Can you elaborate?
Note the signatures mp3file.save(String) instead of mp3file.save(File).
The test case I mean would be (sort of):
public void shouldThrowExceptionIfSavingMp3WithSameNameAsSourceFileForFileConstructor() throws Exception {
Mp3File mp3File = new Mp3File(new File(MP3_WITH_ID3V1_AND_ID3V23_AND_CUSTOM_TAGS)); //<-- File
testShouldThrowExceptionIfSavingMp3WithSameNameAsSourceFile(mp3File.getPath()); //<-- String
}
This should fail.
Can you validate this? Is this relevant? I see, that using File once and String at the other place is bad style.
Now:
(Error: java.lang.IllegalArgumentException: Save filename same as source filename)
(legal, but produces mp3s with artifacts)
Should be: Both cases illegal: Error: java.lang.IllegalArgumentException: Save filename same as source filename
Took me quite a few hours to figure out why there are breaks and bumps in my song after converting it. 👎
Keep up the good work!