Usage examples for non-deprecated APIs?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Usage examples for non-deprecated APIs?


Are there any usage examples out there for using the newer non-deprecated APIs such as Environment?

If you follow the documentation on the Shiro site, for example, you're told to use the IniSecurityManagerFactory class. This is deprecated and the deprecation notice points you at the Environment interface. There's no documentation on this that I can see, but with a bit of exploration in the IDE, I came up with this:


Unfortunately, with a bare-bones config.ini, the program says:

Exception in thread "main" java.lang.IllegalStateException: No SecurityManager found in Environment.  This is an invalid environment state.
        at org.apache.shiro.env.DefaultEnvironment.getSecurityManager(
        at com.io7m.shiro.examples.Example0.main(

I've tried searching on GitHub for code that uses these interfaces, and the Shiro codebase for examples, but there just doesn't seem to be anything. What am I missing?