On Thu, Apr 9, 2015 at 7:40 PM, Shawn Heisey <[email protected]> wrote:

> On 4/9/2015 3:50 AM, Varun Thacker wrote:
> > I think it could be a good idea to add it to the forbidden-apis check.
> > I'm unsure if we can do that though, since its just one method.
>
> We can forbid specific versions of an overloaded method.  In the String
> class, toLowerCase() and toUpperCase() are forbidden, but the signatures
> toLowerCase(Locale) and toUpperCase(Locale) are allowed.
>
> One thing I do not know for sure is whether forbidden-apis allows a
> forbidden signature that includes a variable number of arguments.  I
> looked at some of the included signatures and couldn't tell.
>

It does. A var-arg is just an array e.g. I recently added
java.text.MessageFormat#format(java.lang.String,java.lang.Object[]) to
forbidden-apis.


>
> Thanks,
> Shawn
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>


-- 
Regards,
Shalin Shekhar Mangar.

Reply via email to