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

Comparing jsr166/src/main/java/util/concurrent/ForkJoinTask.java (file contents):
Revision 1.88 by jsr166, Mon Jul 7 19:06:46 2014 UTC vs.
Revision 1.89 by dl, Fri Jul 11 16:10:38 2014 UTC

# Line 560 | Line 560 | public abstract class ForkJoinTask<V> im
560                      Class<?>[] ps = c.getParameterTypes();
561                      if (ps.length == 0)
562                          noArgCtor = c;
563 <                    else if (ps.length == 1 && ps[0] == Throwable.class)
564 <                        return (Throwable)(c.newInstance(ex));
563 >                    else if (ps.length == 1 && ps[0] == Throwable.class) {
564 >                        Throwable wx = (Throwable)c.newInstance(ex);
565 >                        return (wx == null) ? ex : wx;
566 >                    }
567                  }
568                  if (noArgCtor != null) {
569                      Throwable wx = (Throwable)(noArgCtor.newInstance());
570 <                    wx.initCause(ex);
571 <                    return wx;
570 >                    if (wx != null) {
571 >                        wx.initCause(ex);
572 >                        return wx;
573 >                    }
574                  }
575              } catch (Exception ignore) {
576              }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines