<Beans Dev> [9] Review Request: 8079084 Behavior of BeanProperty.enumerationValues() contradicts spec

Alexander Scherbatiy alexandr.scherbatiy at oracle.com
Mon Jun 1 13:57:50 UTC 2015


   The fix looks good to me.

   Thanks,
   Alexandr.

On 5/27/2015 8:13 PM, Sergey Malenkov wrote:
> I approve.
>
> On Wed, May 27, 2015 at 6:09 PM, Sergey Bylokhov
> <Sergey.Bylokhov at oracle.com> wrote:
>> On 27.05.15 16:30, Sergey Malenkov wrote:
>>> Exactly!
>> The new version:
>> http://cr.openjdk.java.net/~serb/8079084/webrev.01/
>>
>>> On Wed, May 27, 2015 at 3:07 PM, Alexander Scherbatiy
>>> <alexandr.scherbatiy at oracle.com> wrote:
>>>> On 5/25/2015 6:56 PM, Sergey Bylokhov wrote:
>>>>> Hello.
>>>>> Please review the fix for jdk9.
>>>>>
>>>>> This is similar to the issue described here:
>>>>> http://mail.openjdk.java.net/pipermail/beans-dev/2015-May/000138.html
>>>>>
>>>>> The problem is that PropertyDescriptor.getValue() for
>>>>> "enumerationValues"
>>>>> return null, when default enumerationValues is assumed or an empty array
>>>>> was
>>>>> provided by the user.
>>>>> There are a different ways to fix the issue but I select this, because
>>>>> of
>>>>> assumption that @BeanProperty(enumerationValues = {}) should not return
>>>>> null, and we have no way to detect: it was set by the user or by
>>>>> default.
>>>>>
>>>>> Bug: https://bugs.openjdk.java.net/browse/JDK-8079084
>>>>> Webrev can be found at:
>>>>> http://cr.openjdk.java.net/~serb/8079084/webrev.00
>>>> 128                 if (0 <= values.length) {
>>>>
>>>> It looks like the condition is always true and the 'if' statement can be
>>>> omitted.
>>>>
>>>> Thanks,
>>>> Alexandr.
>>>>
>>>
>>
>> --
>> Best regards, Sergey.
>>
>
>



More information about the beans-dev mailing list