[rfc][icedtea-web] Rewrite of MethodOverloadResolver

Adam Domurad adomurad at redhat.com
Wed Jan 9 12:05:24 PST 2013


On 12/14/2012 03:43 PM, Adam Domurad wrote:
> Thought I'd do a simple patch to turn the test code embedded in 
> MethodOverloadResolver into a a proper unit test ... unfortunately, my 
> small look into this class lead me to find many subtle bugs -- and 
> coincidentally decide to do it properly. Lots of corner cases covered, 
> and it could probably use unit tests even still, but its a major 
> improvement and I'm a bit tired of looking at it so I'm posting it.
>
> Some broken things I uncovered included improper overloading order, 
> method/argument situations that would error-out if they ever occurred 
> (but were valid), and the fact that the JSObject used throughout the 
> class was actually a dummy value used at the bottom of the class. The 
> code was also made a lot cleaner in the process, in the interest of 
> 'doing it right' while fixing it.
> ChangeLog:
> 2012-12-14  Adam Domurad  <adomurad at redhat.com>
>
>     Rewrite of MethodOverloadResolver with detailed unittests.
>     * plugin/icedteanp/java/sun/applet/MethodOverloadResolver.java:
>     Rewritten to reduce duplicated code, fix very subtle bugs in
>     never-tested codepaths, obey spec properly. Introduced new helper 
> types
>     where Object[] arrays with special-meaning positions were passed
>     around.
>     * plugin/icedteanp/java/sun/applet/PluginAppletSecurityContext.java:
>     Updated to work with newly introduced types / refactored overload
>     resolver.
>     * tests/netx/unit/sun/applet/MethodOverloadResolverTest.java: 
> In-depth
>     unit tests of hairy details of method overloading in JS<->Java.
>
>
Ping?
-Adam



More information about the distro-pkg-dev mailing list