ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/main/java/util/concurrent/ThreadPoolExecutor.java
(Generate patch)

Comparing jsr166/src/main/java/util/concurrent/ThreadPoolExecutor.java (file contents):
Revision 1.98 by dl, Sat Jul 15 20:10:13 2006 UTC vs.
Revision 1.99 by dl, Sun Jul 16 00:20:41 2006 UTC

# Line 856 | Line 856 | public class ThreadPoolExecutor extends
856          /**
857           * Runs a single task between before/after methods.
858           */
859 <        private void runTask(Runnable task) throws Throwable {
859 >        private void runTask(Runnable task) {
860              final ReentrantLock runLock = this.runLock;
861              runLock.lock();
862              Throwable ex = null;
# Line 884 | Line 884 | public class ThreadPoolExecutor extends
884              } finally {
885                  ++completedTasks;
886                  runLock.unlock();
887 <                if (ex != null)
888 <                    throw ex;
887 >                if (ex != null) {
888 >                    if (ex instanceof RuntimeException)
889 >                        throw (RuntimeException) ex;
890 >                    else if (ex instanceof Error)
891 >                        throw (Error) ex;
892 >                    else
893 >                        throw new Error(ex);
894 >                }
895              }
896          }
897  
# Line 900 | Line 906 | public class ThreadPoolExecutor extends
906                      runTask(task);
907                      task = null;
908                  }
903            } catch (Throwable fallThrough) {
909              } finally {
910                  workerDone(this);
911              }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines