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

(-)test/org/apache/jasper/EmbeddedServletOptionsTest.java (+56 lines)
Line 0 Link Here
1
package org.apache.jasper;
2
3
import javax.servlet.ServletContext;
4
5
import org.apache.catalina.Container;
6
import org.apache.catalina.Engine;
7
import org.apache.catalina.core.ApplicationContext;
8
import org.apache.catalina.core.StandardContext;
9
import org.apache.catalina.core.StandardEngine;
10
import org.apache.catalina.core.StandardService;
11
import org.apache.catalina.core.StandardWrapper;
12
13
import junit.framework.TestCase;
14
15
/**
16
 * Currently only tests whether maxLoadedJsps initializes correctly.
17
 * */
18
public class EmbeddedServletOptionsTest extends TestCase {
19
  StandardWrapper config;
20
  ServletContext context;
21
22
  protected void setUp() throws Exception {
23
    super.setUp();
24
    config = new StandardWrapper();
25
    StandardContext std1 = new StandardContext();
26
    StandardContext std2 = new StandardContext();
27
    Engine std3 = new StandardEngine();
28
    std3.setService(new StandardService());
29
    std2.setParent(std3);
30
    std1.setParent(std2);
31
    context = new ApplicationContext(std1);
32
  }
33
  
34
  public void testGetMaxLoadedJspsNegative() {
35
    config.addInitParameter("maxLoadedJsps", "-1");
36
    EmbeddedServletOptions options = new EmbeddedServletOptions(config, context);
37
    assertEquals(-1, options.getMaxLoadedJsps());
38
  }
39
40
  public void testGetMaxLoadedJspsDefault() {
41
    EmbeddedServletOptions options = new EmbeddedServletOptions(config, context);
42
    assertEquals(-1, options.getMaxLoadedJsps());
43
  }
44
45
  public void testGetMaxLoadedJspsPositive() {
46
    config.addInitParameter("maxLoadedJsps", "2000");
47
    EmbeddedServletOptions options = new EmbeddedServletOptions(config, context);
48
    assertEquals(2000, options.getMaxLoadedJsps());
49
  }
50
51
  public void testGetMaxLoadedJspsException() {
52
    config.addInitParameter("maxLoadedJsps", "2000abc");
53
    EmbeddedServletOptions options = new EmbeddedServletOptions(config, context);
54
    assertEquals(-1, options.getMaxLoadedJsps());
55
  }
56
}
(-)test/org/apache/jasper/compiler/JspRuntimeContextTest.java (+86 lines)
Line 0 Link Here
1
package org.apache.jasper.compiler;
2
3
import static org.easymock.EasyMock.*;
4
5
import org.apache.catalina.Engine;
6
import org.apache.catalina.core.ApplicationContext;
7
import org.apache.catalina.core.StandardContext;
8
import org.apache.catalina.core.StandardEngine;
9
import org.apache.catalina.core.StandardService;
10
import org.apache.catalina.core.StandardWrapper;
11
import org.apache.jasper.EmbeddedServletOptions;
12
import org.apache.jasper.JasperException;
13
import org.apache.jasper.Options;
14
import org.apache.jasper.servlet.JspServletWrapper;
15
16
import junit.framework.TestCase;
17
18
public class JspRuntimeContextTest extends TestCase {
19
20
  JspRuntimeContext context;
21
  ApplicationContext ctxt;
22
  Options options;
23
24
  protected void setUp() throws Exception {
25
    super.setUp();
26
    StandardWrapper config = new StandardWrapper();
27
    config.addInitParameter("maxLoadedJsps", "2");
28
    StandardContext std1 = new StandardContext();
29
    StandardContext std2 = new StandardContext();
30
    Engine std3 = new StandardEngine();
31
    std3.setService(new StandardService());
32
    std2.setParent(std3);
33
    std1.setParent(std2);
34
    ctxt = new ApplicationContext(std1);
35
    options = new EmbeddedServletOptions(config, ctxt);
36
37
    context = new JspRuntimeContext(ctxt, options);
38
  }
39
40
  public void testCheckUnloadDisabled() {
41
    options = (Options) createMock(Options.class);
42
    expect(options.getScratchDir()).andReturn(null);
43
    expect(options.getClassPath()).andReturn(null);
44
    expect(options.getDevelopment()).andReturn(false);
45
    expect(options.getMaxLoadedJsps()).andReturn(-1);
46
    replay(options);
47
    context = new JspRuntimeContext(ctxt, options);
48
    context.checkUnload();
49
    verify(options);
50
  }
51
52
  public void testCheckUnloadEnabledSizeTooFewJsps() {
53
    options = (Options) createMock(Options.class);
54
    expect(options.getScratchDir()).andReturn(null);
55
    expect(options.getClassPath()).andReturn(null);
56
    expect(options.getDevelopment()).andReturn(false);
57
    expect(options.getMaxLoadedJsps()).andReturn(1);
58
    expect(options.getCheckInterval()).andReturn(0);
59
    expect(options.getMaxLoadedJsps()).andReturn(1);
60
    replay(options);
61
    context = new JspRuntimeContext(ctxt, options);
62
    context.checkUnload();
63
    verify(options);
64
  }
65
66
  public void testCheckUnloadEnabledSizeEnoughJsps() throws JasperException {
67
    options = (Options) createMock(Options.class);
68
    expect(options.getScratchDir()).andReturn(null);
69
    expect(options.getClassPath()).andReturn(null);
70
    expect(options.getDevelopment()).andReturn(false);
71
    expect(options.getMaxLoadedJsps()).andReturn(1);
72
    expect(options.getCheckInterval()).andReturn(0);
73
    expect(options.getMaxLoadedJsps()).andReturn(1);
74
    expect(options.getMaxLoadedJsps()).andReturn(1);
75
    replay(options);
76
    context = new JspRuntimeContext(ctxt, options);
77
    JspServletWrapper first = new JspServletWrapper(new StandardWrapper(), options, "/first.jsp", false, context);
78
    context.addWrapper("/first.jsp", first);
79
    context.push(first);
80
    JspServletWrapper second = new JspServletWrapper(new StandardWrapper(), options, "/second.jsp", false, context);
81
    context.addWrapper("/second.jsp", second);
82
    context.push(second);
83
    context.checkUnload();
84
    verify(options);
85
  }
86
}
(-)test/org/apache/jasper/util/JspQueueTest.java (+84 lines)
Line 0 Link Here
1
/**
2
 * 
3
 */
