author | katleman |
Thu, 29 Dec 2011 15:14:45 -0800 | |
changeset 11330 | 084a13b20cf3 |
parent 5506 | 202f599c92aa |
child 13256 | 5886d7607acd |
permissions | -rw-r--r-- |
309
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
1 |
/* |
5506 | 2 |
* Copyright (c) 1998, 2008, Oracle and/or its affiliates. All rights reserved. |
2 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
7 |
* published by the Free Software Foundation. |
|
8 |
* |
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
13 |
* accompanied this code). |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License version |
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
18 |
* |
|
5506 | 19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
20 |
* or visit www.oracle.com if you need additional information or have any |
|
21 |
* questions. |
|
2 | 22 |
*/ |
23 |
||
24 |
/* @test |
|
25 |
* @bug 4116437 |
|
26 |
* @summary Distributed Garbage Collector Memory Leak |
|
27 |
* |
|
28 |
* @author Laird Dornin |
|
29 |
* |
|
30 |
* @library ../../testlibrary |
|
31 |
* @build CheckLeaseLeak CheckLeaseLeak_Stub LeaseLeakClient LeaseLeak |
|
32 |
* @run main/othervm/timeout=240 CheckLeaseLeak |
|
33 |
* |
|
34 |
*/ |
|
35 |
||
36 |
/** |
|
37 |
* A bug in sun.rmi.transport.DGCImp.checkLeases() results in memory |
|
38 |
* leak of LeaseInfo objects. |
|
39 |
* |
|
40 |
* In order to verify that this problem no longer exists, we create a |
|
41 |
* remote object and a serveral clients in different VMs. The clients |
|
42 |
* call a remote method on an exported object. This will cause the rmi |
|
43 |
* runtime to create several references (all with different vmids) to |
|
44 |
* the remote object. Each vmid needs a seperate LeaseInfo object in |
|
45 |
* the object table target DGCImpl.leaseTable. If the leak is fixed, |
|
46 |
* the leaseTable field will contain no objects. We use reflection to |
|
309
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
47 |
* find the number of objects contained in this table. |
2 | 48 |
*/ |
49 |
||
50 |
import java.rmi.*; |
|
51 |
import java.rmi.server.*; |
|
52 |
import sun.rmi.transport.*; |
|
53 |
import sun.rmi.*; |
|
54 |
import java.util.Map; |
|
55 |
import java.io.*; |
|
56 |
import java.lang.reflect.*; |
|
57 |
import java.rmi.registry.*; |
|
58 |
||
59 |
public class CheckLeaseLeak extends UnicastRemoteObject implements LeaseLeak { |
|
309
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
60 |
|
2 | 61 |
public CheckLeaseLeak() throws RemoteException { } |
62 |
public void ping () throws RemoteException { } |
|
63 |
||
64 |
/** |
|
65 |
* Id to fake the DGC_ID, so we can later get a reference to the |
|
309
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
66 |
* DGCImpl in the object table. |
2 | 67 |
*/ |
68 |
private final static int DGC_ID = 2; |
|
69 |
||
70 |
private final static int ITERATIONS = 10; |
|
71 |
private final static int numberPingCalls = 0; |
|
72 |
private final static int CHECK_INTERVAL = 400; |
|
73 |
private final static int LEASE_VALUE = 20; |
|
309
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
74 |
|
2 | 75 |
public static void main (String[] args) { |
309
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
76 |
CheckLeaseLeak leakServer = null; |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
77 |
int numLeft =0; |
2 | 78 |
|
309
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
79 |
/* |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
80 |
* we want DGC to collect leases *quickly* |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
81 |
* decrease the lease check interval |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
82 |
*/ |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
83 |
TestLibrary.setInteger("sun.rmi.dgc.checkInterval", |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
84 |
CHECK_INTERVAL); |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
85 |
TestLibrary.setInteger("java.rmi.dgc.leaseValue", |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
86 |
LEASE_VALUE); |
2 | 87 |
|
309
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
88 |
try { |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
89 |
Registry registry = |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
90 |
java.rmi.registry.LocateRegistry. |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
91 |
createRegistry(TestLibrary.REGISTRY_PORT); |
2 | 92 |
|
309
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
93 |
leakServer = new CheckLeaseLeak(); |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
94 |
registry.rebind("/LeaseLeak", leakServer); |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
95 |
|
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
96 |
/* create a bunch of clients in a *different* vm */ |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
97 |
for (int i = 0 ; i < ITERATIONS ; i ++ ) { |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
98 |
System.err.println("Created client: " + i); |
2 | 99 |
|
309
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
100 |
JavaVM jvm = new JavaVM("LeaseLeakClient", |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
101 |
" -Djava.security.policy=" + |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
102 |
TestParams.defaultPolicy, ""); |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
103 |
jvm.start(); |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
104 |
|
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
105 |
if (jvm.getVM().waitFor() == 1 ) { |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
106 |
TestLibrary.bomb("Client process failed"); |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
107 |
} |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
108 |
} |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
109 |
numLeft = getDGCLeaseTableSize(); |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
110 |
Thread.sleep(3000); |
2 | 111 |
|
309
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
112 |
} catch(Exception e) { |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
113 |
TestLibrary.bomb("CheckLeaseLeak Error: ", e); |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
114 |
} finally { |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
115 |
if (leakServer != null) { |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
116 |
TestLibrary.unexport(leakServer); |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
117 |
leakServer = null; |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
118 |
} |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
119 |
} |
2 | 120 |
|
309
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
121 |
/* numLeft should be 2 - if 11 there is a problem. */ |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
122 |
if (numLeft > 2) { |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
123 |
TestLibrary.bomb("Too many objects in DGCImpl.leaseTable: "+ |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
124 |
numLeft); |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
125 |
} else { |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
126 |
System.err.println("Check leaseInfo leak passed with " + |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
127 |
numLeft |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
128 |
+ " object(s) in the leaseTable"); |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
129 |
} |
2 | 130 |
} |
131 |
||
132 |
/** |
|
133 |
* Obtain a reference to the main DGCImpl via reflection. Extract |
|
134 |
* the DGCImpl using the ObjectTable and the well known ID of the |
|
309
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
135 |
* DGCImpl. |
2 | 136 |
*/ |
137 |
private static int getDGCLeaseTableSize () { |
|
309
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
138 |
int numLeaseInfosLeft = 0; |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
139 |
|
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
140 |
/** |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
141 |
* Will eventually be set to point at the leaseTable inside |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
142 |
* DGCImpl. |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
143 |
*/ |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
144 |
Map leaseTable = null; |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
145 |
final Remote[] dgcImpl = new Remote[1]; |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
146 |
Field f; |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
147 |
|
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
148 |
try { |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
149 |
f = (Field) java.security.AccessController.doPrivileged |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
150 |
(new java.security.PrivilegedExceptionAction() { |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
151 |
public Object run() throws Exception { |
2 | 152 |
|
309
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
153 |
ObjID dgcID = new ObjID(DGC_ID); |
2 | 154 |
|
309
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
155 |
/* |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
156 |
* Construct an ObjectEndpoint containing DGC's |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
157 |
* ObjID. |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
158 |
*/ |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
159 |
Class oeClass = |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
160 |
Class.forName("sun.rmi.transport.ObjectEndpoint"); |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
161 |
Class[] constrParams = |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
162 |
new Class[]{ ObjID.class, Transport.class }; |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
163 |
Constructor oeConstructor = |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
164 |
oeClass.getDeclaredConstructor(constrParams); |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
165 |
oeConstructor.setAccessible(true); |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
166 |
Object oe = |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
167 |
oeConstructor.newInstance( |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
168 |
new Object[]{ dgcID, null }); |
2 | 169 |
|
309
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
170 |
/* |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
171 |
* Get Target that contains DGCImpl in ObjectTable |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
172 |
*/ |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
173 |
Class objTableClass = |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
174 |
Class.forName("sun.rmi.transport.ObjectTable"); |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
175 |
Class getTargetParams[] = new Class[] { oeClass }; |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
176 |
Method objTableGetTarget = |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
177 |
objTableClass.getDeclaredMethod("getTarget", |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
178 |
getTargetParams); |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
179 |
objTableGetTarget.setAccessible(true); |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
180 |
Target dgcTarget = (Target) |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
181 |
objTableGetTarget.invoke(null, new Object[]{ oe }); |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
182 |
|
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
183 |
/* get the DGCImpl from its Target */ |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
184 |
Method targetGetImpl = |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
185 |
dgcTarget.getClass().getDeclaredMethod |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
186 |
("getImpl", null); |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
187 |
targetGetImpl.setAccessible(true); |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
188 |
dgcImpl[0] = |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
189 |
(Remote) targetGetImpl.invoke(dgcTarget, null); |
2 | 190 |
|
309
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
191 |
/* Get the lease table from the DGCImpl. */ |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
192 |
Field reflectedLeaseTable = |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
193 |
dgcImpl[0].getClass().getDeclaredField |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
194 |
("leaseTable"); |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
195 |
reflectedLeaseTable.setAccessible(true); |
2 | 196 |
|
309
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
197 |
return reflectedLeaseTable; |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
198 |
} |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
199 |
}); |
2 | 200 |
|
309
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
201 |
/** |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
202 |
* This is the leaseTable that will fill up with LeaseInfo |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
203 |
* objects if the LeaseInfo memory leak is not fixed. |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
204 |
*/ |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
205 |
leaseTable = (Map) f.get(dgcImpl[0]); |
2 | 206 |
|
309
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
207 |
numLeaseInfosLeft = leaseTable.size(); |
2 | 208 |
|
309
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
209 |
} catch(Exception e) { |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
210 |
if (e instanceof java.security.PrivilegedActionException) |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
211 |
e = ((java.security.PrivilegedActionException) e). |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
212 |
getException(); |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
213 |
TestLibrary.bomb(e); |
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
214 |
} |
2 | 215 |
|
309
bda219d843f6
6627823: Missed whitespace normalization files: jdk/test/java/rmi
ohair
parents:
2
diff
changeset
|
216 |
return numLeaseInfosLeft; |
2 | 217 |
} |
218 |
} |