Uploaded image for project: 'Spring.NET'
  1. Spring.NET
  2. SPRNET-1184

Fix TypeNameAutoProxyCreator to use <list/> element for the TypeNames property

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 1.3.0 RC1, 1.3.0
    • Fix Version/s: 1.3.1
    • Labels:
      None

      Description

      supose xml:
      <object type="Spring.Aop.Framework.AutoProxy.TypeNameAutoProxyCreator, Spring.Aop" >
      <property name="TypeNames" >
      <list>
      <value>MyTypeName</value>
      </list>
      </property>
      <property name="InterceptorNames" >
      <list>
      <value>MyInterceptor</value>
      </list>
      </property>
      </object>

      I created new XmlApplicationContext('CONFIG_PATH')
      and Spring throws exception NullReferenceException.

      Cause: _typeNameFilter is equal null

      Code:
      public class TypeNameAutoProxyCreator : AbstractFilteringAutoProxyCreator
      {
      private TypeNameTypeFilter _typeNameFilter = null;
      public string[] TypeNames
      {
      get

      { return _typeNameFilter.TypeNamePatterns; }

      set

      { AssertUtils.ArgumentNotNull(value, "TypeNames"); _typeNameFilter = new TypeNameTypeFilter(value); }

      }

        Attachments

          Activity

            People

            • Assignee:
              bbaia Bruno Baia
              Reporter:
              alexpetr Alexey Petriashev
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: