Author: jbalunas(a)redhat.com
Date: 2011-02-01 13:38:31 -0500 (Tue, 01 Feb 2011)
New Revision: 21373
Modified:
branches/enterprise/3.3.X/framework/impl/src/test/java/org/ajax4jsf/io/ByteBufferTest.java
Log:
RF-8738 fixed unit test to check for StackOverflowError
Modified:
branches/enterprise/3.3.X/framework/impl/src/test/java/org/ajax4jsf/io/ByteBufferTest.java
===================================================================
---
branches/enterprise/3.3.X/framework/impl/src/test/java/org/ajax4jsf/io/ByteBufferTest.java 2011-02-01
18:28:52 UTC (rev 21372)
+++
branches/enterprise/3.3.X/framework/impl/src/test/java/org/ajax4jsf/io/ByteBufferTest.java 2011-02-01
18:38:31 UTC (rev 21373)
@@ -47,8 +47,13 @@
//create a dummy byte array
byte[] bs = new byte[10];
- //attempt to append the byte[] to the first buffer
- buffer1.append(bs, 0, bs.length);
+ try{
+ //attempt to append the byte[] to the first buffer
+ buffer1.append(bs, 0, bs.length);
+ }catch(StackOverflowError e){
+ fail("StackOverflowError while attempting to test ByteBuffer.append(), " +
+ "endless recursion found");
+ }
}
Show replies by date