Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid useless object creation by delegating to TypeFactory #41

Merged
merged 3 commits into from
Aug 9, 2024

Conversation

apmoriarty
Copy link
Collaborator

@apmoriarty apmoriarty commented Jul 31, 2024

This should not be merged until NationalSecurityAgency/datawave-type-utils#35 is integrated into a tag of type-utils.

The getDatatypeFromClass method is used in three locations, none of which require a new Type instance

  • getAllDatatypes() -- ultimately returns a set of Types
  • getFieldsToDatatypes() -- returns a multimap of Fields to Type, ultimately used to return a set of Types for a field
  • MetadataHelper's getDatatypeFromClass(), which is just an unused wrapper method

mineralntl
mineralntl previously approved these changes Jul 31, 2024
Copy link
Collaborator

@mineralntl mineralntl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fine as long as the TypeFactory changes don't break anything

@apmoriarty apmoriarty merged commit faf5003 into main Aug 9, 2024
2 checks passed
@apmoriarty apmoriarty deleted the task/integrate-type-factory branch August 9, 2024 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants