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 3D11A200B50 for ; Fri, 29 Jul 2016 14:00:25 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 3BAF7160A79; Fri, 29 Jul 2016 12:00:25 +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 82DA4160A61 for ; Fri, 29 Jul 2016 14:00:24 +0200 (CEST) Received: (qmail 156 invoked by uid 500); 29 Jul 2016 12:00:23 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 125 invoked by uid 99); 29 Jul 2016 12:00:23 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Jul 2016 12:00:23 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 775522C0D5D for ; Fri, 29 Jul 2016 12:00:23 +0000 (UTC) Date: Fri, 29 Jul 2016 12:00:23 +0000 (UTC) From: "dhaniag (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (BEANUTILS-473) Backward compatibility - copying null values to primitive types MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 29 Jul 2016 12:00:25 -0000 [ https://issues.apache.org/jira/browse/BEANUTILS-473?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15399202#comment-15399202 ] dhaniag commented on BEANUTILS-473: ----------------------------------- Found the same issue in commons-beanutils-1.9.0.jar, commons-beanutils-1.9.1.jar and commons-beanutils-1.9.2.jar. But it is working up to commons-beanutils-1.8.3.jar > Backward compatibility - copying null values to primitive types > --------------------------------------------------------------- > > Key: BEANUTILS-473 > URL: https://issues.apache.org/jira/browse/BEANUTILS-473 > Project: Commons BeanUtils > Issue Type: Bug > Components: Bean / Property Utils > Affects Versions: 1.9.2 > Reporter: Sven Raddatz > Labels: IllegalArgumentException, backwards-compatibility, null-values > > Copying a NULL value to a primitve property in destination bean (e.g. boolean) was silently ignored in BU 1.7.0. In 1.9.2 this is throwing an IllegalArgumentException. > Since converters are not executed when value is null there is no way to prevent this behaviour, making it hard to migrate from 1.7.0 to 1.9.2. The only way to accomplish this task is to switch from primitive to non-primitive types in all destination beans, which would result in huge testing effort. > It would be nice to either have the possibility to use convertes to handle null values with a valid default (e.g. null = false in case of boolean) or to globally have a switch for a "silent / lenient mode" where any exceptions during copying are silently ignored. -- This message was sent by Atlassian JIRA (v6.3.4#6332)