Javac internal error compiling lambdas

Remi Forax forax at univ-mlv.fr
Wed Apr 3 16:30:52 PDT 2013


On 04/04/2013 12:45 AM, Jose wrote:
> Remi,
>   
> >Again hijacking the thread,
>   
> This is the first time I write something in another’s thread, you can easily check it if you want.
> And I did so because I’m worry with this issue.
> My own question (the first thread of this month) got not a replay,
> just your post asking me for the error message.

I hijack the thread :) not you, sorry for the confusion.

>   
> > there is no need to store a lambda in a static final field
>   
> Yes, there is, at least in my case. Sometimes I use lambdas to define custom properties that
> would initialize static fields by reading their values from a file.
> I do this static initialization at the very beginning, before the constructors
> of these classes are called. And I need the lambdas for this.

Reading a file during a static init is not something you should do.
Don't forget that the static init block is executed while holding a lock,
and doing IOs in a synchronized block (or something like a synchronized 
block)
is always a bad idea.

> Anyway, I’m ready to admit that this approach is heterodox and need to 
> be improved.
>
> But a poor design don’t justifies a javac failure.
>

yes, as I said, I was hijacking your thread.

> Regards
>

cheers,
Rémi



More information about the lambda-dev mailing list