Ah-HA

I think I found the NPE. In the merged code, there's a bit of
polymorphic gobbledygook in the AbstractMethod family of ICallables.
In this case, the AliasMethod inherits the pre/post code from
AbstractMethod, and overrides call to use the pre/post of its
contained method. However, when an alias wraps an alias, it's not
correctly calling the pre/post of the contained alias's contained
method, resulting in the wrong pre/post code being called and
whammo...a DefaultMethod is invoked with a null Scope present.

It's actually something I was fixing last night for other reasons,
since it occurred to me that the inherited behavior from
AbstractMethod is overridden in almost all cases and the default was
just waiting to be called incorrectly. Your find is a timely one. I'll
see what I can do.

- Charlie

On 2/4/06, Charles O Nutter <[EMAIL PROTECTED]> wrote:
> When I applied that patch, TestRegexpTranslator started spitting out a
> failure immediately. I'm looking into that, but here's the failure if
> you'd like to have a go:
>
>     [junit] Testsuite: org.jruby.test.MainTestSuite
>     [junit] Tests run: 134, Failures: 1, Errors: 0, Time elapsed: 11.346 sec
>     [junit] Testcase:
> testThreeDigitOctal(org.jruby.TestRegexpTranslator):    FAILED
>     [junit] \477; withComments=false expected:<......> but was:<...0...>
>     [junit] junit.framework.ComparisonFailure: \477;
> withComments=false expected:<......> but was:<...0...>
>     [junit] at 
> org.jruby.TestRegexpTranslator.verifyTranslation(TestRegexpTranslator.java:39)
>     [junit] at 
> org.jruby.TestRegexpTranslator.testThreeDigitOctal(TestRegexpTranslator.java:34)
>
> On 2/4/06, David Corbin <[EMAIL PROTECTED]> wrote:
> > Charles -
> >
> > The merge of your branch "ignored" the class I had previously extracted for
> > translating Ruby regexs to Java regexs.  I've attempted to a) correct that
> > part, and b) get that "octal" bug working again, but now I'm getting an NPE
> > deep in the heart of interpertation.
> >
> > Could you try the attached patch, and see if you can figure it out?
> >
> > Thanks.
> > David
> >
> >
> >
>
>
> --
> Charles Oliver Nutter @ headius.blogspot.com
> JRuby Developer @ jruby.sourceforge.net
> Application Architect @ www.ventera.com
>


--
Charles Oliver Nutter @ headius.blogspot.com
JRuby Developer @ jruby.sourceforge.net
Application Architect @ www.ventera.com


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642
_______________________________________________
Jruby-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jruby-devel

Reply via email to