Index: C:/harmony/trunk_0427/modules/luni/src/test/java/tests/api/java/io/ObjectInputStreamTest.java =================================================================== --- C:/harmony/trunk_0427/modules/luni/src/test/java/tests/api/java/io/ObjectInputStreamTest.java (revision 421079) +++ C:/harmony/trunk_0427/modules/luni/src/test/java/tests/api/java/io/ObjectInputStreamTest.java (working copy) @@ -724,7 +724,7 @@ /** * @tests java.io.ObjectInputStream#skipBytes(int) */ - public void test_skipBytesI() { + public void test_skipBytesI() throws IOException { // Test for method int java.io.ObjectInputStream.skipBytes(int) try { byte[] buf = new byte[10]; @@ -740,8 +740,22 @@ } catch (IOException e) { fail("Exception serializing data : " + e.getMessage()); } + + // regression test for HARMONY-844 + try { + new testObjectInputStream().skipBytes(0); + fail("Exception expected"); + } catch (NullPointerException npe) { + //expected + } } + class testObjectInputStream extends ObjectInputStream { + public testObjectInputStream() throws IOException { + super(); + } + } + /** * Sets up the fixture, for example, open a network connection. This method * is called before a test is executed.