Re: RFC: Fix mistake in backport of S8010118
Jacob Wisor
gitne at excite.co.jp
Tue Jul 16 14:08:46 PDT 2013
"Andrew Hughes"<xxxxxxxxxxx at redhat.com> wrote:
> ----- Original Message -----
> > Hi,
> >
> > I made a mistake when trying to backport S8010118 (Annotate jdk caller
> > sensitive methods with @sun.reflect.CallerSensitive). I had assumed
> > DriverManager.getCallerClass() returns the class of the caller (what
> > Reflection.getCallerClass() does). But it does something completely
> > different.
As far as I understand, the problem here was missing or incomplete documentation of methods, maybe misinterpretation or misreading. I cannot judge on the quality of this patch, because it is really difficult to understand what is going on and what it actually fixes. But, it looks like the core problem has been removed, namely misleading documentation and new has been added, so I guess the code is better than before. ;) Good work!
> > The attached patch fixes the mistake by introducing a new getCallerClass
> > method. This is similar to what's done in 7u [1] with the new
> > isDriverAllowed(Driver,Class<?>) method. This patch also ensures that
> > the resulting 8010118-caller_sensitive.patch does not remove any
> > getCallerClass methods.
> >
> > Okay to push to HEAD?
> >
> > Thanks,
> > Omair
> >
> > [1] http://hg.openjdk.java.net/jdk7u/jdk7u-dev/jdk/rev/d0e8dd6dd7a5
> > --
> > PGP Key: 66484681 (http://pgp.mit.edu/)
> > Fingerprint = F072 555B 0A17 3957 4E95 0056 F286 F14F 6648 4681
> >
>
> I guess. I'm not really familiar with the original patch and it's
> pretty difficult to understand what this one changes.
> --
> Andrew :)
Regards,
Jacob
More information about the distro-pkg-dev
mailing list