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 *
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.
22 */
23
24 /*
25 * @test
26 * @bug 5102804
27 * @summary Tests memory leak
28 * @author Sergey Malenkov
29 */
30
31 import java.beans.BeanInfo;
32 import java.beans.IntrospectionException;
33 import java.beans.Introspector;
34 import java.beans.PropertyDescriptor;
35 import java.beans.SimpleBeanInfo;
36 import java.lang.ref.Reference;
37 import java.lang.ref.WeakReference;
38 import java.net.URL;
39 import java.net.URLClassLoader;
40
41 public class Test5102804 {
42 private static final String BEAN_NAME = "Test5102804$Example";
43 private static final String BEAN_INFO_NAME = BEAN_NAME + "BeanInfo";
44
45 public static void main(String[] args) {
46 if (!isCollectible(getReference()))
|
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 *
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.
22 */
23
24 /*
25 * @test
26 * @bug 5102804
27 * @ignore This test is not predictable with regards to GC
28 * @summary Tests memory leak
29 * @author Sergey Malenkov
30 */
31
32 import java.beans.BeanInfo;
33 import java.beans.IntrospectionException;
34 import java.beans.Introspector;
35 import java.beans.PropertyDescriptor;
36 import java.beans.SimpleBeanInfo;
37 import java.lang.ref.Reference;
38 import java.lang.ref.WeakReference;
39 import java.net.URL;
40 import java.net.URLClassLoader;
41
42 public class Test5102804 {
43 private static final String BEAN_NAME = "Test5102804$Example";
44 private static final String BEAN_INFO_NAME = BEAN_NAME + "BeanInfo";
45
46 public static void main(String[] args) {
47 if (!isCollectible(getReference()))
|