Messages.get() with null vararg lead to Exception

14 views
Skip to first unread message

7uc0

unread,
Jul 9, 2010, 11:03:34 AM7/9/10
to play-framework
Hi again,

I'm coming for the following NPE with the i18n.Messages() utility
class:

assertNotNull(Messages.get(null)); // OK
assertNotNull(Messages.get("ÄPZEZEREKLK11",null)); // NPE Error

I think the Messages utility class should not lead to NPE within
doCoolStuff() method, right ?

Ivan San José García

unread,
Jul 9, 2010, 4:04:55 PM7/9/10
to play-fr...@googlegroups.com
Why anyone needs call Messages.get("string", null); ? I think that
there is no case which require a null argument.

2010/7/9 7uc0 <erwan.l...@gmail.com>:

> --
> You received this message because you are subscribed to the Google Groups "play-framework" group.
> To post to this group, send email to play-fr...@googlegroups.com.
> To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.
>
>

7uc0

unread,
Jul 10, 2010, 9:25:33 AM7/10/10
to play-framework
When argument is optionally set. Here test is performed against
explicit null value

On 9 juil, 22:04, Ivan San José García <ivan...@gmail.com> wrote:
> Why anyone needs call Messages.get("string", null); ? I think that
> there is no case which require a null argument.
>
> 2010/7/9 7uc0 <erwan.legoul...@gmail.com>:

Guillaume Bort

unread,
Jul 10, 2010, 9:44:34 AM7/10/10
to play-fr...@googlegroups.com
I see, but which default value should be used?

On 10 juil. 2010, at 15:25, 7uc0 <erwan.l...@gmail.com> wrote:

> When argument is optionally set. Here test is performed against
> explicit null value
>
> On 9 juil, 22:04, Ivan San José García <ivan...@gmail.com> wrote:
>> Why anyone needs call Messages.get("string", null); ? I think that
>> there is no case which require a null argument.
>>
>> 2010/7/9 7uc0 <erwan.legoul...@gmail.com>:
>>
>>> Hi again,
>>
>>> I'm coming for the following NPE with the i18n.Messages() utility
>>> class:
>>
>>> assertNotNull(Messages.get(null)); // OK
>>> assertNotNull(Messages.get("ÄPZEZEREKLK11",null)); // NPE
>>> Error
>>
>>> I think the Messages utility class should not lead to NPE within
>>> doCoolStuff() method, right ?
>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "play-framework" group.
>>> To post to this group, send email to play-

>>> fram...@googlegroups.com.

7uc0

unread,
Jul 10, 2010, 10:43:58 AM7/10/10
to play-framework
What about empty string

On 10 juil, 15:44, Guillaume Bort <guillaume.b...@gmail.com> wrote:
> I see, but which default value should be used?
>

Guillaume Bort

unread,
Jul 12, 2010, 3:52:51 AM7/12/10
to play-fr...@googlegroups.com
Please report the bug.

--
Guillaume Bort, http://guillaume.bort.fr

For anything work-related, use g...@zenexity.fr; for everything else,
write guillau...@gmail.com

7uc0

unread,
Jul 12, 2010, 9:04:49 AM7/12/10
to play-framework
Reply all
Reply to author
Forward
0 new messages