dataverse icon indicating copy to clipboard operation
dataverse copied to clipboard

Overload DatasetField method to remove type check

Open bencomp opened this issue 2 years ago • 3 comments

What this PR does / why we need it:

It replaces a method that did a string comparison on the class name of an Object parameter to determine what to do by two methods that have the expected parameter types. This improves type safety by allowing the compiler to check types.

Which issue(s) this PR closes:

Closes #1240, removes a TODO from the codebase and relates to #9021.

Special notes for your reviewer: I added a few basic unit tests so that the coverage doesn't decrease with the new methods.

Suggestions on how to test this: Please check that the logic of the new tests makes sense and that they pass like the existing unit tests.

Does this PR introduce a user interface change? If mockups are available, please link/include them here: No.

Is there a release notes update needed for this change?: No.

Additional documentation:

bencomp avatar Oct 03 '22 00:10 bencomp