4
package org.apache.jasper.util;
5
6
import junit.framework.TestCase;
7
8
/**
9
 * Queuing tests. The Queue is supposed to hold a set of instances in sorted order.
10
 * Sorting order is determined by the instances' content. As this content may change
11
 * during instance life, the Queue must be cheap to update - ideally in constant
12
 * time.
13
 * 
14
 * Access to the first element in the queue must happen in constant time.
15
 * 
16
 * Only a minimal set of operations is implemented.
17
 *
18
 * @author isabel
19
 */
20
public class JspQueueTest extends TestCase {
21
22
  private JspQueue<String> queue;
23
  
24
  protected void setUp() throws Exception {
25
    super.setUp();
26
    queue = new JspQueue<String>();
27
  }
28
29
  public void testEmpty() {
30
    assertNull(queue.pop());
31
  }
32
33
  public void testInsertAndRemoveOne() {
34
    String object = "first";
35
    queue.push(object);
36
    assertSame("Polling should return the oldest object inserted.", object, queue.pop());
37
  }
38
39
  public void testInsertAndMoveEnd() {
40
    String first = "first";
41
    String second = "second";
42
    String third = "third";
43
    queue.push(first);
44
    queue.push(second);
45
    queue.push(third);
46
    assertSame("Polling should return oldest object inserted.", first, queue.pop());
47
  }
48
49
  public void testInsertAndMoveMiddle() {
50
    String first = "first";
51
    String second = "second";
52
    String third = "third";
53
    Entry<String> ticket1 = queue.push(first);
54
    queue.push(second);
55
    queue.push(third);
56
    queue.makeYoungest(ticket1);
57
    assertSame("Polling should return oldest object inserted.", second, queue.pop());
58
  }
59
  
60
  public void testInsertAndMoveLast() {
61
    String first = "first";
62
    String second = "second";
63
    String third = "third";
64
    Entry<String> ticket1 = queue.push(first);
65
    Entry<String> ticket2 = queue.push(second);
66
    queue.push(third);
67
    queue.makeYoungest(ticket2);
68
    queue.makeYoungest(ticket1);
69
    assertSame("Polling should return oldest object inserted.", third, queue.pop());
70
  }
71
  
72
  public void testInsertAndMoveBeginning() {
73
    String first = "first";
74
    String second = "second";
75
    String third = "third";
76
    Entry<String> ticket1 = queue.push(first);
77
    Entry<String> ticket2 = queue.push(second);
78
    Entry<String> ticket3 = queue.push(third);
79
    queue.makeYoungest(ticket1);
80
    queue.makeYoungest(ticket2);
81
    queue.makeYoungest(ticket3);
82
    assertSame("Polling should return oldest object inserted.", first, queue.pop());
83
  }
84
}
(-)java/org/apache/jasper/JspC.java (+4 lines)
Lines 447-452 Link Here
447
        return cache;
