You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Sebb (JIRA)" <ji...@apache.org> on 2008/03/04 03:46:50 UTC
[jira] Created: (NET-195) Ntpv3Impl attempts double-checked locking
Ntpv3Impl attempts double-checked locking
-----------------------------------------
Key: NET-195
URL: https://issues.apache.org/jira/browse/NET-195
Project: Commons Net
Issue Type: Bug
Reporter: Sebb
The NtpV3Impl#getDatagramPacket() method implements double-checked locking, which is known not to work.
The initial "if (dp == null)" condition should be removed; once this is done, the synch block could be removed and the method synchronized instead.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (NET-195) Ntpv3Impl attempts double-checked
locking
Posted by "Sebb (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/NET-195?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12586196#action_12586196 ]
Sebb commented on NET-195:
--------------------------
Fixed in NET_2_0 branch:
http://svn.apache.org/viewvc?rev=645323&view=rev
and in trunk:
http://svn.apache.org/viewvc?rev=645324&view=rev
> Ntpv3Impl attempts double-checked locking
> -----------------------------------------
>
> Key: NET-195
> URL: https://issues.apache.org/jira/browse/NET-195
> Project: Commons Net
> Issue Type: Bug
> Reporter: Sebb
> Priority: Minor
>
> The NtpV3Impl#getDatagramPacket() method implements double-checked locking, which is known not to work.
> The initial "if (dp == null)" condition should be removed; once this is done, the synch block could be removed and the method synchronized instead.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (NET-195) Ntpv3Impl attempts double-checked locking
Posted by "Rory Winston (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/NET-195?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rory Winston updated NET-195:
-----------------------------
Priority: Minor (was: Major)
> Ntpv3Impl attempts double-checked locking
> -----------------------------------------
>
> Key: NET-195
> URL: https://issues.apache.org/jira/browse/NET-195
> Project: Commons Net
> Issue Type: Bug
> Reporter: Sebb
> Priority: Minor
>
> The NtpV3Impl#getDatagramPacket() method implements double-checked locking, which is known not to work.
> The initial "if (dp == null)" condition should be removed; once this is done, the synch block could be removed and the method synchronized instead.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (NET-195) Ntpv3Impl attempts double-checked
locking
Posted by "Sebb (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/NET-195?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sebb resolved NET-195.
----------------------
Resolution: Fixed
Fix Version/s: 2.0
1.5
Patches have been applied.
> Ntpv3Impl attempts double-checked locking
> -----------------------------------------
>
> Key: NET-195
> URL: https://issues.apache.org/jira/browse/NET-195
> Project: Commons Net
> Issue Type: Bug
> Reporter: Sebb
> Priority: Minor
> Fix For: 1.5, 2.0
>
>
> The NtpV3Impl#getDatagramPacket() method implements double-checked locking, which is known not to work.
> The initial "if (dp == null)" condition should be removed; once this is done, the synch block could be removed and the method synchronized instead.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (NET-195) Ntpv3Impl attempts double-checked
locking
Posted by "Sebb (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/NET-195?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12576791#action_12576791 ]
Sebb commented on NET-195:
--------------------------
Given that the method attempts synchronisation, it is presumably intended to be called from multiple threads.
However, the synchronisation is broken, so needs to be fixed.
> Ntpv3Impl attempts double-checked locking
> -----------------------------------------
>
> Key: NET-195
> URL: https://issues.apache.org/jira/browse/NET-195
> Project: Commons Net
> Issue Type: Bug
> Reporter: Sebb
> Priority: Minor
>
> The NtpV3Impl#getDatagramPacket() method implements double-checked locking, which is known not to work.
> The initial "if (dp == null)" condition should be removed; once this is done, the synch block could be removed and the method synchronized instead.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.