You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by Mark Hindess <ma...@googlemail.com> on 2010/02/14 20:43:07 UTC

[classlib] [regression] dacapo eclipse benchmark bug

Jesse,

Your commit:

  r835972 | jessewilson | 2009-11-13 20:08:08 +0000 (Fri, 13 Nov 2009)

  Fixing the bugs demonstrated by WriterTesterTest. Only
  ObjectOutputStream failures are outstanding; these are suppressed in
  the test case.

  This commit adds SneakyThrow, which is a dangerous class that you
  should not use! It is used to give Harmony the best behaviour when
  dealing with failures during stream flush and close. Read the Javadoc
  for full detalis.

  This commit makes behaviour changes to BufferedWriter,
  FilterOutputStream, and BufferedOutputStream. These streams now throw
  as required after they are closed, and throw the correct exception
  when closing fails.

broke the dacapo eclipse benchmark because the following fails

  FilterOutputStream os =
    new FilterOutputStream(
      new BufferedOutputStream(
        new ByteArrayOutputStream()));
  os.close();
  os.close();

because the second close on FilterOutputStream should succeed but it
calls flush which with your commit throws an already closed exception
from BufferedOutputStream.

In commit r910065, I've added a regression test and reverted the
incorrect exception throw in BufferedOutputStream.flush().  If there is
a case where throwing this exception is correct then please provide a
regression test that covers it.

Regards,
 Mark.