src/share/classes/com/sun/tools/javac/comp/Flow.java

changeset 1879
3b4f92a3797f
parent 1802
8fb68f73d4b1
child 1899
c60a5099863a
     1.1 --- a/src/share/classes/com/sun/tools/javac/comp/Flow.java	Mon Jul 01 16:36:08 2013 -0700
     1.2 +++ b/src/share/classes/com/sun/tools/javac/comp/Flow.java	Tue Jul 02 22:49:40 2013 +0100
     1.3 @@ -1945,10 +1945,17 @@
     1.4                  }
     1.5              }
     1.6  
     1.7 +            /*  The analysis of each catch should be independent.
     1.8 +             *  Each one should have the same initial values of inits and
     1.9 +             *  uninits.
    1.10 +             */
    1.11 +            final Bits initsCatchPrev = new Bits(initsTry);
    1.12 +            final Bits uninitsCatchPrev = new Bits(uninitsTry);
    1.13 +
    1.14              for (List<JCCatch> l = tree.catchers; l.nonEmpty(); l = l.tail) {
    1.15                  JCVariableDecl param = l.head.param;
    1.16 -                inits.assign(initsTry);
    1.17 -                uninits.assign(uninitsTry);
    1.18 +                inits.assign(initsCatchPrev);
    1.19 +                uninits.assign(uninitsCatchPrev);
    1.20                  scan(param);
    1.21                  inits.incl(param.sym.adr);
    1.22                  uninits.excl(param.sym.adr);

mercurial