I have a java class which inherits the static method objectId() from http://commons.apache.org/logging/apidocs/org/apache/commons/logging/impl/LogFactory.html
When I migrated my codebase from jruby 1.4 to 1.5, my app started breaking because a const_missing call ended up dying in activesupport/.../introspection.rb where it was polling .object_id of a variety of constants. It seems that the wrapper for SomeJavaClass maps .object_id to SomeJavaClass.objectId(arg1), and was dying in a 0 for 1 argument error.
JavaUtil.getRubyCasedName(...) seems to be involved, however, i believe i tracked down the core issue here:
- RESERVED_NAMES.put("object_id", new AssignedName("object_id", Priority.RESERVED));
It's not clear to me why "object_id" would be removed from RESERVED_NAMES but "_id_" was not. Was this change made in error? Should object_id have been added to STATIC_RESERVED_NAMES and/or INSTANCE_RESERVED_NAMES? (my case deals with STATIC, but I can see this affecting INSTANCEs as well)
I fixed the regression locally by reverting the one line of the change
+ RESERVED_NAMES.put("object_id", new AssignedName("object_id", Priority.RESERVED));