File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed
src/NHibernate/Collection/Generic/SetHelpers Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -120,16 +120,10 @@ void ICollection.CopyTo(Array array, int index)
120120 return ;
121121 }
122122
123- if ( array . GetType ( ) . GetElementType ( ) . IsAssignableFrom ( typeof ( T ) ) )
124- {
125- if ( _hasNull )
126- array . SetValue ( default ( T ) , index ) ;
127- ICollection keysCollection = _values . Keys ;
128- keysCollection . CopyTo ( array , index + ( _hasNull ? 1 : 0 ) ) ;
129- return ;
130- }
131-
132- throw new ArgumentException ( $ "Array must be of type { typeof ( T [ ] ) } .", nameof ( array ) ) ;
123+ if ( _hasNull )
124+ array . SetValue ( default ( T ) , index ) ;
125+ ICollection keysCollection = _values . Keys ;
126+ keysCollection . CopyTo ( array , index + ( _hasNull ? 1 : 0 ) ) ;
133127 }
134128
135129 public int Count => _values . Count + ( _hasNull ? 1 : 0 ) ;
You can’t perform that action at this time.
0 commit comments