447
        return cache;
448
    }
448
    }
449
449
450
    public int getMaxLoadedJsps() {
451
        return -1;
452
    }
453
450
    /**
454
    /**
451
     * Background compilation check intervals in seconds
455
     * Background compilation check intervals in seconds
452
     */
456
     */
(-)java/org/apache/jasper/servlet/JspServlet.java (+1 lines)
Lines 286-291 Link Here
286
286
287
287
288
    public void periodicEvent() {
288
    public void periodicEvent() {
289
    	  rctxt.checkUnload();
289
        rctxt.checkCompile();
290
        rctxt.checkCompile();
290
    }
291
    }
291
292
(-)java/org/apache/jasper/servlet/JspServletWrapper.java (-1 / +19 lines)
Lines 40-45 Link Here
40
import org.apache.jasper.compiler.Localizer;
40
import org.apache.jasper.compiler.Localizer;
41
import org.apache.jasper.runtime.InstanceManagerFactory;
41
import org.apache.jasper.runtime.InstanceManagerFactory;
42
import org.apache.jasper.runtime.JspSourceDependent;
42
import org.apache.jasper.runtime.JspSourceDependent;
43
import org.apache.jasper.util.Entry;
44
import org.apache.jasper.util.JspQueue;
43
import org.apache.juli.logging.Log;
45
import org.apache.juli.logging.Log;
44
import org.apache.juli.logging.LogFactory;
46
import org.apache.juli.logging.LogFactory;
45
import org.apache.tomcat.InstanceManager;
47
import org.apache.tomcat.InstanceManager;
Lines 81-86 Link Here
81
    private JasperException compileException;
83
    private JasperException compileException;
82
    private long servletClassLastModifiedTime;
84
    private long servletClassLastModifiedTime;
83
    private long lastModificationTest = 0L;
85
    private long lastModificationTest = 0L;
86
    private Entry<JspServletWrapper> ticket;
84
87
85
    /*
88
    /*
86
     * JspServletWrapper for JSP pages.
89
     * JspServletWrapper for JSP pages.
Lines 277-282 Link Here
277
        return tripCount--;
280
        return tripCount--;
278
    }
281
    }
279
282
283
    public String getJspUri() {
284
      return jspUri;
285
    }
286
280
    public void service(HttpServletRequest request, 
287
    public void service(HttpServletRequest request, 
281
                        HttpServletResponse response,
288
                        HttpServletResponse response,
282
                        boolean precompile)
289
                        boolean precompile)
Lines 310-315 Link Here
310
317
311
                    // The following sets reload to true, if necessary
318
                    // The following sets reload to true, if necessary
312
                    ctxt.compile();
319
                    ctxt.compile();
320
                    
321
                    if (options.getDevelopment() && options.getMaxLoadedJsps() > 0) {
322
                      ctxt.getRuntimeContext().unloadJsp();
323
                    }
313
                }
324
                }
314
            } else {
325
            } else {
315
                if (compileException != null) {
326
                if (compileException != null) {
Lines 371-377 Link Here
371
            } else {
382
            } else {
372
                theServlet.service(request, response);
383
                theServlet.service(request, response);
373
            }
384
            }
374
385
            if (options.getMaxLoadedJsps() > 0) {
386
              synchronized(this) {
387
                if (ticket == null)
388
                  ticket = ctxt.getRuntimeContext().push(this);
389
                else
390
                  ctxt.getRuntimeContext().makeFirst(ticket);
391
                }
392
              }
375
        } catch (UnavailableException ex) {
393
        } catch (UnavailableException ex) {
376
            String includeRequestUri = (String)
394
            String includeRequestUri = (String)
377
                request.getAttribute("javax.servlet.include.request_uri");
395
                request.getAttribute("javax.servlet.include.request_uri");
(-)java/org/apache/jasper/EmbeddedServletOptions.java (+25 lines)
Lines 181-186 Link Here
181
    private boolean displaySourceFragment = true;
181
    private boolean displaySourceFragment = true;
182
182
183
    
183
    
184
    /**
185
     * The maxim number of loaded jsps per web-application. If there are more
186
     * jsps loaded, they will be unloaded.
187
     */
