You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by lu...@apache.org on 2016/01/16 10:04:07 UTC
[2/3] struts git commit: Patch WW-3266
Patch WW-3266
getFieldValue() method of ValueStackDataSource uses getDescription() to
get field value may not appropriate
Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/37f822f9
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/37f822f9
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/37f822f9
Branch: refs/heads/master
Commit: 37f822f9cce8505e28a3dba5a2ac34aa03a17dd2
Parents: 7170c13
Author: Victor Sosa <vi...@gmail.com>
Authored: Thu Jan 7 11:09:58 2016 -0400
Committer: Victor Sosa <vi...@gmail.com>
Committed: Thu Jan 7 11:09:58 2016 -0400
----------------------------------------------------------------------
.../struts2/views/jasperreports/ValueStackDataSource.java | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/struts/blob/37f822f9/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/ValueStackDataSource.java
----------------------------------------------------------------------
diff --git a/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/ValueStackDataSource.java b/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/ValueStackDataSource.java
index 81641a5..c39b34e 100644
--- a/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/ValueStackDataSource.java
+++ b/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/ValueStackDataSource.java
@@ -92,12 +92,7 @@ public class ValueStackDataSource implements JRRewindableDataSource {
//TODO: move the code to return a ValueStackDataSource to a seperate
// method when and if the JRDataSource interface is updated to support
// this.
- String expression = field.getDescription();
-
- if (expression == null) {
- //Description is optional so use the field name as a default
- expression = field.getName();
- }
+ String expression = field.getName();
Object value = valueStack.findValue(expression);
LOG.debug("Field [{}] = [{}]", field.getName(), value);