RFR: 8023524: Mechanism to dump generated lambda classes / log lambda code generation
Henry Jen
henry.jen at oracle.com
Wed Sep 18 16:00:14 PDT 2013
On 09/18/2013 04:56 AM, Florian Weimer wrote:
> On 09/18/2013 08:18 AM, Henry Jen wrote:
>> Hi,
>>
>> Please review the webrev at
>> http://cr.openjdk.java.net/~henryjen/ccc/8023524/0/webrev/
>>
>> This webrev enable writing generated classes for lambda to disk at a
>> directory specified with -Djdk.internal.lambda.dumpProxyClasses.
>
> + File out = new File(dirPath, lambdaClassName.replace('/', '.') +
> ".class");
>
> Class names can contain '\' and other characters which are problematic
> on Windows.
>
Thanks for reviewing, I suspect you are pointing out a potential issue
to look at, not that the problem exists in current implementation.
According to JLS 3.8, the classname(an identifier) can only have
letters, digits, plus '_' and '$'.
The '/' is converted from '.' earlier from, thus there won't be '\'
involved as separator.
Therefore, I think we are safe here.
Cheers,
Henry
More information about the lambda-dev
mailing list