188
    private int maxLoadedJsps = -1;
189
184
    public String getProperty(String name ) {
190
    public String getProperty(String name ) {
185
        return settings.getProperty( name );
191
        return settings.getProperty( name );
186
    }
192
    }
Lines 371-376 Link Here
371
    }
377
    }
372
378
373
    /**
379
    /**
380
     * Should any jsps be unloaded? If set to a value greater than 0 eviction of jsps
381
     * is started. Default: -1
382
     * */
383
    public int getMaxLoadedJsps() {
384
        return maxLoadedJsps;
385
    }
386
387
    /**
374
     * Create an EmbeddedServletOptions object using data available from
388
     * Create an EmbeddedServletOptions object using data available from
375
     * ServletConfig and ServletContext. 
389
     * ServletConfig and ServletContext. 
376
     */
390
     */
Lines 639-644 Link Here
639
            }
653
            }
640
        }
654
        }
641
        
655
        
656
        String maxLoadedJsps = config.getInitParameter("maxLoadedJsps");
657
        if (maxLoadedJsps != null) {
658
            try {
659
                this.maxLoadedJsps = Integer.parseInt(maxLoadedJsps);
660
            } catch(NumberFormatException ex) {
661
                if (log.isWarnEnabled()) {
662
                    log.warn(Localizer.getMessage("jsp.warning.maxLoadedJsps", ""+this.maxLoadedJsps));
663
                }
664
            }
665
        }
666
642
        // Setup the global Tag Libraries location cache for this
667
        // Setup the global Tag Libraries location cache for this
643
        // web-application.
668
        // web-application.
644
        tldLocationsCache = new TldLocationsCache(context);
669
        tldLocationsCache = new TldLocationsCache(context);
(-)java/org/apache/jasper/resources/LocalStrings.properties (+1 lines)
Lines 176-181 Link Here
176
jsp.warning.genchararray=Warning: Invalid value for the initParam genStrAsCharArray. Will use the default value of \"false\"
176
jsp.warning.genchararray=Warning: Invalid value for the initParam genStrAsCharArray. Will use the default value of \"false\"
177
jsp.warning.suppressSmap=Warning: Invalid value for the initParam suppressSmap. Will use the default value of \"false\"
177
jsp.warning.suppressSmap=Warning: Invalid value for the initParam suppressSmap. Will use the default value of \"false\"
178
jsp.warning.displaySourceFragment=Warning: Invalid value for the initParam displaySourceFragment. Will use the default value of \"true\"
178
jsp.warning.displaySourceFragment=Warning: Invalid value for the initParam displaySourceFragment. Will use the default value of \"true\"
179
jsp.warning.maxLoadedJsps=Warning: Invalid value for the initParam maxLoadedJsps. Will use the default value of \"-1\"
179
jsp.error.badtaglib=Unable to open taglibrary {0} : {1}
180
jsp.error.badtaglib=Unable to open taglibrary {0} : {1}
180
jsp.error.badGetReader=Cannot create a reader when the stream is not buffered
181
jsp.error.badGetReader=Cannot create a reader when the stream is not buffered
181
jsp.warning.unknown.element.in.taglib=Unknown element ({0}) in taglib
182
jsp.warning.unknown.element.in.taglib=Unknown element ({0}) in taglib
(-)java/org/apache/jasper/compiler/JspRuntimeContext.java (-1 / +74 lines)
Lines 40-48 Link Here
40
import org.apache.jasper.runtime.JspFactoryImpl;
40
import org.apache.jasper.runtime.JspFactoryImpl;
41
import org.apache.jasper.security.SecurityClassLoad;
41
import org.apache.jasper.security.SecurityClassLoad;
42
import org.apache.jasper.servlet.JspServletWrapper;
42
import org.apache.jasper.servlet.JspServletWrapper;
43
import org.apache.jasper.util.JspQueue;
43
import org.apache.juli.logging.Log;
44
import org.apache.juli.logging.Log;
44
import org.apache.juli.logging.LogFactory;
45
import org.apache.juli.logging.LogFactory;
45
46
47
46
/**
48
/**
47
 * Class for tracking JSP compile time file dependencies when the
49
 * Class for tracking JSP compile time file dependencies when the
48
 * &060;%@include file="..."%&062; directive is used.
50
 * &060;%@include file="..."%&062; directive is used.
Lines 171-178 Link Here
171
     * Maps JSP pages to their JspServletWrapper's
173
     * Maps JSP pages to their JspServletWrapper's
172
     */
