Dev Idea: compare object types using instanceof
instead of class names
#9021
Labels
Component: Code Infrastructure
formerly "Feature: Code Infrastructure"
Feature: None
No user-facing feature in particular
Type: Suggestion
an idea
User Role: Hackathon Participant
Core developers, frequent contributors, drive-by contributors, etc.
Overview of the Feature Request
This is a simple idea relating to code style and type safety: if you want to test whether an object is of a certain type, use the Java keyword
instanceof
.What kind of user is the feature intended for?
Developers.
What inspired the request?
A
TODO
comment asking if there was a better way to compare types.What existing behavior do you want changed?
No application behaviour should be changed; this is a small suggestion for refactoring. (I don't think this will be introduced again, though it's good to keep an eye out for developer behaviour.)
Any brand new behavior do you want to add to Dataverse?
No.
Any related open or closed issues to this feature request?
Well, #775 and #3950 are related to code style.
I already suggested changes in PRs #9010 and #9014.
The text was updated successfully, but these errors were encountered: