<br><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Paulo Levi</b> <span dir="ltr">&lt;<a href="mailto:i30817@gmail.com">i30817@gmail.com</a>&gt;</span><br>Date: Tue, Mar 17, 2009 at 7:07 PM<br>
Subject: LsfFileHeader and MfccFileHeader<br>To: mary-users &lt;<a href="mailto:mary-users@dfki.de">mary-users@dfki.de</a>&gt;<br><br><br>I was looking at the useless casts and instanceof&#39;s in these header objects, and found the readHeader override and the superclass (FeatureFileHeader) readHeader doesn&#39;t do sanity checks. In on case it ignores a null MaryRandomAccessFile argument and doesn&#39;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&#39;m going to commit the casts removal.<br>

</div><br>