changeset 577:9ad9346fea43

8039108: Build Broken: 8035618 fix breaks corba build Reviewed-by: alanb
author coffeys
date Wed, 02 Apr 2014 20:15:59 +0100
parents 2c5553d912c8
children 7c70b7ef7ab9
files src/share/classes/com/sun/corba/se/spi/orb/ORB.java
diffstat 1 files changed, 11 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/com/sun/corba/se/spi/orb/ORB.java	Wed Apr 02 18:21:23 2014 +0100
+++ b/src/share/classes/com/sun/corba/se/spi/orb/ORB.java	Wed Apr 02 20:15:59 2014 +0100
@@ -25,6 +25,8 @@
 
 package com.sun.corba.se.spi.orb;
 
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
 import java.util.Map ;
 import java.util.HashMap ;
 import java.util.Properties ;
@@ -245,7 +247,15 @@
         SecurityManager sm = System.getSecurityManager();
         JavaAWTAccess javaAwtAccess = sun.misc.SharedSecrets.getJavaAWTAccess();
         if (sm != null && javaAwtAccess != null) {
-            final Object appletContext = javaAwtAccess.getAppletContext();
+            Object appletContext;
+            try {
+                Class<?> clazz = JavaAWTAccess.class;
+                Method method = clazz.getMethod("getAppletContext");
+                appletContext = method.invoke(javaAwtAccess);
+            } catch (IllegalAccessException | InvocationTargetException | NoSuchMethodException e) {
+                throw new InternalError(e);
+            }
+
             if (appletContext != null) {
                 synchronized (pmContexts) {
                     PresentationManager pm = pmContexts.get(appletContext);