United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7099488 TwoStacksPlainSocketImpl should invoke super.create(stream), typo in fix for 7098719
JDK-7099488 : TwoStacksPlainSocketImpl should invoke super.create(stream), typo in fix for 7098719

Details
Type:
Bug
Submit Date:
2011-10-11
Status:
Closed
Updated Date:
2012-06-11
Project Name:
JDK
Resolved Date:
2012-06-11
Component:
core-libs
OS:
generic
Sub-Component:
java.net
CPU:
generic
Priority:
P1
Resolution:
Fixed
Affected Versions:
7
Fixed Versions:

Related Reports
Backport:
Relates:

Sub Tasks

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

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().
                                     
2011-10-11
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
                                     
2011-10-11



Hardware and Software, Engineered to Work Together