174
     */
173
    private Map<String, JspServletWrapper> jsps = new ConcurrentHashMap<String, JspServletWrapper>();
175
    private Map<String, JspServletWrapper> jsps = new ConcurrentHashMap<String, JspServletWrapper>();
174
 
175
176
177
    /**
178
     * Keeps JSP pages ordered by last access. 
179
     */
180
    private JspQueue<JspServletWrapper> jspQueue = new JspQueue<JspServletWrapper>();
181
176
    // ------------------------------------------------------ Public Methods
182
    // ------------------------------------------------------ Public Methods
177
183
178
    /**
184
    /**
Lines 205-210 Link Here
205
    }
211
    }
206
212
207
    /**
213
    /**
214
     * Push a newly compiled JspServletWrapper into the queue at first
215
     * execution of jsp.
216
     *
217
     * @param jsw Servlet wrapper for jsp.
218
     * @return a ticket that can be pushed to front of queue at later execution times.
219
     * */
220
    public org.apache.jasper.util.Entry<JspServletWrapper> push(JspServletWrapper jsw) {
221
      synchronized (jspQueue) {
222
        return jspQueue.push(jsw);
223
      }
224
    }
225
    
226
    /**
227
     * Push ticket for JspServletWrapper to front of the queue.
228
     *
229
     * @param ticket the ticket for the jsp.
230
     * */
231
    public void makeFirst(org.apache.jasper.util.Entry<JspServletWrapper> ticket) {
232
      synchronized( jspQueue ) {
233
        jspQueue.makeYoungest(ticket);
234
      }
235
    }
236
    
237
    /**
208
     * Returns the number of JSPs for which JspServletWrappers exist, i.e.,
238
     * Returns the number of JSPs for which JspServletWrappers exist, i.e.,
209
     * the number of JSPs that have been loaded into the webapp.
239
     * the number of JSPs that have been loaded into the webapp.
210
     *
240
     *
Lines 468-472 Link Here
468
        return new SecurityHolder(source, permissions);
498
        return new SecurityHolder(source, permissions);
469
    }
499
    }
470
500
501
    /** Returns a JspServletWrapper that should be destroyed. Default strategy: Least recently used. */
502
    public JspServletWrapper getJspForUnload(final int maxLoadedJsps) {
503
      if( jsps.size() > maxLoadedJsps ) {
504
        synchronized( jsps ) {
505
          JspServletWrapper oldest;
506
          synchronized( jspQueue) {
507
            oldest = jspQueue.pop();
508
          }
509
          if (oldest != null) {
510
            removeWrapper(oldest.getJspUri());
511
            return oldest;
512
          }
513
        }
514
      }
515
      return null;
516
    }
471
517
518
    /**
519
     * Method used by background thread to check if any JSP's should be destroyed.
520
     * If JSP's to be unloaded are found, they will be destroyed.
521
     * Uses the lastCheck time from background compiler to determine if it is time to unload JSP's.
522
     */
523
    public void checkUnload() {    	
524
      if (options.getMaxLoadedJsps() > 0) {
525
        long now = System.currentTimeMillis();
526
        if (now > (lastCheck + (options.getCheckInterval() * 1000L))) {
527
          while (unloadJsp());
528
        }
529
      }
530
    }
531
    
532
    /**
533
     * Checks whether there is a jsp to unload, if one is found, it is destroyed. 
534
     * */
535
    public boolean unloadJsp() {
536
      JspServletWrapper jsw = getJspForUnload(options.getMaxLoadedJsps());
537
      if( null != jsw ) {
538
        synchronized(jsw) {
539
	  jsw.destroy();
540
	  return true;
541
        }
542
      }
543
      return false;
544
    }
