[mary-users] LsfFileHeader and MfccFileHeader

Paulo Levi i30817 at gmail.com
Tue Mar 17 20:07:42 CET 2009


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.
Also the function takes a parameter to close the randomaccess file (but
doesnt close on exception).
Should i introduce sanitychecks and refactor the methods to close even if it
throw a exception?

I'm going to commit the casts removal.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.dfki.de/pipermail/mary-users/attachments/20090317/a1846130/attachment.htm 


More information about the Mary-users mailing list