I\'ve created a basic Audio Recording App using Media Recorder API\'s. I\'m trying to create a folder in the SD card and to save my recorded files to that folder. I\'m getti
I created a utility function:
@SuppressWarnings("unused")
private static void IGNORE_RESULT(boolean b) {}
And then to use:
IGNORE_RESULT(path.mkdir());
I like this solution because it is self documenting. You are explicitly stating that you know there is a result and you are intentionally ignoring it. It should also optimize out to a NOP during compilation so there is no unnecessary test at runtime just to suppress a useless warning.