shiro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Dold (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SHIRO-513) Misleading error message when using custom WebEnvironment
Date Sun, 20 Nov 2016 08:48:58 GMT

    [ https://issues.apache.org/jira/browse/SHIRO-513?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15680801#comment-15680801
] 

Daniel Dold commented on SHIRO-513:
-----------------------------------

I think this bug is already fixed as the latest code is;

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

This is the proposed solution by [~ankon]

If so this ticket can be closed

> Misleading error message when using custom WebEnvironment
> ---------------------------------------------------------
>
>                 Key: SHIRO-513
>                 URL: https://issues.apache.org/jira/browse/SHIRO-513
>             Project: Shiro
>          Issue Type: Bug
>          Components: Web
>    Affects Versions: 1.2.3
>            Reporter: Andreas Kohn
>            Priority: Trivial
>
> Found while reading the code in EnvironmentLoader#createEnvironment():
> {code}
>         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() +
"]");
>         }
> {code}
> The message says you need a WebEnvironment, the check (and later code) however requires
_Mutable_WebEnvironment.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message