import java.awt.datatransfer.DataFlavor; /** * This demonstrates what might be a compiler bug. * * When compiled with javac of 1.4.2_01 (no other Java version tested) this * emits "null". However, When however compiled with Eclipse 3.0M3 (no other * versions tested) this emits a DataFlavor instance - as I'd have expected. */ public class InitializerBug { static final DataFlavor f = new DataFlavor(B.class, ""); static class B { static final Object[] fs = new Object[] { f }; } public static void main(String[] a) { System.out.println(B.fs[0]); } }