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

(-)apache/jasper/compiler/Mark.java (-4 / +23 lines)
Lines 89-97 Link Here
89
     * Constructor
89
     * Constructor
90
     */
90
     */
91
    Mark(Mark other) {
91
    Mark(Mark other) {
92
92
    	init(other);
93
        this.reader = other.reader;
93
    }
94
        this.ctxt = other.reader.getJspCompilationContext();
94
    
95
    /**
96
     * Simpler than {@link #init(Mark)}. To make good performance
97
     * 
98
     * @param other
99
     */
100
    void update(Mark other) {
101
        this.cursor = other.cursor;
102
        this.line = other.line;
103
        this.col = other.col;
104
    }
105
    
106
    void init(Mark other) {
107
    	this.reader = other.reader;
108
        this.ctxt = other.ctxt;
95
        this.stream = other.stream;
109
        this.stream = other.stream;
96
        this.fileId = other.fileId;
110
        this.fileId = other.fileId;
97
        this.fileName = other.fileName;
111
        this.fileName = other.fileName;
Lines 102-108 Link Here
102
        this.encoding = other.encoding;
116
        this.encoding = other.encoding;
103
117
104
        // clone includeStack without cloning contents
118
        // clone includeStack without cloning contents
105
        includeStack = new Stack<IncludeState>();
119
        if (includeStack != null) {
120
        	includeStack.clear();
121
        }
122
        else {
123
        	includeStack = new Stack<IncludeState>();
124
        }
106
        for ( int i=0; i < other.includeStack.size(); i++ ) {
125
        for ( int i=0; i < other.includeStack.size(); i++ ) {
107
            includeStack.addElement( other.includeStack.elementAt(i) );
126
            includeStack.addElement( other.includeStack.elementAt(i) );
108
        }
127
        }

Return to bug 53713