diff --git a/impl/src/main/java/com/sun/faces/facelets/compiler/CompilationManager.java b/impl/src/main/java/com/sun/faces/facelets/compiler/CompilationManager.java index beffb6f3f7..2360230daa 100644 --- a/impl/src/main/java/com/sun/faces/facelets/compiler/CompilationManager.java +++ b/impl/src/main/java/com/sun/faces/facelets/compiler/CompilationManager.java @@ -295,12 +295,10 @@ public void popTag() { finishUnit(); } else { t.endTag(); - if (t.isClosed()) { - this.finishUnit(); - } return; } - unit = this.currentUnit(); + + unit = currentUnit(); } if (unit instanceof TagUnit) { @@ -328,9 +326,14 @@ public void pushNamespace(String prefix, String uri) { } boolean alreadyPresent = namespaceManager.getNamespace(prefix) != null; + + if (alreadyPresent) { + return; + } + namespaceManager.pushNamespace(prefix, uri); NamespaceUnit unit; - if (currentUnit() instanceof NamespaceUnit && !alreadyPresent) { + if (currentUnit() instanceof NamespaceUnit) { unit = (NamespaceUnit) currentUnit(); } else { unit = new NamespaceUnit(tagLibrary);