RFR (4th): 8023524: Mechanism to dump generated lambda classes / log lambda code generation
Peter Levart
peter.levart at gmail.com
Wed Oct 2 16:10:53 UTC 2013
On 10/02/2013 05:17 PM, Henry Jen wrote:
>>> >>One thing to watch though is that Paths.get(String) can throw InvalidPathException. This will render InnerClassLambdaMetafactory non-functional since its static initialization will throw exception. Each lambda capture will than throw Error. I think the exception should be caught, logged and null returned from ProxyClassesDumper.create() in that case...
>> >
>> >yes, nice catch.
> I had it in there earlier, but need that in exception message. Since it is called only by InnerClassMetaFactory, which I think won't cause that exception so I just let it be.
It's called by InnerClassMetaFactory, yes, but the path string comes
from system property (the user!).
>
> That's not a good idea if consider dumper to be a reusable component.
I agree, but you should handle the exception in static initializer of
InnerClassMetaFactory then.
Regards, Peter
>
> Cheers,
> Henry
More information about the core-libs-dev
mailing list