Details
-
Sub-task
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.5.6
-
None
-
None
Description
Disable overriding via MOP for the following interfaces, classes and methods
java.lang.CharSequence charAt(int) length() subSequence(int, int) java.lang.Comparable compareTo(T) java.lang.Number byteValue() doubleValue() floatValue() intValue() longValue() shortValue() java.lang.Object equals(Object) getClass() hashCode() toString() java.lang.Boolean <all methods> java.lang.Byte <all methods> java.lang.Short <all methods> java.lang.Integer <all methods> java.lang.Long <all methods> java.lang.Double <all methods> java.lang.Float <all methods> java.lang.Enum getDeclaringClass() name() ordinal() java.lang.String <all methods> java.lang.StringBuffer <all methods> java.lang.StringBuilder <all methods>
Overriding these methods
- does not make sense,
- adds significant runtime overhead to GDK methods,
- is not thoroughly respected by runtime libraries, epecially the JRE, and
- would require to change class file generation (e.g. for concatenated literals).
This issue is related to http://jira.codehaus.org/browse/GROOVY-2599.