Uploaded image for project: 'Shiro'
  1. Shiro
  2. SHIRO-513

Misleading error message when using custom WebEnvironment

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 1.2.3
    • Fix Version/s: 1.3.0
    • Component/s: Web
    • Labels:
      None

      Description

      Found while reading the code in EnvironmentLoader#createEnvironment():

              Class<?> clazz = determineWebEnvironmentClass(sc);
              if (!MutableWebEnvironment.class.isAssignableFrom(clazz)) {
                  throw new ConfigurationException("Custom WebEnvironment class [" + clazz.getName() +
                          "] is not of required type [" + WebEnvironment.class.getName() + "]");
              }
      

      The message says you need a WebEnvironment, the check (and later code) however requires _Mutable_WebEnvironment.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                ankon Andreas Kohn
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: