JDK-7099488 : TwoStacksPlainSocketImpl should invoke super.create(stream), typo in fix for 7098719
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.net
  • Affected Version: 7
  • Priority: P1
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2011-10-11
  • Updated: 2014-09-26
  • Resolved: 2012-06-11
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7 JDK 8
7u2Fixed 8 b10Fixed
Related Reports
Relates :  
Description
There was a cut'n'paste error in the changeset for CR 7098719, see 
   http://hg.openjdk.java.net/jdk8/tl/jdk/rev/1e89a13d9d8f

Build error:

..\..\..\src\windows\classes\java\net\TwoStacksPlainSocketImpl.java:85: error: no suitable method found for create()
            super.create();
                 ^
    method AbstractPlainSocketImpl.create(boolean) is not applicable
      (actual and formal argument lists differ in length)


-        super.create(stream);
+        try {
+            super.create();

Comments
EVALUATION JDK8 changeset: Changeset: 5bfe2de1157b Author: chegar Date: 2011-10-11 12:06 +0100 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/5bfe2de1157b 7099488: TwoStacksPlainSocketImpl should invoke super.create(stream), typo in fix for 7098719 Reviewed-by: coffeys ! src/share/classes/java/net/AbstractPlainSocketImpl.java ! src/windows/classes/java/net/TwoStacksPlainSocketImpl.java
11-10-2011

EVALUATION There was a cut'n'paste error in the original change for CR 7098719. super.create(stream) should be reinstated. After the above, now the (closed) regression test amended for CR 7098719 fails. The reason is that TwoStacksPlainSocketImpl overrides the close() method, from AbstractPlainSocketImpl, and does not decrements the ResourceManagers count. This problem existed before CR 7098719, it is just now being seen as the amended test catches this situation. The solution is to simply invoke ResourceManager.afterUdpClose() for non-stream sockets, just as is done in AbstractPlainSocketImpl.close().
11-10-2011