1. Atlassian
  2. Project: Atlassian
  3. atlassian-soy-templates

Commits

Don Willis [Atlassian]  committed 1754721

SOY-3 Always create default Injector first

- Having established that creating the default injector after the other injectors breaks them, ensured that defaultinjector initalisation _always_ happens first.

  • Participants
  • Parent commits 67b24da
  • Branches master

Comments (0)

Files changed (2)

File soy-template-plugin/src/main/java/com/atlassian/soy/impl/SoyDependencyInjectorFactory.java

View file
  • Ignore whitespace
 
     private Injector makeInjectorForKeys(FunctionModuleData data, SoyDataConverter soyDataConverter)
     {
+        Injector defaultInjector = defaultInjectorRef.get();
         if (data.getSoyFunctions().isEmpty() && data.getWrappedFunctions().isEmpty())
         {
-            Injector defaultInjector = defaultInjectorRef.get();
             return defaultInjector;
         }
 

File soy-template-plugin/src/test/java/com/atlassian/soy/impl/SoyDependencyInjectorFactoryTest.java

View file
  • Ignore whitespace
     }
 
     // SOY-3
-    // Fails because constructing the default injector breaks subsequent injectors
-    @Ignore
     @Test
     public void testExtraAndNoExtraInterspersed() throws Exception
     {