Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 81461200C64 for ; Fri, 28 Apr 2017 12:11:10 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 7FD5B160B8C; Fri, 28 Apr 2017 10:11:10 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id C9FEB160BA3 for ; Fri, 28 Apr 2017 12:11:09 +0200 (CEST) Received: (qmail 13814 invoked by uid 500); 28 Apr 2017 10:11:09 -0000 Mailing-List: contact issues-help@struts.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@struts.apache.org Delivered-To: mailing list issues@struts.apache.org Received: (qmail 13802 invoked by uid 99); 28 Apr 2017 10:11:08 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Apr 2017 10:11:08 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 5F8EC1A0257 for ; Fri, 28 Apr 2017 10:11:08 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id q5wMDIyz8Llz for ; Fri, 28 Apr 2017 10:11:06 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id D6CC25FCBB for ; Fri, 28 Apr 2017 10:11:05 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 4145CE0D5F for ; Fri, 28 Apr 2017 10:11:05 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 6997621DEB for ; Fri, 28 Apr 2017 10:11:04 +0000 (UTC) Date: Fri, 28 Apr 2017 10:11:04 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@struts.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (WW-3698) jasperreports plugin's ValueStackDataSource converts field values in ValueStackDataSource even when it's not wanted MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 28 Apr 2017 10:11:10 -0000 [ https://issues.apache.org/jira/browse/WW-3698?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15988579#comment-15988579 ] ASF GitHub Bot commented on WW-3698: ------------------------------------ Github user DenizR commented on the issue: https://github.com/apache/struts/pull/71 This bug orrurs after the struts2 version 2.3.15.3 (Oct 2013) although it will be stated that the error has been fixed https://issues.apache.org/jira/browse/WW-3698 When can one expect a solution? > jasperreports plugin's ValueStackDataSource converts field values in ValueStackDataSource even when it's not wanted > ------------------------------------------------------------------------------------------------------------------- > > Key: WW-3698 > URL: https://issues.apache.org/jira/browse/WW-3698 > Project: Struts 2 > Issue Type: Bug > Components: Plugin - JasperReports > Affects Versions: 2.2.3.1 > Environment: Tomcat 7 application server, Jasperreports 4.1.1 > Reporter: Dario Tortola > Assignee: Lukasz Lenart > Priority: Minor > Labels: patch > Fix For: 2.3.20 > > Original Estimate: 20m > Remaining Estimate: 20m > > Report A with Subreport B > Subreport B's datasource is a java.util.List field of Report A's datasource's elements > org.apache.struts2.views.jasperreports.ValueStackDataSource.getFieldValue, after locating the value, if org.apache.struts2.util.MakeIterator.isIterable(value) instead of value a new ValueStackDataSource over value is returned. > Since ValueStackDataSource is not a java.util.List, a javax.servlet.ServletException is thrown when the returned ValueStackDataSource fails to be cast to List > To avoid such unwanted conversion it's enough to change this code on ValueStackDataSource.getFieldValue > {code:java} > if (MakeIterator.isIterable(value)) { > return new ValueStackDataSource(this.valueStack, expression); > } else { > return value; > } > {code} > replace (MakeIterator.isIterable(value)) with (!field.getValueClass().isInstance(value) && MakeIterator.isIterable(value)) for the new ValueStackDataSource to be returned only if the value is not already what the field asks for -- This message was sent by Atlassian JIRA (v6.3.15#6346)