<br><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Paulo Levi</b> <span dir="ltr"><<a href="mailto:i30817@gmail.com">i30817@gmail.com</a>></span><br>Date: Tue, Mar 17, 2009 at 7:07 PM<br>
Subject: LsfFileHeader and MfccFileHeader<br>To: mary-users <<a href="mailto:mary-users@dfki.de">mary-users@dfki.de</a>><br><br><br>I was looking at the useless casts and instanceof's in these header objects, and found the readHeader override and the superclass (FeatureFileHeader) readHeader doesn't do sanity checks. In on case it ignores a null MaryRandomAccessFile argument and doesn't read the header at all (LsfFileHeader). In the other two it throws a npe.<br>
Also the function takes a parameter to close the randomaccess file (but doesnt close on exception).<br>Should i introduce sanitychecks and refactor the methods to close even if it throw a exception? <br><br>I'm going to commit the casts removal.<br>
</div><br>