struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lukaszlen...@apache.org
Subject [05/50] [abbrv] struts git commit: Patch WW-3266
Date Fri, 15 Jul 2016 13:18:32 GMT
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/c0670209
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/c0670209
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/c0670209

Branch: refs/heads/master
Commit: c0670209bac3d911b6f76850a6d36dbea64b91e2
Parents: b84fd6f
Author: Victor Sosa <victornsosa@gmail.com>
Authored: Thu Jan 7 11:09:58 2016 -0400
Committer: Lukasz Lenart <lukasz.lenart@gmail.com>
Committed: Tue Jan 19 16:18:00 2016 +0100

----------------------------------------------------------------------
 .../struts2/views/jasperreports/ValueStackDataSource.java     | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/c0670209/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);


Mime
View raw message