include_package implementation of const_missing doesn't call super if no Java 
class matches
-------------------------------------------------------------------------------------------

                 Key: JRUBY-4524
                 URL: http://jira.codehaus.org/browse/JRUBY-4524
             Project: JRuby
          Issue Type: Bug
          Components: Java Integration
    Affects Versions: JRuby 1.4
            Reporter: Robin Salkeld


This is a regression caused by the fix to JRUBY-3889. If a const_missing 
doesn't match any of the included packages, the "cannot load Java class ****" 
error from the last package is re-raised, even though the super implementation 
may be able to resolve it instead.

I'd suggest modifying the fix to JRUBY-3889 to add an additional catch clause 
to Java.get_java_class, one that catches ClassNotFoundExceptions and return 
nil. That way the fancy error chaining logic in the include_package 
const_missing implementation isn't necessary, but other loading errors are 
still percolated. :)

Test case pending, if desired.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to