Commits

Dusan Balek  committed 7ad3298

Issue #199296 - NullPointerException at com.sun.tools.javac.comp.Flow.visitTry - fixed.

  • Participants
  • Parent commits 939d201

Comments (0)

Files changed (1)

File src/share/classes/com/sun/tools/javac/comp/Enter.java

             assert typeEnvsShadow == null;
             typeEnvsShadow = new HashMap<TypeSymbol,Env<AttrContext>>();
         } else {
-            for (Map.Entry<TypeSymbol, Env<AttrContext>> entry : typeEnvsShadow.entrySet())
-                typeEnvs.put(entry.getKey(), entry.getValue());
+            for (Map.Entry<TypeSymbol, Env<AttrContext>> entry : typeEnvsShadow.entrySet()) {
+                if (entry.getValue() == null)
+                    typeEnvs.remove(entry.getKey());
+                else
+                    typeEnvs.put(entry.getKey(), entry.getValue());
+            }
             typeEnvsShadow = null;
         }
     }