Initial proof of concept for implementation of -Xlint:hiddenclass

Fredrik Öhrström oehrstroem at
Thu Sep 20 08:57:17 PDT 2012

2012/9/20 Joel Borggrén-Franck <joel.franck at>:
> I can't find where you check that you are actually accessing a class outside your file, is that check missing?

You are right, it was part of the first patch.
"!fm.isSameFile(c.sourcefile, env.toplevel.sourcefile)"

> Also, IIRC we aren't supposed to use j.l.model inside javac you can rewrite ClassReader change to:
> +                    if (c.owner.kind == Kinds.PCK &&
> +                        !n.toString().equals(".java")) {
> +                        c.flags_field |= AUXILIARY;
> +                    }

That looks better. Thanks!


More information about the compiler-dev mailing list