Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B9DAB17A01 for ; Wed, 3 Jun 2015 11:32:49 +0000 (UTC) Received: (qmail 11851 invoked by uid 500); 3 Jun 2015 11:32:49 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 11751 invoked by uid 500); 3 Jun 2015 11:32:49 -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 11736 invoked by uid 99); 3 Jun 2015 11:32:49 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Jun 2015 11:32:49 +0000 Date: Wed, 3 Jun 2015 11:32:49 +0000 (UTC) From: "johan zahri (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (BEANUTILS-476) copy derived properties not working when parent class attribute is public MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 johan zahri created BEANUTILS-476: ------------------------------------- Summary: copy derived properties not working when parent class attribute is public Key: BEANUTILS-476 URL: https://issues.apache.org/jira/browse/BEANUTILS-476 Project: Commons BeanUtils Issue Type: Bug Affects Versions: 1.9.2 Environment: JDK 7 Reporter: johan zahri In my case, I have a class B that extends A. property x defined as public in A but overridden as private in B with getters and setter defined as public. When performing a BeanUtils.copyProperties operation on instance of B as the source, the value of the target copies the value coming from A rather than from B which has a public getter and setter. I would assume that this should not be the correct behaviour? eg: A{public x;} B extends A {private x;public getX();public setX(x);} a.x=null b.x="val" BeanUtils.copyProperties (c,b); Result : c.x=null Expected: c.x="val" -- This message was sent by Atlassian JIRA (v6.3.4#6332)