< prev index next >

test/jdk/javax/swing/UIDefaults/8080972/TestProxyLazyValue.java

Print this page




  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 import javax.swing.SwingUtilities;
  24 import javax.swing.UIDefaults;
  25 /*
  26  * @test
  27  * @bug 8080972
  28  * @summary Audit Core Reflection in module java.desktop for places that will
  29  *          require changes to work with modules
  30  * @author Alexander Scherbatiy

  31  */
  32 
  33 public class TestProxyLazyValue {
  34 
  35     public static void main(String[] args) throws Exception {
  36         SwingUtilities.invokeAndWait(TestProxyLazyValue::testUserProxyLazyValue);
  37         SwingUtilities.invokeAndWait(TestProxyLazyValue::testProxyLazyValue);
  38         System.setSecurityManager(new SecurityManager());
  39         SwingUtilities.invokeAndWait(TestProxyLazyValue::testUserProxyLazyValue);
  40         SwingUtilities.invokeAndWait(TestProxyLazyValue::testProxyLazyValue);
  41     }
  42 
  43     private static void testUserProxyLazyValue() {
  44 
  45         Object obj = new UserProxyLazyValue(
  46                 UserLazyClass.class.getName()).createValue(null);
  47 
  48         if (!(obj instanceof UserLazyClass)) {
  49             throw new RuntimeException("Object is not UserLazyClass!");
  50         }




  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 import javax.swing.SwingUtilities;
  24 import javax.swing.UIDefaults;
  25 /*
  26  * @test
  27  * @bug 8080972
  28  * @summary Audit Core Reflection in module java.desktop for places that will
  29  *          require changes to work with modules
  30  * @author Alexander Scherbatiy
  31  * @run main/othervm TestProxyLazyValue
  32  */
  33 
  34 public class TestProxyLazyValue {
  35 
  36     public static void main(String[] args) throws Exception {
  37         SwingUtilities.invokeAndWait(TestProxyLazyValue::testUserProxyLazyValue);
  38         SwingUtilities.invokeAndWait(TestProxyLazyValue::testProxyLazyValue);
  39         System.setSecurityManager(new SecurityManager());
  40         SwingUtilities.invokeAndWait(TestProxyLazyValue::testUserProxyLazyValue);
  41         SwingUtilities.invokeAndWait(TestProxyLazyValue::testProxyLazyValue);
  42     }
  43 
  44     private static void testUserProxyLazyValue() {
  45 
  46         Object obj = new UserProxyLazyValue(
  47                 UserLazyClass.class.getName()).createValue(null);
  48 
  49         if (!(obj instanceof UserLazyClass)) {
  50             throw new RuntimeException("Object is not UserLazyClass!");
  51         }


< prev index next >