Community
Participate
Working Groups
Build Identifier: 20110615-0604 If we have a field called e.g. "OID", getter and setter are generated as follows: /** @return The oID. */ public int getOID() { return OID; } /** @param oID The oID to set. */ public void setOID(int oID) { OID = oID; } However they should be ("OID" instead of "oID"): /** @return The OID. */ public int getOID() { return OID; } /** @param OID The OID to set. */ public void setOID(int OID) { this.OID = OID; } I know spec recommends to call field as "oid", but "OID" is inevitable here. Reproducible: Always Steps to Reproduce: 1. Create a field with two first letters upper-cased 2. Generate getter and setter for it
Btw the constructor too: public MyClass(int oID, String desc) { OID = oID; this.desc = desc; }
Setters for constants are fairly uncommon (see also bug 85782 comment 1), however I think we can leave the first character in the parameter as is if the first 2 characters in the field name are uppercase.
Here it is not a constant, it is "private int OID;". I know this is not recommended, however we should follow some forced legacy standards for a couple of classes. In any case I like your suggestion: > we can leave the first character in the parameter as is if the first 2 characters in the field name are uppercase
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.