Move AAAShiroProvider class in act into separate package 93/68093/1
authorMichael Vorburger <vorburger@redhat.com>
Thu, 8 Feb 2018 17:16:14 +0000 (18:16 +0100)
committerMichael Vorburger <vorburger@redhat.com>
Thu, 8 Feb 2018 17:16:14 +0000 (18:16 +0100)
commitaf52007f5cd7f15e901149de225086eed5332aaf
tree1c3579773d7770afd1afc74463a088f94d373bf4
parentc53aae6dc81a5e0b76320d342169366995da140b
Move AAAShiroProvider class in act into separate package

There are two classes named AAAShiroProvider both in package
org.opendaylight.aaa; one in artifact (and OSGi bundle) aaa-shiro and
another one in aaa-shiro-act.

As far as I understand the AAA code, this does not seem to be done
intentionally for any particular reason, probably just historical
copy/paste.

Under OSGi, this doesn't really cause any major issues (other than it
being "really not nice", possibly confusing, and theoretically causing
issues if one were to use package import), as the two AAAShiroProvider
are loaded into separate ClassLoaders in their respective bundles.

When attempting to use AAA in a (non-OSGi) flat classpath environment
however, then the present situation, leads to this error:

[main] ERROR org.apache.shiro.web.env.EnvironmentLoader - Shiro
environment initialization failed
java.lang.NoSuchMethodError:
org.opendaylight.aaa.AAAShiroProvider.getInstance()Lorg/opendaylight/aaa/AAAShiroProvider;
at org.opendaylight.aaa.shiro.web.env.KarafIniWebEnvironment.init(KarafIniWebEnvironment.java:67)

This change fixes above, for non-OSGi test envs, but seems a reasonable
clean up if for the standard deployment model of running ODL in OSGi.

Change-Id: Ia5d34e6f3ecf9d6539bdac9537b8628dcde59049
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
aaa-shiro-act/impl/src/main/java/org/opendaylight/aaa/act/AAAShiroProvider.java [moved from aaa-shiro-act/impl/src/main/java/org/opendaylight/aaa/AAAShiroProvider.java with 97% similarity]
aaa-shiro-act/impl/src/main/resources/org/opendaylight/blueprint/aaa-shiro-act-blueprint.xml