Clover Coverage Report - Atlassian XWork(Aggregated)
Coverage timestamp: Wed Jul 27 2011 23:39:31 CDT
8   41   2   4
0   34   0.25   2
2     1  
1    
 
 
  ProfiledVelocityResult       Line # 13 8 2 0% 0.0
 
No Tests
 
1    package com.atlassian.xwork.results;
2   
3    import com.opensymphony.webwork.dispatcher.VelocityResult;
4    import com.opensymphony.xwork.ActionInvocation;
5    import com.opensymphony.xwork.util.OgnlValueStack;
6    import com.atlassian.util.profiling.UtilTimerStack;
7    import org.apache.velocity.Template;
8    import org.apache.velocity.app.VelocityEngine;
9   
10    /**
11    * A subclass of VelocityResult which adds profiling to execution and template retrieval.
12    */
 
13    public class ProfiledVelocityResult extends VelocityResult
14    {
 
15  0 toggle public void doExecute(String finalLocation, ActionInvocation invocation) throws Exception
16    {
17  0 UtilTimerStack.push("XW View: doExecute(" + finalLocation + ")");
18   
19  0 try
20    {
21  0 super.doExecute(finalLocation, invocation);
22    }
23    finally
24    {
25  0 UtilTimerStack.pop("XW View: doExecute(" + finalLocation + ")");
26    }
27    }
28   
 
29  0 toggle protected Template getTemplate(OgnlValueStack stack, VelocityEngine velocity, ActionInvocation invocation, String location) throws Exception
30    {
31  0 UtilTimerStack.push("XW View: getTemplate(" + location + ")");
32  0 try
33    {
34  0 return super.getTemplate(stack, velocity, invocation, location);
35    }
36    finally
37    {
38  0 UtilTimerStack.pop("XW View: getTemplate(" + location + ")");
39    }
40    }
41    }