Author: alessio.soldano(a)jboss.com
Date: 2008-11-13 13:36:59 -0500 (Thu, 13 Nov 2008)
New Revision: 8728
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/XOPBase.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/XOPWrappedTestCase.java
Log:
[JBWS-2165] Fixing mtom tests with Metro
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/XOPBase.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/XOPBase.java 2008-11-13
16:53:36 UTC (rev 8727)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/XOPBase.java 2008-11-13
18:36:59 UTC (rev 8728)
@@ -166,7 +166,7 @@
try
{
BufferedReader br = new BufferedReader(new
InputStreamReader((InputStream)content));
- content = br.readLine();
+ return br.readLine();
}
finally
{
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/XOPWrappedTestCase.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/XOPWrappedTestCase.java 2008-11-13
16:53:36 UTC (rev 8727)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/XOPWrappedTestCase.java 2008-11-13
18:36:59 UTC (rev 8728)
@@ -81,16 +81,23 @@
assertEquals("Server data", content);
assertEquals("text/plain", contentType);
}
-
+
protected Object getContent(DataHandler dh) throws IOException
{
Object content = dh.getContent();
-
+
// Metro returns an ByteArrayInputStream
if (content instanceof InputStream)
{
- BufferedReader br = new BufferedReader(new
InputStreamReader((InputStream)content));
- content = br.readLine();
+ try
+ {
+ BufferedReader br = new BufferedReader(new
InputStreamReader((InputStream)content));
+ return br.readLine();
+ }
+ finally
+ {
+ ((InputStream)content).close();
+ }
}
return content;
}
Show replies by date