jdk/test/java/beans/XMLEncoder/Test4631471.java
changeset 6106 c5ba8eff9aca
parent 5506 202f599c92aa
child 17148 bb5fff33bf49
equal deleted inserted replaced
6105:de4af6e215ad 6106:c5ba8eff9aca
     1 /*
     1 /*
     2  * Copyright (c) 2003, 2007, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     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
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    21  * questions.
    21  * questions.
    22  */
    22  */
    23 
    23 
    24 /*
    24 /*
    25  * @test
    25  * @test
    26  * @bug 4631471
    26  * @bug 4631471 6972468
    27  * @summary Tests DefaultTreeModel encoding
    27  * @summary Tests DefaultTreeModel encoding
    28  * @author Sergey Malenkov, Mark Davidson
    28  * @author Sergey Malenkov, Mark Davidson
    29  */
    29  */
    30 
    30 
    31 import java.beans.XMLEncoder;
    31 import java.beans.XMLEncoder;
    35 import javax.swing.tree.TreeModel;
    35 import javax.swing.tree.TreeModel;
    36 import javax.swing.tree.TreeNode;
    36 import javax.swing.tree.TreeNode;
    37 
    37 
    38 public abstract class Test4631471 extends AbstractTest {
    38 public abstract class Test4631471 extends AbstractTest {
    39     public static void main(String[] args) throws Exception {
    39     public static void main(String[] args) throws Exception {
       
    40         main();
       
    41         System.setSecurityManager(new SecurityManager());
       
    42         main();
       
    43     }
       
    44 
       
    45     private static void main() throws Exception {
    40         // the DefaultMutableTreeNode will archive correctly
    46         // the DefaultMutableTreeNode will archive correctly
    41         new Test4631471() {
    47         new Test4631471() {
    42             protected Object getObject() {
    48             protected Object getObject() {
    43                 return getRoot();
    49                 return getRoot();
    44             }
    50             }