Q:

Checking the validity of a variable before calling the super constructor

So I'm writing some code that involves extending a class I have previously written in which files are created and named using a constructor that takes in a name and a size of type long. In that original class, I verified within the constructor that the entered file name contained one "." character but did not require a specific extension on the file. For this new class that I am writing, I am requiring the name's extension be ".mp3".However, my compiler does not like verification before the super constructor. 
This is my current code:
public class Song extends DigitalMedia{

private String artist;
private String album;
private String name;
private long size;

public Song(String aName, long aSize, String aArtist, String aAlbum){
    super(aName, aSize);
    setArtist(aArtist);
    setAlbum(aAlbum);
}

Is there any way to verify that "aName" contains ".mp3" before I create that constructor?

A:

I can't say whether it's the best way to design your program, but you could call a validator method inside one of the super arguments:
public Song(String aName, long aSize, String aArtist, String aAlbum){
    super(validateName(aName), aSize);
    setArtist(aArtist);
    setAlbum(aAlbum);
}

private static String validateName(String name) {
    if (whatever) {
        throw new Whatever();
    }
    return name;
}

