harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Zhang <zhanghuang...@gmail.com>
Subject Re: svn commit: r396013 - in /incubator/harmony/enhanced/classlib/trunk/modules/luni/src: main/java/java/net/Inet6Address.java main/java/java/net/InetAddress.java test/java/tests/api/java/net/Inet6AddressTest.java
Date Mon, 24 Apr 2006 08:14:19 GMT
Anton Avtamonov wrote:
> On 4/24/06, Andrew Zhang <zhanghuangzhu@gmail.com> wrote:
>> Stepan Mishura wrote:
>>> Hi,
>>>
>>> I thought that we agreed on utilizing JUnit's exception handling (see [1]).
>>> So the next code from added unit test doesn't follow this convention. Also
>>> why it checks the same code twice?
>>>
>>> try {
>>>     Inet6Address.getByAddress("123", addr2, 3);
>>> } catch (UnknownHostException e) {
>>>     fail("no exception should be thrown");
>>> }
>>> try {
>>>     Inet6Address.getByAddress("123", addr2, 3);
>>> } catch (UnknownHostException e) {
>>>     fail("no exception should be thrown");
>>> }
>> Sorry, it's a mistake. It's assumed use "-1" in the second case.
>> I'll upload a patch right away.
> 
> And as we discussed try/catch is not required here, right?

Yes. We should add throws declaration on the method.
> 
> --
> Anton Avtamonov,
> Intel Middleware Products Division
> 
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
> 
> 



---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Mime
View raw message