TriggerReactor

TriggerReactor

24.6k Downloads

Enum auto conversion issue

wysohn opened this issue ยท 0 comments

commented

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