Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Fail gracefully when inner class const_missing finds nothing #5835
This should fix the issue reported as a comment in ruboto/JRuby9K_POC#7.
The issue here appears to be that non-existent inner classes are not handled properly; the resulting null or nil values fail to cast to expected types and the superclass const_missing fallback never triggers.
The change I have here uses a different path for acquiring a reference to the proxy class, which then allows the fallback to fire properly.
The logic here does not properly handle the case where the inner class does not resolve to anything. When this happens, the proxy class is null, which has a java_class of nil, and then it blows up trying to cast it.