You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Konrad Windszus (Jira)" <ji...@apache.org> on 2022/06/01 06:53:00 UTC

[jira] [Created] (SLING-11362) Potential ClassCastException in SlingContextImpl.tearDown

Konrad Windszus created SLING-11362:
---------------------------------------

             Summary: Potential ClassCastException in SlingContextImpl.tearDown
                 Key: SLING-11362
                 URL: https://issues.apache.org/jira/browse/SLING-11362
             Project: Sling
          Issue Type: Bug
          Components: Testing
    Affects Versions: Testing Sling Mock 3.3.0
            Reporter: Konrad Windszus


In https://github.com/apache/sling-org-apache-sling-testing-sling-mock/blob/9d147a8127a6ada5a82e5c2b7e875febf2d93b89/core/src/main/java/org/apache/sling/testing/mock/sling/context/SlingContextImpl.java#L220 the request attribute with key {{SlingBindings.class.getName()}} is unconditionally casted to {{MockSlingBindings}} which may fail in case the test case modified the request attribute to another SlingBindings implementation.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)