commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Srinivas Vemula (JIRA)" <j...@apache.org>
Subject [jira] Commented: (BEANUTILS-360) BeanUtils.copyProperties() method is not working in JDK1.6
Date Thu, 08 Oct 2009 07:31:31 GMT

    [ https://issues.apache.org/jira/browse/BEANUTILS-360?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12763390#action_12763390
] 

Srinivas Vemula commented on BEANUTILS-360:
-------------------------------------------

its working fine with the Sun's JDK 1.6.0, but it is not working with the IBM WebSphere applications
servers V's JDK1.6 (which we will get when we install this server ).try testing with this
JDK

> 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.


Mime
View raw message