This repository was archived by the owner on Jan 23, 2023. It is now read-only.
Commit 1bb768c
Atsushi Kanamori
Fix 79 System.Data.Common.Test failures on ILC
These tests were null-referencing inside a IsReadOnly
property that looked up ReadOnlyAttributes in a collection
and invoked it without null-checking the lookup result.
The reason it's allowed to do that that is this
collection has some magic in it that lazily auto-populates
itself with the "default" value of the attribute
if the attribute itself isn't found on a lookup.
So as long a default exists, a lookup of this attribute
type never returns null.
Unfortunately, the "default" is discovered by reflecting
for a static field named "Default" on the attribute
type.1 parent e27f72b commit 1bb768c
File tree
1 file changed
+13
-0
lines changed- src/System.ComponentModel.TypeConverter/src/Resources
1 file changed
+13
-0
lines changedLines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
19 | 31 | | |
20 | 32 | | |
| 33 | + | |
0 commit comments