bmhm commented on a change in pull request #240:
URL: https://github.com/apache/shiro/pull/240#discussion_r449874922



##########
File path: 
config/ogdl/src/test/groovy/org/apache/shiro/config/ogdl/ReflectionBuilderTest.groovy
##########
@@ -640,6 +643,20 @@ class ReflectionBuilderTest {
         assertNotNull(beanMap.get("two"))
     }
 
+    @Test
+    void testNotMultipleInitialization() {
+        // given
+        Map<String, String> defs = new ConcurrentHashMap<>()
+        defs.put("initcountbean", InitCountBean.getCanonicalName())
+        ReflectionBuilder builder = new ReflectionBuilder()
+
+        // when
+        builder.buildObjects(defs);
+
+        // then
+        assertEquals(1, InitCountBean.getInitCount())
+    }
+

Review comment:
       Can you add a test where `buildObjects(null)` is called FIRST? Because 
that actually happens in Shiro.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to