472
}
545
}
(-)java/org/apache/jasper/Options.java (+6 lines)
Lines 194-197 Link Here
194
     */
194
     */
195
    public Map<String, TagLibraryInfo> getCache();
195
    public Map<String, TagLibraryInfo> getCache();
196
    
196
    
197
    /**
198
     * The maxim number of loaded jsps per web-application. If there are more
199
     * jsps loaded, they will be unloaded. If unset or less than 0, no jsps
200
     * are unloaded.
201
     */
202
    public int getMaxLoadedJsps();
197
}
203
}
(-)java/org/apache/jasper/util/JspQueue.java (+86 lines)
Line 0 Link Here
1
/**
2
 * 
3
 */
4
package org.apache.jasper.util;
5
6
/**
7
 * 
8
 * The JspQueue is supposed to hold a set of instances in sorted order.
9
 * Sorting order is determined by the instances' content. As this content may change
10
 * during instance lifetime, the Queue must be cheap to update - ideally in constant
11
 * time.
12
 * 
13
 * Access to the first element in the queue must happen in constant time.
14
 * 
15
 * Only a minimal set of operations is implemented.
16
 *
17
 * @author isabel
18
 */
19
public class JspQueue<T> {
20
21
  /** Head of the queue. */
22
  private Entry<T> head;
23
  /** Last element of the queue.*/
24
  private Entry<T> last;
25
  
26
  /** Initialize empty queue. */
27
  public JspQueue() {
28
    head = null;
29
    last = null;
30
  }
31
  
32
  /**
33
   * Adds an object to the end of the queue and returns the entry created for
34
   * said object. The entry can later be reused for moving the entry back to
35
   * the front of the list.
36
   * @param object the object to append to the end of the list.
37
   * @return a ticket for use when the object should be moved back to the front. 
38
   * */
39
  public Entry<T> push(final T object) {
40
    Entry<T> entry = new Entry<T>(object);
41
    if (head == null) {
42
      head = last = entry;
43
    } else {
44
      last.setPrevious(entry);
45
      entry.setNext(last);
46
      last = entry;
47
    }
48
    
49
    return entry;
50
  }
51
52
  /**
53
   * Removes the head of the queue and returns its content.
54
   * @return the content of the head of the queue.
55
   **/
56
  public T pop() {
57
    T content = null;
58
    if (head != null) {
59
      content = head.getContent();
60
      if (head.getPrevious() != null)
61
        head.getPrevious().setNext(null);
62
      head = head.getPrevious();
63
    }
64
    return content;
65
  }
66
67
  /**
68
   * Moves the candidate to the front of the queue.
69
   * @param candidate the entry to move to the front of the queue.
70
   * */
71
  public void makeYoungest(final Entry<T> candidate) {
72
    if (candidate.getPrevious() != null) {
73
      Entry<T> candidateNext = candidate.getNext();
74
      Entry<T> candidatePrev = candidate.getPrevious();
75
      candidatePrev.setNext(candidateNext);
76
      if (candidateNext != null)
77
        candidateNext.setPrevious(candidatePrev);
78
      else
79
        head = candidatePrev;
80
      candidate.setNext(last);
81
      candidate.setPrevious(null);
82
      last.setPrevious(candidate);
83
      last = candidate;
84
    }
85
  }
86
}
(-)java/org/apache/jasper/util/Entry.java (+48 lines)
Line 0 Link Here
1
/**
2
 * 
3
 */
4
package org.apache.jasper.util;
5
6
/**
7
 * Implementation of a list entry. It exposes links to previous and next
8
 * elements on package level only.
9
 *
10
 * @author isabel
11
 */
12
public class Entry<T> {
13
14
  /** The content this entry is valid for.*/
15
  private final T content;
16
  /** Pointer to next element in queue.*/
17
  private Entry<T> next;
18
  /** Pointer to previous element in queue.*/
19
  private Entry<T> previous;
20
21
  public Entry(T object) {
22
    content = object;
23
  }
24
25
  protected void setNext(final Entry<T> next) {
26
    this.next = next;
27
  }
28
  
29
  protected void setPrevious(final Entry<T> previous) {
30
    this.previous = previous;
31
  }
32
33
  public T getContent() {
34
    return content;
35
  }
36
  
37
  public Entry<T> getPrevious() {
38
    return previous;
39
  }
40
41
  public Entry<T> getNext() {
42
    return next;
43
  }
44
  
45
  public String toString() {
46
    return content.toString();
47
  }
48
}
(-)build.xml (-1 / +7 lines)
Lines 866-871 Link Here
866
      <param name="destfile" value="${commons-daemon.jar}"/>
