- 
    Bug 
- 
    Resolution: Fixed
- 
     P3 P3
- 
    7
- 
        b08
- 
        x86
- 
        windows_xp
- 
        Verified
| Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build | 
|---|---|---|---|---|---|---|
| JDK-2212656 | 7u2 | Michael McMahon | P3 | Closed | Fixed | b08 | 
                    When System.gc() is launched in a test program, the test program creates Sockets
more than the limit specified in -Dsun.net.maxDatagramSockets.
CONFIGURATION:
OS :WinXP(SP3, Japanese, x86)
JDK : JDK7GA
java version "1.7.0"
Java(TM) SE Runtime Environment (build 1.7.0-b147)
Java HotSpot(TM) Client VM (build 21.0-b17, mixed mode)
REPRODUCE:
1. Compile the attached Limit.java
(javac -Xlint:deprecation Limit.java)
2. jar -cvf J800275.jar *.class
3. del *.class
4. java -Djava.security.policy=Limit.policy -Dsun.net.maxDatagramSockets=1 -cp J800275.jar Limit
The message shows up,
Exception in thread "main" java.lang.RuntimeException: Test failed (a): limit was set to 1
at Limit.main(Limit.java:33)
Please see comment section for a little bit more detail.
            
more than the limit specified in -Dsun.net.maxDatagramSockets.
CONFIGURATION:
OS :WinXP(SP3, Japanese, x86)
JDK : JDK7GA
java version "1.7.0"
Java(TM) SE Runtime Environment (build 1.7.0-b147)
Java HotSpot(TM) Client VM (build 21.0-b17, mixed mode)
REPRODUCE:
1. Compile the attached Limit.java
(javac -Xlint:deprecation Limit.java)
2. jar -cvf J800275.jar *.class
3. del *.class
4. java -Djava.security.policy=Limit.policy -Dsun.net.maxDatagramSockets=1 -cp J800275.jar Limit
The message shows up,
Exception in thread "main" java.lang.RuntimeException: Test failed (a): limit was set to 1
at Limit.main(Limit.java:33)
Please see comment section for a little bit more detail.
- backported by
- 
                    JDK-2212656 -Dsun.net.maxDatagramSockets=1 does not work correctly with system.gc() -           
- Closed
 
-         
- relates to
- 
                    JDK-7098719 -Dsun.net.maxDatagramSockets and Socket constructor does not work correctly with System.gc() -           
- Closed
 
-         
- 
                    JDK-7091369 DatagramSocket/Limit.java failing on 8 and 7u2 -           
- Closed
 
-