Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 89175 invoked from network); 5 Oct 2009 13:57:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 5 Oct 2009 13:57:59 -0000 Received: (qmail 54017 invoked by uid 500); 5 Oct 2009 13:57:59 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 53924 invoked by uid 500); 5 Oct 2009 13:57:58 -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 53914 invoked by uid 99); 5 Oct 2009 13:57:58 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Oct 2009 13:57:58 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Oct 2009 13:57:55 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id C45AF234C04C for ; Mon, 5 Oct 2009 06:57:31 -0700 (PDT) Message-ID: <1515353378.1254751051802.JavaMail.jira@brutus> Date: Mon, 5 Oct 2009 06:57:31 -0700 (PDT) From: "Niall Pemberton (JIRA)" To: issues@commons.apache.org Subject: [jira] Commented: (BEANUTILS-360) BeanUtils.copyProperties() method is not working in JDK1.6 In-Reply-To: <1884842392.1252329297535.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/BEANUTILS-360?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12762178#action_12762178 ] Niall Pemberton commented on BEANUTILS-360: ------------------------------------------- I wrote a test case for this, but only just committed it: http://svn.apache.org/repos/asf/commons/proper/beanutils/trunk/src/test/org/apache/commons/beanutils/bugs/Jira360TestCase.java > BeanUtils.copyProperties() method is not working in JDK1.6 > ---------------------------------------------------------- > > Key: BEANUTILS-360 > URL: https://issues.apache.org/jira/browse/BEANUTILS-360 > Project: Commons BeanUtils > Issue Type: Wish > Components: Bean / Property Utils > Affects Versions: 1.7.0 > Environment: WebSphere Application Server v7.0.0.3 (WAS) , RAD7.5.3 > Reporter: Srinivas Vemula > > we are using beanutils 1.7.0 version and the below code is not working as expected. as i mentioned we are using the WebSphere Application server v7.0.0.3 JDK. i.e, JDK1.6 > code snippet: > interface GroupInterface : > ------------------------------ > package test.groups; > public interface GroupInterface { > public static final int ACTIVE = 1; > public static final int INACTIVE = 0; > public static final int DELETED = -1; > > public void setActivated(Integer value) ; > public Integer getActivated() ; > } > GRPinfo.java : > ---------------------- > package test.groups; > public class GRPInfo implements GroupInterface { > private Integer activated; > > public void setActivated(int value) { > setActivated(new Integer(value)); > } > public void setActivated(Integer value) { > this.activated = value; > } > public Integer getActivated() { > return activated; > } > } > GRPTest.java : > --------------------- > package test.groups; > import org.apache.commons.beanutils.BeanUtils; > public class GRPTest { > public static void main(String[] args) throws Exception { > > GRPInfo src = new GRPInfo(); > src.setActivated(GroupInterface.DELETED); > > GRPInfo dst = new GRPInfo(); > dst.setActivated(GroupInterface.ACTIVE); > > System.out.println(" SRC Activated -->"+src.getActivated()); > BeanUtils.copyProperties(dst,src); > System.out.println("DST Activated "+dst.getActivated()); > } > } > If i run the above sample application (GRPTest.java), the 'copyProperties()' is not actually copying the values from 'src' to 'dst'. > i can see the value 1 in the 'dst' object. this behavior is observed on WAS JDK1.6 but the same code is working fine on WAS JDK1.5 > suspecting on two variants of setActivated() method. but the pointer here the same code is working fine on JDK1.5 > is this a compliance problem with JDK1.6 with the BeanUtil.copyProperties() method? > -srinivas -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.