Looking at the usage of this method, only code that passes in Region.Type.EVICTION is
EvictionInterceptor.canIgnoreEvent(). And that can handle a null return just fine. So,
seems we could safely replace the above with:
|
| // test if the default region has been defined. If not, and if the request
| // is for an eviction region, return null
| if ((nextBestThing != null && nextBestThing.getFqn().isRoot() &&
!regionsRegistry.containsKey(Fqn.ROOT))
| && type == EVICTION)
| {
| log.trace("No default eviction region; returning null");
| nextBestThing = null;
| }
|
Haven't looked carefully to see if the method contract implies it won't return
null.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4136054#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...