You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While this works in most cases, there are some situations where this does not work right/not compatible with IDE's generated setter and getter methods. For example, if a field name is iPhone, the IDEs generate setiPhone and getiPhone methods. Note the small i in the method names. The code above instead looks for setIPhone and getIPhone and ends up not finding the methods.
The fix is to examine the second character of the field name, if it is upper case, do not do anything and use the field name as is and prepend set/get/is. Otherwise, fallback to the existing code.
Currently, the accessor methods for a field are determined with -
While this works in most cases, there are some situations where this does not work right/not compatible with IDE's generated setter and getter methods. For example, if a field name is iPhone, the IDEs generate
setiPhone
andgetiPhone
methods. Note the smalli
in the method names. The code above instead looks forsetIPhone
andgetIPhone
and ends up not finding the methods.The fix is to examine the second character of the field name, if it is upper case, do not do anything and use the field name as is and prepend set/get/is. Otherwise, fallback to the existing code.
See #95 for more details.
The text was updated successfully, but these errors were encountered: