[YANGTOOLS-695] yang.model.util.EffectiveAugmentationSchema is mutable Created: 18/Oct/16 Updated: 10/Apr/22 Resolved: 01/Nov/16 |
|
| Status: | Resolved |
| Project: | yangtools |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Robert Varga | Assignee: | Filip Gregor |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: All |
||
| External issue ID: | 6979 |
| Description |
|
This class has realChildSchemas field, which is initialized to the collection passed by the caller, some of whom use a HashSet. This means a mutable collection is leaked through getChildNodes(), allowing modification. This may be intentional or it may be a bug – analyze callers and make sure we either copy the Set or wrap it in Unmodifiable collection. Also address the FIXME at the top of the class, as the subclasses do not seem to exist. |
| Comments |
| Comment by Filip Gregor [ 27/Oct/16 ] |
| Comment by Robert Varga [ 27/Oct/16 ] |