You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@juneau.apache.org by Gary Gregory <ga...@gmail.com> on 2023/06/24 03:51:19 UTC

BeanMap.containsKey()

Hi all,

I added TODO comments to BeanMapErrorsTest because I am wondering what the
intended behavior of containsKey() vs. keySet().contains().

Any thoughts?

Gary

Re: BeanMap.containsKey()

Posted by Gary Gregory <ga...@gmail.com>.
FYI, I'll also review the rest your commit comments from GH tonight.

Gary


On Mon, Jun 26, 2023, 15:22 James Bognar <ja...@apache.org> wrote:

> Odd...not sure what happened to the 9.0.0 release in Jira, but I've gone
> ahead and added it.
>
> On Mon, Jun 26, 2023 at 2:45 PM Gary Gregory <ga...@gmail.com>
> wrote:
>
>> I created https://issues.apache.org/jira/browse/JUNEAU-248
>>
>> I don't see to have the rights to create a release label for 9.0.0 in
>> Jira, it's missing.
>>
>> Ideally, there should be one label per released version.
>>
>> Gary
>>
>>
>>
>> On Mon, Jun 26, 2023, 10:19 James Bognar <ja...@apache.org> wrote:
>>
>>> It's testing a weird invalid-ish edge case.  The bean below only has one
>>> property, f1, due to the @Bean(p='f1') annotation, but also contains
>>> a @Beanp("f2") annotated method.
>>>
>>>  @Bean(p="f1") public static class A1 {
>>>   public int f1;
>>>   @Beanp("f2") public int f2() {...}
>>> }
>>>
>>> In this odd case, you can call get/put on the "f2" property, but it
>>> shouldn't show up in keySet()/entrySet().
>>>
>>> I agree that containsKey() should match the behavior of
>>> keySet().contains().  We should open a bug.
>>>
>>> On Fri, Jun 23, 2023 at 11:51 PM Gary Gregory <ga...@gmail.com>
>>> wrote:
>>>
>>>> Hi all,
>>>>
>>>> I added TODO comments to BeanMapErrorsTest because I am wondering what
>>>> the intended behavior of containsKey() vs. keySet().contains().
>>>>
>>>> Any thoughts?
>>>>
>>>> Gary
>>>>
>>>

Re: BeanMap.containsKey()

Posted by James Bognar <ja...@apache.org>.
Odd...not sure what happened to the 9.0.0 release in Jira, but I've gone
ahead and added it.

On Mon, Jun 26, 2023 at 2:45 PM Gary Gregory <ga...@gmail.com> wrote:

> I created https://issues.apache.org/jira/browse/JUNEAU-248
>
> I don't see to have the rights to create a release label for 9.0.0 in
> Jira, it's missing.
>
> Ideally, there should be one label per released version.
>
> Gary
>
>
>
> On Mon, Jun 26, 2023, 10:19 James Bognar <ja...@apache.org> wrote:
>
>> It's testing a weird invalid-ish edge case.  The bean below only has one
>> property, f1, due to the @Bean(p='f1') annotation, but also contains
>> a @Beanp("f2") annotated method.
>>
>>  @Bean(p="f1") public static class A1 {
>>   public int f1;
>>   @Beanp("f2") public int f2() {...}
>> }
>>
>> In this odd case, you can call get/put on the "f2" property, but it
>> shouldn't show up in keySet()/entrySet().
>>
>> I agree that containsKey() should match the behavior of
>> keySet().contains().  We should open a bug.
>>
>> On Fri, Jun 23, 2023 at 11:51 PM Gary Gregory <ga...@gmail.com>
>> wrote:
>>
>>> Hi all,
>>>
>>> I added TODO comments to BeanMapErrorsTest because I am wondering what
>>> the intended behavior of containsKey() vs. keySet().contains().
>>>
>>> Any thoughts?
>>>
>>> Gary
>>>
>>

Re: BeanMap.containsKey()

Posted by Gary Gregory <ga...@gmail.com>.
I created https://issues.apache.org/jira/browse/JUNEAU-248

I don't see to have the rights to create a release label for 9.0.0 in Jira,
it's missing.

Ideally, there should be one label per released version.

Gary



On Mon, Jun 26, 2023, 10:19 James Bognar <ja...@apache.org> wrote:

> It's testing a weird invalid-ish edge case.  The bean below only has one
> property, f1, due to the @Bean(p='f1') annotation, but also contains
> a @Beanp("f2") annotated method.
>
>  @Bean(p="f1") public static class A1 {
>   public int f1;
>   @Beanp("f2") public int f2() {...}
> }
>
> In this odd case, you can call get/put on the "f2" property, but it
> shouldn't show up in keySet()/entrySet().
>
> I agree that containsKey() should match the behavior of
> keySet().contains().  We should open a bug.
>
> On Fri, Jun 23, 2023 at 11:51 PM Gary Gregory <ga...@gmail.com>
> wrote:
>
>> Hi all,
>>
>> I added TODO comments to BeanMapErrorsTest because I am wondering what
>> the intended behavior of containsKey() vs. keySet().contains().
>>
>> Any thoughts?
>>
>> Gary
>>
>

Re: BeanMap.containsKey()

Posted by James Bognar <ja...@apache.org>.
It's testing a weird invalid-ish edge case.  The bean below only has one
property, f1, due to the @Bean(p='f1') annotation, but also contains
a @Beanp("f2") annotated method.

 @Bean(p="f1") public static class A1 {
  public int f1;
  @Beanp("f2") public int f2() {...}
}

In this odd case, you can call get/put on the "f2" property, but it
shouldn't show up in keySet()/entrySet().

I agree that containsKey() should match the behavior of
keySet().contains().  We should open a bug.

On Fri, Jun 23, 2023 at 11:51 PM Gary Gregory <ga...@gmail.com>
wrote:

> Hi all,
>
> I added TODO comments to BeanMapErrorsTest because I am wondering what the
> intended behavior of containsKey() vs. keySet().contains().
>
> Any thoughts?
>
> Gary
>