866
      <param name="destfile" value="${commons-daemon.jar}"/>
867
    </antcall>
867
    </antcall>
868
868
869
    <mkdir dir="${easymock.dir}" />
870
    <antcall target="downloadfile">
871
      <param name="sourcefile" value="${easymock.loc}"/>
872
      <param name="destfile" value="${easymock.jar}"/>
873
    </antcall>
874
869
    <!-- Build Tomcat DBCP bundle -->
875
    <!-- Build Tomcat DBCP bundle -->
870
    <antcall target="downloadgz">
876
    <antcall target="downloadgz">
871
      <param name="sourcefile" value="${commons-pool-src.loc}"/>
877
      <param name="sourcefile" value="${commons-pool-src.loc}"/>
Lines 891-897 Link Here
891
      <param name="basedir" value="${jasper-jdt.home}" />
897
      <param name="basedir" value="${jasper-jdt.home}" />
892
    </antcall>
898
    </antcall>
893
899
894
    <antcall target="downloadzip">
900
   <antcall target="downloadzip">
895
      <param name="sourcefile" value="${nsis.loc}"/>
901
      <param name="sourcefile" value="${nsis.loc}"/>
896
      <param name="destfile" value="${nsis.exe}"/>
902
      <param name="destfile" value="${nsis.exe}"/>
897
  	  <param name="destdir" value="${nsis.home}/.."/>
903
  	  <param name="destdir" value="${nsis.home}/.."/>
(-).classpath (+1 lines)
Lines 7-12 Link Here
7
	<classpathentry kind="var" path="TOMCAT_LIBS_BASE/eclipse/plugins/org.eclipse.jdt.core_3.3.1.v_780_R33x.jar"/>
7
	<classpathentry kind="var" path="TOMCAT_LIBS_BASE/eclipse/plugins/org.eclipse.jdt.core_3.3.1.v_780_R33x.jar"/>
8
	<classpathentry kind="var" path="TOMCAT_LIBS_BASE/json-20080701/json.jar"/>
8
	<classpathentry kind="var" path="TOMCAT_LIBS_BASE/json-20080701/json.jar"/>
9
	<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/3"/>
9
	<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/3"/>
10
        <classpathentry kind="var" path="TOMCAT_LIBS_BASE/easymock/easymock.2.4.jar"/>
10
	<classpathentry kind="var" path="ANT_HOME/lib/ant.jar"/>
11
	<classpathentry kind="var" path="ANT_HOME/lib/ant.jar"/>
11
	<classpathentry kind="lib" path="output/extras/webservices/jaxrpc.jar"/>
12
	<classpathentry kind="lib" path="output/extras/webservices/jaxrpc.jar"/>
12
	<classpathentry kind="lib" path="output/extras/webservices/wsdl4j.jar"/>
13
	<classpathentry kind="lib" path="output/extras/webservices/wsdl4j.jar"/>
(-)build.properties.default (+6 lines)
Lines 50-55 Link Here
50
# Mirror, was used when there were problems with the main SF downloads site
50
# Mirror, was used when there were problems with the main SF downloads site
51
# base-sf.loc=http://sunet.dl.sourceforge.net
51
# base-sf.loc=http://sunet.dl.sourceforge.net
52
52
53
# ----- Easymock ----
54
easymock.version=2.4
55
easymock.loc=http://mirrors.ibiblio.org/pub/mirrors/maven2/org/easymock/easymock/${easymock.version}/easymock_{easymock.version}.jar
56
easymock.dir=${base.path}/easymock/
57
easymock.jar=${easymock.dir}/easymock.${easymock.version}.jar
58
53
# ----- Commons Logging, version 1.1 or later -----
59
# ----- Commons Logging, version 1.1 or later -----
54
commons-logging-version=1.1.1
60
commons-logging-version=1.1.1
55
commons-logging-src.loc=${base-commons.loc}/logging/source/commons-logging-${commons-logging-version}-src.tar.gz
61
commons-logging-src.loc=${base-commons.loc}/logging/source/commons-logging-${commons-logging-version}-src.tar.gz

Return to bug 48358