From: Leo S. M. <leo...@gm...> - 2009-08-24 06:29:21
|
Hi, Other than debugging, is there a useful purpose on duplicating Py#findClass code in Py#findClassEx? Anything stupid on making findClass(name) simply call findClass(name, "unknown reason") or something like that? Regards, -- Leo Soto M. http://blog.leosoto.com |
From: Frank W. <fwi...@gm...> - 2009-08-25 02:07:19
|
On Mon, Aug 24, 2009 at 2:29 AM, Leo Soto M.<leo...@gm...> wrote: > Hi, > > Other than debugging, is there a useful purpose on duplicating > Py#findClass code in Py#findClassEx? > > Anything stupid on making findClass(name) simply call findClass(name, > "unknown reason") or something like that? Assuming you mean have the body of findClass(name) be findClassEx(name, "unknown reason") Unfortunately the exceptions that are thrown have different semantics (findClass always returns null and findClassEx sometimes throws real exceptions). It *is* hard to look at the code duplication though... -Frank |
From: Leo S. M. <leo...@gm...> - 2009-08-25 03:02:28
|
On Mon, Aug 24, 2009 at 9:39 PM, Frank Wierzbicki<fwi...@gm...> wrote: > On Mon, Aug 24, 2009 at 2:29 AM, Leo Soto M.<leo...@gm...> wrote: > > Anything stupid on making findClass(name) simply call findClass(name, > > "unknown reason") or something like that? > > Assuming you mean have the body of findClass(name) be > findClassEx(name, "unknown reason") > > Unfortunately the exceptions that are thrown have different semantics > (findClass always returns null and findClassEx sometimes throws real > exceptions). Oh, right. Good thing I asked :) Well, I think we can still refactor the common body to a single method and call it from findClassEx and findClass, while keeping the different exception handling code on each version. Or am I missing something again? -- Leo Soto M. http://blog.leosoto.com |
From: Frank W. <fwi...@gm...> - 2009-08-25 11:45:02
|
On Mon, Aug 24, 2009 at 11:02 PM, Leo Soto M.<leo...@gm...> wrote: > Well, I think we can still refactor the common body to a single method > and call it from findClassEx and findClass, while keeping the > different exception handling code on each version. Or am I missing > something again? I think that this refactoring sounds very reasonable -- though we should probably put out 2.5.1 before messing with classloader code unless it fixes bugs. -Frank |
From: Leo S. M. <leo...@gm...> - 2009-08-25 12:46:49
|
On Tue, Aug 25, 2009 at 7:44 AM, Frank Wierzbicki<fwi...@gm...> wrote: > On Mon, Aug 24, 2009 at 11:02 PM, Leo Soto M.<leo...@gm...> wrote: >> Well, I think we can still refactor the common body to a single method >> and call it from findClassEx and findClass, while keeping the >> different exception handling code on each version. Or am I missing >> something again? > I think that this refactoring sounds very reasonable -- though we > should probably put out 2.5.1 before messing with classloader code > unless it fixes bugs. Yeah, I'll hold my changes until 2.5.1 is out. -- Leo Soto M. http://blog.leosoto.com |
From: Frank W. <fwi...@gm...> - 2009-08-25 13:17:56
|
On Tue, Aug 25, 2009 at 8:46 AM, Leo Soto M.<leo...@gm...> wrote: > Yeah, I'll hold my changes until 2.5.1 is out. By the way, I'm really glad you are looking hard at this stuff, it is in need of attention. Thanks! -Frank |