Messages.get() with null vararg lead to Exception

Bug #604598 reported by 7uc0
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
play framework
Fix Committed
Undecided
Unassigned

Bug Description

Within Unit Test method :

String myArg = null;
myArg = evaluationFonction() // may return null;
assertNotNull(Messages.get(null)); // OK
assertNotNull(Messages.get("ÄPZEZEREKLK11",myArg)); // NPE Exception

As myArg may be null, unit test errors with NPE Exception. As discussed here, It would be great if Messages utility class could handle pontential null args and deal with them as empty String.

http://groups.google.com/group/play-framework/browse_thread/thread/cf8644b5036457fb/76a41a63e275d18f?lnk=gst&q=vararg#76a41a63e275d18f

Changed in play:
status: New → Fix Committed
milestone: none → 1.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.