harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikhail Markov (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-2973) [classlib] [luni] Concerns about synchronization in java.net.InetAddress
Date Thu, 18 Jan 2007 12:24:30 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-2973?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12465740

Mikhail Markov commented on HARMONY-2973:

You've convinced me :-) - 1000 ms for wait will be fine.
I'll repost modified patch for easier integration. Could you please set "patch available"
tag after that?

As for '&&' vs '||': the cycle should be exited if 'reached' became true or if 'addrCount'
 became 0, inverting this statement we'll get the statement for while loop: go to next iteration
while 'reached' != true && 'addrCount' != 0. So '&&'  seems correct to me.

(Another reason that the statement is correct is testing: if "&&" was incorrect then
all the tests using this method failed due to ant timeout as they iterate indefinitely, because
reached could not be true at the same time when addrCount = 0 :-))

> [classlib] [luni] Concerns about synchronization in java.net.InetAddress
> ------------------------------------------------------------------------
>                 Key: HARMONY-2973
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2973
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Sian January
>         Attachments: H-2973.patch
> FindBugs raised two concerns about synchronization in InetAddress.isReachableByMultiThread(...)
- an unconditional wait on line 888, and also the fact that the same wait is not in a loop.
 Looking more closely at this method I am concerned about the synchronization because it looks
like it would be possible for no notify calls to occur after that wait, which would mean the
wait would continue indefinitely.  It would be great if someone could take a look at this
as I'm not entirely sure myself what the correct solution is.  

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message