[ https://issues.apache.org/jira/browse/SLING-10068?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kyle Giovannetti updated SLING-10068: ------------------------------------- Description: When using the caconfig mocking plugin as per the example here: [https://github.com/apache/sling-org-apache-sling-testing-caconfig-mock-plugin/blob/master/src/test/java/org/apache/sling/testing/mock/caconfig/ContextPluginsTest.java] If the tests are located inside an inner class annotated with the `@Nested` annotation, then a NPE occurs: {code:java} java.lang.NullPointerExceptionjava.lang.NullPointerException at org.apache.sling.testing.mock.caconfig.MockContextAwareConfig.writeConfiguration(MockContextAwareConfig.java:101) at org.apache.sling.testing.mock.caconfig.MockContextAwareConfig.writeConfiguration(MockContextAwareConfig.java:125) at org.apache.sling.testing.mock.caconfig.MockContextAwareConfig.writeConfiguration(MockContextAwareConfig.java:113) {code} was: When using the caconfig mocking plugin as per the example here: [https://github.com/apache/sling-org-apache-sling-testing-caconfig-mock-plugin/blob/master/src/test/java/org/apache/sling/testing/mock/caconfig/ContextPluginsTest.java] If the tests are located inside an inner class annotated with the `@Nested` annotation, then a NPE occurs: {code:java} java.lang.NullPointerExceptionjava.lang.NullPointerException at org.apache.sling.testing.mock.caconfig.MockContextAwareConfig.writeConfiguration(MockContextAwareConfig.java:101) at org.apache.sling.testing.mock.caconfig.MockContextAwareConfig.writeConfiguration(MockContextAwareConfig.java:125) at org.apache.sling.testing.mock.caconfig.MockContextAwareConfig.writeConfiguration(MockContextAwareConfig.java:113) {code} > CAConfig Mock Plugin: NPE when using `@Nested` tests > ---------------------------------------------------- > > Key: SLING-10068 > URL: https://issues.apache.org/jira/browse/SLING-10068 > Project: Sling > Issue Type: Bug > Components: Testing > Affects Versions: Context-Aware Configuration Mock Plugin 1.3.2 > Reporter: Kyle Giovannetti > Priority: Minor > > When using the caconfig mocking plugin as per the example here: > > [https://github.com/apache/sling-org-apache-sling-testing-caconfig-mock-plugin/blob/master/src/test/java/org/apache/sling/testing/mock/caconfig/ContextPluginsTest.java] > > If the tests are located inside an inner class annotated with the `@Nested` > annotation, then a NPE occurs: > > {code:java} > java.lang.NullPointerExceptionjava.lang.NullPointerException > at > org.apache.sling.testing.mock.caconfig.MockContextAwareConfig.writeConfiguration(MockContextAwareConfig.java:101) > > at > org.apache.sling.testing.mock.caconfig.MockContextAwareConfig.writeConfiguration(MockContextAwareConfig.java:125) > > at > org.apache.sling.testing.mock.caconfig.MockContextAwareConfig.writeConfiguration(MockContextAwareConfig.java:113) > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)