commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benedikt Ritter (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (BEANUTILS-410) No bean defined exception with mapped properties
Date Sun, 10 Mar 2013 14:47:12 GMT

     [ https://issues.apache.org/jira/browse/BEANUTILS-410?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Benedikt Ritter updated BEANUTILS-410:
--------------------------------------

    Attachment: BEANUTILS-410-TestCase.patch
    
> No bean defined exception with mapped properties
> ------------------------------------------------
>
>                 Key: BEANUTILS-410
>                 URL: https://issues.apache.org/jira/browse/BEANUTILS-410
>             Project: Commons BeanUtils
>          Issue Type: Bug
>          Components: Bean / Property Utils
>    Affects Versions: 1.8.3
>         Environment: All Operating Systems
>            Reporter: DANIEL BRASIL
>            Assignee: Benedikt Ritter
>            Priority: Blocker
>              Labels: bug
>             Fix For: 1.8.4
>
>         Attachments: BEANUTILS-410-TestCase.patch
>
>
> The following code throws an exception. The same code does not throw exception at 1.7.0
version. 
> The code tries to set property "_new_value" on bean "teste(abc)". It's not the correct
behavior since the property accessor notation is ".".
> {Code}
> import java.util.HashMap;
> import java.util.Map;
> public class MappedBean {
> 	public Map<String, String> teste = new HashMap<String, String>();
> 	public String getTeste(String key) {
> 		return this.teste.get(key);
> 	}
> 	public void setTeste(String key, String value) {
> 		this.teste.put(key, value);
> 	}
> }
> {Code}
> {Code}
> 		MappedBean testeBean = new MappedBean();
> 		Map<String, String> properties = new HashMap<String, String>();
> 		properties.put("teste(abc)_new_value", "1234");
> 		BeanUtils.populate(testeBean, properties);
> {Code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message