You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Vimesh Gihan Samarawickrama <vi...@gmail.com> on 2014/02/06 06:30:17 UTC

Getting know the intention of Null key/values testing in ContextPropertiesExternalizeTest.java test case

Hi,

I am using axis2-1.6.1 and here is my question.
We can modify HashMap into ConcurrentHashMap in
/modules/kernel/src/org/apache/axis2/context/AbstractContext.java in order
to access that map concurrently. But there is a test case called
ContextPropertiesExternalizeTest.java which puts null key/values to the
map. But since modified ConcurrentHashMap does not allow to put null
key/values it leads to fail.
So could you please let me know the intention of testing with null
key/values there.

Thanks

-- 
Vimesh Gihan Samarawickrama
Undergraduate
Department of Computer Science & Engineering
University of Moratuwa
Sri Lanka

Re: Getting know the intention of Null key/values testing in ContextPropertiesExternalizeTest.java test case

Posted by Shameera Rathnayaka <sh...@gmail.com>.
Hi Vimesh,

This is a critical change, doing this allow concurrent access to Message
context is a good, but this will introduce a limitation to message context
properties because concurrent map doesn't support null keys and values. we
need to find out which one is the most require. And need to consider user
point of view as well (CCed user mailing list ).

If you are providing a patch make sure to pass all test cases, in your case
change failing test case to not to support null keys and values.

Thanks,
Shameera.


On Thu, Feb 6, 2014 at 11:54 AM, Vimesh Gihan Samarawickrama <
vimeshcse@gmail.com> wrote:

> Hi Deepal,
>
> So is it required to have the ability to store null key/values in the
> properties map in AbstractContext.java? If not is it ok to change it into
> ConcurrentHashMap which does not allow to put null key/values.
>
> Thanks
>
>
> On Thu, Feb 6, 2014 at 11:17 AM, Deepal jayasinghe <de...@gmail.com>wrote:
>
>>  Hi Vimesh,
>>
>> Open a JIRA issue and attach a patch, one of us should be able to fix the
>> issue.
>>
>> Deepal
>>
>>  Hi,
>>
>>  I am using axis2-1.6.1 and here is my question.
>> We can modify HashMap into ConcurrentHashMap in
>> /modules/kernel/src/org/apache/axis2/context/AbstractContext.java in order
>> to access that map concurrently. But there is a test case called
>> ContextPropertiesExternalizeTest.java which puts null key/values to the
>> map. But since modified ConcurrentHashMap does not allow to put null
>> key/values it leads to fail.
>> So could you please let me know the intention of testing with null
>> key/values there.
>>
>>  Thanks
>>
>>  --
>> Vimesh Gihan Samarawickrama
>> Undergraduate
>> Department of Computer Science & Engineering
>> University of Moratuwa
>> Sri Lanka
>>
>>
>>
>
>
> --
> Vimesh Gihan Samarawickrama
> Undergraduate
> Department of Computer Science & Engineering
> University of Moratuwa
> Sri Lanka
>
>


-- 
Best Regards,
Shameera Rathnayaka.

email: shameera AT apache.org , shameerainfo AT gmail.com
Blog : http://shameerarathnayaka.blogspot.com/

Re: Getting know the intention of Null key/values testing in ContextPropertiesExternalizeTest.java test case

Posted by Shameera Rathnayaka <sh...@gmail.com>.
Hi Vimesh,

This is a critical change, doing this allow concurrent access to Message
context is a good, but this will introduce a limitation to message context
properties because concurrent map doesn't support null keys and values. we
need to find out which one is the most require. And need to consider user
point of view as well (CCed user mailing list ).

If you are providing a patch make sure to pass all test cases, in your case
change failing test case to not to support null keys and values.

Thanks,
Shameera.


On Thu, Feb 6, 2014 at 11:54 AM, Vimesh Gihan Samarawickrama <
vimeshcse@gmail.com> wrote:

