Java: improve warning messages and don't fail silently on anonymous and local classes...