View | Details | Raw Unified | Return to bug 60497
Collapse All | Expand All

(-)java/org/apache/jasper/compiler/Generator.java (-8 / +24 lines)
Lines 2395-2400 Link Here
2395
                out.print(".get(");
2395
                out.print(".get(");
2396
                out.print(tagHandlerClassName);
2396
                out.print(tagHandlerClassName);
2397
                out.println(".class);");
2397
                out.println(".class);");
2398
                out.printin("boolean ");
2399
                out.print(n.getTagHandlerPoolName());
2400
                out.println("_reused = false;");
2398
            } else {
2401
            } else {
2399
                writeNewInstance(tagHandlerVar, tagHandlerClassName);
2402
                writeNewInstance(tagHandlerVar, tagHandlerClassName);
2400
            }
2403
            }
Lines 2600-2620 Link Here
2600
                out.printil("}");
2603
                out.printil("}");
2601
            }
2604
            }
2602
2605
2603
            // Ensure clean-up takes place
2606
            // Print tag reuse
2604
            out.popIndent();
2605
            out.printil("} finally {");
2606
            out.pushIndent();
2607
            if (isPoolingEnabled && !(n.implementsJspIdConsumer())) {
2607
            if (isPoolingEnabled && !(n.implementsJspIdConsumer())) {
2608
                out.printin(n.getTagHandlerPoolName());
2608
                out.printin(n.getTagHandlerPoolName());
2609
                out.print(".reuse(");
2609
                out.print(".reuse(");
2610
                out.print(tagHandlerVar);
2610
                out.print(tagHandlerVar);
2611
                out.println(");");
2611
                out.println(");");
2612
            } else {
2612
                out.printin(n.getTagHandlerPoolName());
2613
                out.printin(tagHandlerVar);
2613
                out.println("_reused = true;");
2614
                out.println(".release();");
2615
                writeDestroyInstance(tagHandlerVar);
2616
            }
2614
            }
2615
2616
            // Ensure clean-up takes place
2617
            out.popIndent();
2617
            out.popIndent();
2618
            out.printil("} finally {");
2619
            out.pushIndent();
2620
            if (isPoolingEnabled && !(n.implementsJspIdConsumer())) {
2621
                out.printin("if (!");
2622
                out.print(n.getTagHandlerPoolName());
2623
                out.println("_reused) {");
2624
                out.pushIndent();
2625
            }
2626
            out.printin(tagHandlerVar);
2627
            out.println(".release();");
2628
            writeDestroyInstance(tagHandlerVar);
2629
            if (isPoolingEnabled && !(n.implementsJspIdConsumer())) {
2630
                out.popIndent();
2631
                out.printil("}");
2632
            }
2633
            out.popIndent();
2618
            out.printil("}");
2634
            out.printil("}");
2619
2635
2620
            // Declare and synchronize AT_END scripting variables (must do this
2636
            // Declare and synchronize AT_END scripting variables (must do this

Return to bug 60497