Commit e55224c
Switch the pre22 warning to use CopyOnWriteArraySet. (#23969)
This data structure is better for cases where writes are rare and reads common. When this warning path is it, the writes only occur exactly once per CVE-affected type, and reads occur once per every parse of those types.
Broadly people sensitive by this performance concern should really regen their gencode, but this should help take the edge off of people who first upgrade to 4.x and then look to incrementally regen any ancient gencode.
Fixes #23963
PiperOrigin-RevId: 819238880
Co-authored-by: Protobuf Team Bot <[email protected]>1 parent a7f14ce commit e55224c
File tree
1 file changed
+2
-3
lines changed- java/core/src/main/java/com/google/protobuf
1 file changed
+2
-3
lines changedLines changed: 2 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
34 | 33 | | |
35 | 34 | | |
36 | 35 | | |
37 | 36 | | |
38 | 37 | | |
39 | 38 | | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
416 | 416 | | |
417 | 417 | | |
418 | 418 | | |
419 | | - | |
420 | | - | |
| 419 | + | |
421 | 420 | | |
422 | 421 | | |
423 | 422 | | |
| |||
0 commit comments