[
https://issues.apache.org/jira/browse/BEANUTILS-425?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13591697#comment-13591697
]
Benedikt Ritter commented on BEANUTILS-425:
-------------------------------------------
Hi Oliver,
with this patch I get:
{code}
Running org.apache.commons.beanutils.PropertyUtilsTestCase
Tests run: 115, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 0.284 sec <<<
FAILURE!
testCustomIntrospection(org.apache.commons.beanutils.PropertyUtilsTestCase)
Time elapsed: 0.009 sec <<< FAILURE!
junit.framework.AssertionFailedError: Got a write method
at junit.framework.Assert.fail(Assert.java:47)
at junit.framework.Assert.assertTrue(Assert.java:20)
at junit.framework.Assert.assertNull(Assert.java:233)
at
org.apache.commons.beanutils.PropertyUtilsTestCase.testCustomIntrospection(PropertyUtilsTestCase.java:4486)
testRemoveBeanIntrospector(org.apache.commons.beanutils.PropertyUtilsTestCase)
Time elapsed: 0.005 sec <<< FAILURE!
junit.framework.AssertionFailedError: Got descriptors expected:<0> but was:<3>
at junit.framework.Assert.fail(Assert.java:47)
at junit.framework.Assert.failNotEquals(Assert.java:282)
at junit.framework.Assert.assertEquals(Assert.java:64)
at junit.framework.Assert.assertEquals(Assert.java:201)
at
org.apache.commons.beanutils.PropertyUtilsTestCase.testRemoveBeanIntrospector(PropertyUtilsTestCase.java:4535)
{code}
My environment is:
{code}
D:\Entwicklung\workspaces\commons\beanutils>mvn -version
Apache Maven 3.0.3 (r1075438; 2011-02-28 18:31:09+0100)
Maven home: D:\Entwicklung\maven\3.0.3
Java version: 1.7.0_13, vendor: Oracle Corporation
Java home: D:\Entwicklung\Java\jdk1.7.0_13-x64\jre
Default locale: de_DE, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"
{code}
Maybe this is related to BEANUTILS-422?!
> Support customization of introspection mechanism
> ------------------------------------------------
>
> Key: BEANUTILS-425
> URL: https://issues.apache.org/jira/browse/BEANUTILS-425
> Project: Commons BeanUtils
> Issue Type: New Feature
> Components: Bean / Property Utils
> Affects Versions: 1.8.3
> Reporter: Oliver Heger
> Assignee: Oliver Heger
> Priority: Minor
> Attachments: beanutils-425.patch
>
>
> So far BeanUtils can cope with properties conforming to the Java Beans
> specification. In some situations it makes sense to relax this requirement
> and allow the detection of other forms of get and set methods as well.
> For instance, fluent APIs have become popular. Here you have a set method
> which does not return *void* and thus violates the Java Beans specification.
> Objects using such an API cannot be dealt with by BeanUtils currently.
> For reasons of backwards compatibility the current behavior should remain the
> default. But it would be cool if there was an option to set a custom
> introspection policy. The policy would be invoked during property discovery
> and can decide which properties to include or not.
--
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