That should be fine if no code has to be changed.

Ralph

On May 16, 2014, at 11:20 AM, Gary Gregory <garydgreg...@gmail.com> wrote:

> Hm... the contract for LogEvent.getContextMap() says it can return null, but 
> our implementation never returns null and in fact uses 
> java.util.Collections.EMPTY_
> MAP.
> 
> What about changing the LogEvent.getContextMap() Javadoc to require that a 
> map always be returned?
> 
> Gary
> 
> 
> On Fri, May 16, 2014 at 2:18 PM, Gary Gregory <garydgreg...@gmail.com> wrote:
> LogEvent.getContextMap() can return null if there is no map.
> 
> It seems that a default of a read-only empty Map 
> (java.util.Collections.EMPTY_MAP) would be safer since it would avoid any 
> NPEs from our own call sites and users' as well.
> 
> Thoughts?
> 
> Gary
> 
> -- 
> E-Mail: garydgreg...@gmail.com | ggreg...@apache.org 
> Java Persistence with Hibernate, Second Edition
> JUnit in Action, Second Edition
> Spring Batch in Action
> Blog: http://garygregory.wordpress.com 
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
> 
> 
> 
> -- 
> E-Mail: garydgreg...@gmail.com | ggreg...@apache.org 
> Java Persistence with Hibernate, Second Edition
> JUnit in Action, Second Edition
> Spring Batch in Action
> Blog: http://garygregory.wordpress.com 
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory

Reply via email to