mirror of
https://github.com/apache/struts.git
synced 2026-08-06 15:17:00 +00:00
Missed JUnit test in last commit. Still having troubles to get the testcases to run normally. If this commit doesn't solve it, I might need some more time to fix this.
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@573919 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -153,6 +153,14 @@ public class ChartResult implements Result {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public JFreeChart getChart() {
|
||||
return chart;
|
||||
}
|
||||
|
||||
public void setChart(JFreeChart chart) {
|
||||
this.chart = chart;
|
||||
}
|
||||
|
||||
// OTHER METHODS -----------------------
|
||||
|
||||
// Required by com.opensymphony.xwork2.Result
|
||||
@@ -164,7 +172,8 @@ public class ChartResult implements Result {
|
||||
* @throws Exception if an error occurs when creating or writing the chart to the servlet output stream.
|
||||
*/
|
||||
public void execute(ActionInvocation invocation) throws Exception {
|
||||
chart = (JFreeChart) invocation.getStack().findValue(value, JFreeChart.class);
|
||||
if (chart == null)
|
||||
chart = (JFreeChart) invocation.getStack().findValue(value, JFreeChart.class);
|
||||
if (chart == null) // we need to have a chart object - if not, blow up
|
||||
throw new NullPointerException("No JFreeChart object found on the stack with name " + value);
|
||||
// make sure we have some value for the width and height
|
||||
|
||||
Reference in New Issue
Block a user