Initial proof of concept for implementation of -Xlint:hiddenclass
Fredrik Öhrström
oehrstroem at gmail.com
Thu Sep 20 08:57:17 PDT 2012
2012/9/20 Joel Borggrén-Franck <joel.franck at oracle.com>:
> 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(c.name.toString()+".java")) {
> + c.flags_field |= AUXILIARY;
> + }
That looks better. Thanks!
//Fredrik
More information about the compiler-dev
mailing list