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

Enum auto conversion issue #483

Open
wysohn opened this issue May 13, 2022 · 0 comments
Open

Enum auto conversion issue #483

wysohn opened this issue May 13, 2022 · 0 comments
Labels
bug Entire or partly plugin is not working as intended. category:need-more-info The issue still hasn't been fully clarified. help wanted package:core Related to share domain nor script interpreter

Comments

@wysohn
Copy link
Member

wysohn commented May 13, 2022

Likely the methods returned by Java.lang.Class.getMethods() is in random order, so the parameter checking should be in a proper order

  1. Check for String parameter. If both String and Enum parameters exist, just use the String one. This is an ambiguous case, but if the method is overloaded and String and Enum are used in the same place, the original author of the method probably intended the user to use the method instead of converting the String to Enum
  2. Check for an Enum parameter. If the input is String and the paramter is Enum, do the conversion.
  3. Signature mismatch. An Exception will be thrown
@wysohn wysohn added bug Entire or partly plugin is not working as intended. help wanted package:core Related to share domain nor script interpreter labels May 13, 2022
@wysohn wysohn moved this to 🌳 Backlog in TriggerReactor 3.4.x Aug 10, 2023
@wysohn wysohn moved this to Todo in TriggerReactor 3.5.x Sep 9, 2023
@wysohn wysohn added the category:need-more-info The issue still hasn't been fully clarified. label Sep 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Entire or partly plugin is not working as intended. category:need-more-info The issue still hasn't been fully clarified. help wanted package:core Related to share domain nor script interpreter
Projects
Development

No branches or pull requests

1 participant