I'm a big fan of concise method names, so when our codebase has something like:
Account.getAccountId();
I like to add an alias so that I can just do:
Account.getId();
However, I've heard ... murmurs from elsewhere in my company about how this might be problematic, because the getId I define will interfere with a built-in getId that all Java objects have, or something like that. Also we use JRuby to reference our old Java classes, so the issue might have something to do with a built-in Ruby getId method too.
Still, I'm not entirely convinced that there is a problem (and I really like my short method names). So, does anyone out there know whether there are problems with defining getId methods (either in Java or JRuby), and if so what are they and can they be worked around?
EDIT: It seems from the responses so far (and what I already knew about Java) that the issue can't be with some core Java getId functionality (as there is none). So really this question is for JRuby people; if the getId "conflict" is coming from anywhere, it's got to be from JRuby stuff.