Javac internal error compiling lambdas
jgetino at telefonica.net
Wed Apr 3 23:22:14 PDT 2013
> I hijack the thread :) not you, sorry for the confusion.
and sorry for the mine :)
>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.
It is not just like this. I declare the prosperities as static fields near
the fields that defines them, mostly in interfaces. Some time ago I used
reflection to define properties, but they were prone to error when
refactoring, so I changed to lambdas when available. Now I can rename the
field without caring about the property.
Another class, a configuration class, register all configurable constants
along the code in a map<String,Property>, provides default factory values to
them , overrides the default values with the ones readed from several
configuration files and, on closing the application uses the properties map
to update the configuration files. So the files are readed and written in
normal, not static code. It's only the property declaration which is static
More information about the lambda-dev