Skip to content

Split DuplicatePropertyNamesChecker #611

Description

@Lingxi-Li

This DuplicatePropertyNamesChecker class is used by both reader and writer. Yet, for writer, only a very limited part of its functionality has been actually used. Specifically, only 3/14 methods in its interface are used by writer.

Method Reader Writer
CheckForDuplicatePropertyNames O O
CheckForDuplicatePropertyNamesOnNestedResourceInfoStart O
CheckForDuplicatePropertyNamesAndGetAssociationLink* O O
CheckForDuplicateAssociationLinkNamesAndGetNestedResourceInfo* O O
Add/GetODataScopeAnnotation(s) O
Add/GetCustomScopeAnnotation(s) O
Add/GetODataPropertyAnnotation(s) O
Add/GetCustomPropertyAnnotation(s) O
MarkPropertyAsProcessed O
CheckIfPropertyOpenForAnnotations O

Moreover, with respect to the two asterisk-marked methods, the return value is not used by writer. That is, the record-keeping work done is unnecessary on the writer side.

Therefore, the task is to:

  • Extract from the heavy DuplicatePropertyNamesChecker class a new light-weight and specialized class for writer use. This gives improved performance on writer side.
  • Rename DuplicatePropertyNamesChecker. The class does much more than just checking for duplicate property names. This improves code maintainability.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions