harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexei Zakharov" <alexei.zakha...@gmail.com>
Subject Re: [classlib][ldap] going to eliminate using public method to access private field
Date Thu, 22 Feb 2007 09:05:47 GMT
It looks like the ordinary compatibility issue. IMHO should be fixed.

Thanks,

2007/2/22, Mikhail Loenko <mloenko@gmail.com>:
> I'm fixing style of the javax.naming.ldap.LdapName
>
> Among other things it uses its public method
>
>     public List getRdns() {
>         return rdns;
>     }
>
> to access its private field rdns, like this:
>
>     public boolean isEmpty() {
>         return getRdns().size() == 0;
>     }
>
> but if I do
>
>        List l = new LinkedList();
>
>        LdapName ln = new LdapName(l) {
>            public List getRdns() {
>               throw new Error();
>            }
>
>        };
>
>        ln.isEmpty();
>
> on RI it does not throw Error. So I'm going to replace getRdns() with just rdns.
>
> If there are objections please speak up now
>
> Thanks,
> Mikhail


-- 
Alexei Zakharov,
Intel ESSD

Mime
View raw message