> Hi Deepal,
>
> So is it required to have the ability to store null key/values in the
> properties map in AbstractContext.java? If not is it ok to change it into
> ConcurrentHashMap which does not allow to put null key/values.
>
> Thanks
>
>
> On Thu, Feb 6, 2014 at 11:17 AM, Deepal jayasinghe <de...@gmail.com>wrote:
>
>>  Hi Vimesh,
>>
>> Open a JIRA issue and attach a patch, one of us should be able to fix the
>> issue.
>>
>> Deepal
>>
>>  Hi,
>>
>>  I am using axis2-1.6.1 and here is my question.
>> We can modify HashMap into ConcurrentHashMap in
>> /modules/kernel/src/org/apache/axis2/context/AbstractContext.java in order
>> to access that map concurrently. But there is a test case called
>> ContextPropertiesExternalizeTest.java which puts null key/values to the
>> map. But since modified ConcurrentHashMap does not allow to put null
>> key/values it leads to fail.
>> So could you please let me know the intention of testing with null
>> key/values there.
>>
>>  Thanks
>>
>>  --
>> Vimesh Gihan Samarawickrama
>> Undergraduate
>> Department of Computer Science & Engineering
>> University of Moratuwa
>> Sri Lanka
>>
>>
>>
>
>
> --
> Vimesh Gihan Samarawickrama
> Undergraduate
> Department of Computer Science & Engineering
> University of Moratuwa
> Sri Lanka
>
>


-- 
Best Regards,
Shameera Rathnayaka.

email: shameera AT apache.org , shameerainfo AT gmail.com
Blog : http://shameerarathnayaka.blogspot.com/

Re: Getting know the intention of Null key/values testing in ContextPropertiesExternalizeTest.java test case

Posted by Vimesh Gihan Samarawickrama <vi...@gmail.com>.
Hi Deepal,

So is it required to have the ability to store null key/values in the
properties map in AbstractContext.java? If not is it ok to change it into
ConcurrentHashMap which does not allow to put null key/values.

Thanks


On Thu, Feb 6, 2014 at 11:17 AM, Deepal jayasinghe <de...@gmail.com>wrote:

>  Hi Vimesh,
>
> Open a JIRA issue and attach a patch, one of us should be able to fix the
> issue.
>
> Deepal
>
>  Hi,
>
>  I am using axis2-1.6.1 and here is my question.
> We can modify HashMap into ConcurrentHashMap in
> /modules/kernel/src/org/apache/axis2/context/AbstractContext.java in order
> to access that map concurrently. But there is a test case called
> ContextPropertiesExternalizeTest.java which puts null key/values to the
> map. But since modified ConcurrentHashMap does not allow to put null
> key/values it leads to fail.
> So could you please let me know the intention of testing with null
> key/values there.
>
>  Thanks
>
>  --
> Vimesh Gihan Samarawickrama
> Undergraduate
> Department of Computer Science & Engineering
> University of Moratuwa
> Sri Lanka
>
>
>


-- 
Vimesh Gihan Samarawickrama
Undergraduate
Department of Computer Science & Engineering
University of Moratuwa
Sri Lanka

Re: Getting know the intention of Null key/values testing in ContextPropertiesExternalizeTest.java test case

Posted by Deepal jayasinghe <de...@gmail.com>.
Hi Vimesh,

Open a JIRA issue and attach a patch, one of us should be able to fix
the issue.

Deepal
> Hi,
>
> I am using axis2-1.6.1 and here is my question.
> We can modify HashMap into ConcurrentHashMap in
> /modules/kernel/src/org/apache/axis2/context/AbstractContext.java in
> order to access that map concurrently. But there is a test case called
> ContextPropertiesExternalizeTest.java which puts null key/values to
> the map. But since modified ConcurrentHashMap does not allow to put
> null key/values it leads to fail.
> So could you please let me know the intention of testing with null
> key/values there.
>
> Thanks
>
> -- 
> Vimesh Gihan Samarawickrama
> Undergraduate
> Department of Computer Science & Engineering
> University of Moratuwa
> Sri Lanka
>