Dain Sundstrom wrote:
[...] This problem type of problem is very difficult to find and is easily avoided by putting all field declarations at the top of the file followed by any static initializers.

What do you think of changing the coding standards to have all fields at the top of the file?

+1

Surprisingly, the Sun coding conventions have nothing to say about the position of static initializers.

If anyone is interested I could implement a Checkstyle rule that prevents such errors.

Lars

Reply via email to