geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jboy...@apache.org
Subject svn commit: r154542 - geronimo/trunk/specs/activation/src/java/javax/activation/DataHandler.java
Date Sun, 20 Feb 2005 18:03:12 GMT
Author: jboynes
Date: Sun Feb 20 10:03:12 2005
New Revision: 154542

URL: http://svn.apache.org/viewcvs?view=rev&rev=154542
Log:
pipes only work if they are connected and the thread started

Modified:
    geronimo/trunk/specs/activation/src/java/javax/activation/DataHandler.java

Modified: geronimo/trunk/specs/activation/src/java/javax/activation/DataHandler.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/specs/activation/src/java/javax/activation/DataHandler.java?view=diff&r1=154541&r2=154542
==============================================================================
--- geronimo/trunk/specs/activation/src/java/javax/activation/DataHandler.java (original)
+++ geronimo/trunk/specs/activation/src/java/javax/activation/DataHandler.java Sun Feb 20
10:03:12 2005
@@ -185,10 +185,11 @@
                 throw new UnsupportedDataTypeException();
             }
             final PipedInputStream is = new PipedInputStream();
-            new Thread() {
+            Thread thread = new Thread() {
                 public void run() {
                     try {
                         PipedOutputStream os = new PipedOutputStream(is);
+                        is.connect(os);
                         try {
                             dch.writeTo(data, mimeType, os);
                         } finally {
@@ -199,6 +200,7 @@
                     }
                 }
             };
+            thread.start();
             return is;
         }
 



Mime
View raw message