Bug 8214: Avoid throwing NPE when DataBroker is null 40/56540/1
authorRyan Goulding <ryandgoulding@gmail.com>
Thu, 4 May 2017 16:05:54 +0000 (12:05 -0400)
committerRyan Goulding <ryandgoulding@gmail.com>
Thu, 4 May 2017 16:05:54 +0000 (12:05 -0400)
commit0f692bf15fe642f0f6a99eb106d4879cc6d83b65
tree02914e3cbf930bdd7298e89ca4d1d778c24fe072
parentc264eb794eada29a992804f47ace6ac5a6ac76b5
Bug 8214:  Avoid throwing NPE when DataBroker is null

MDSALDynamicAuthorizationFilter is instantiated by shiro when
the web container is brought up.  shiro has no knowledge of
the DataBroker, so the dependency cannot be injected in shiro.ini.

shiro.ini needs to die, and is tracked by Bug 7793.  For now,
to avoid throwing the NPE (in the case that the DataBroker hasn't
been brought up yet), just fail-close until the dataBroker is
made available (i.e., AAAShiroProvider.newInstance(DataBroker)
is called).

Change-Id: I28e2eb0780f4f7761a5e2f81d167afc5a4b10cba
Signed-off-by: Ryan Goulding <ryandgoulding@gmail.com>
aaa-shiro/impl/src/main/java/org/opendaylight/aaa/impl/shiro/realm/MDSALDynamicAuthorizationFilter.java