changeset 890:179bc370340d icedtea-2.4.8pre01

Merge jdk7u55-b14
author andrew
date Wed, 16 Apr 2014 19:41:04 +0100
parents fee6e7671794 (current diff) a0bfd0e80ae0 (diff)
children 39f5a0f1b47c
files .hgtags
diffstat 2 files changed, 43 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Tue Apr 15 23:54:24 2014 +0100
+++ b/.hgtags	Wed Apr 16 19:41:04 2014 +0100
@@ -396,6 +396,7 @@
 b7fb35bbe70d88eced3725b6e9070ad0b5b621ad jdk7u45-b31
 d641ac83157ec86219519c0cbaf3122bdc997136 jdk7u45-b33
 aa24e046a2da95637257c9effeaabe254db0aa0b jdk7u45-b34
+fab1423e6ab8ecf36da8b6bf2e454156ec701e8a jdk7u45-b35
 b1f069eb48edfa6fb7428dc045a53e287215ef4a jdk7u51-b00
 8d884cf2e8cce92d532950de2c7283d9804f9e58 jdk7u51-b01
 327035fbb0433927c1b1af2bc0bcb84e7827f1b9 jdk7u51-b02
@@ -414,3 +415,21 @@
 48ef1bb6d120dbf053f75787a40ef6faa38230f1 icedtea-2.4.6pre01
 48ef1bb6d120dbf053f75787a40ef6faa38230f1 icedtea-2.4.6
 e6ad5b912691cda3037a1d1c15ac6ae3624e166b icedtea-2.4.7
+6563d12c48c92af39a27ca46b4515fad8e994667 jdk7u51-b30
+0ad990211737fe1b1e2737a3498ab266146d2c53 jdk7u51-b31
+55a509ccc0e4ed49e311c7ecf2ed29a908bc1d6b jdk7u55-b00
+aabfdc799c0799837dcbbf9ea8d6df1511978b1f jdk7u55-b01
+db2e6d87bade9d2061646ff9a6b39b5159fba0ec jdk7u55-b02
+02ff18f156bd3382fe22e4758b138370f5238e97 jdk7u55-b03
+6a88a170331fb38af5046e54bf75f38176af5c41 jdk7u55-b04
+a8d27c3fc4e4e6cd99fa164f04c30a71f474a2d6 jdk7u55-b05
+af7f1808106bf4e9b4680d943677299829245d08 jdk7u55-b06
+44801796d42bebc90e8c4c7fb5bd79db04b10b75 jdk7u55-b07
+aa98fb8dc3608a30ac593635b21aca2105aaab20 jdk7u55-b08
+2a4842e7ca0b2228017542cea0fed3b8d4f4491a jdk7u55-b09
+5805c3291eb3a82cd75e95ac06eb13daa7f92866 jdk7u55-b09
+b9dae31c56a2bf69fc5932cc490cd80fccc1e0fd jdk7u55-b10
+cbd5b4b07e0c8a5f61eff396b7622e7b04d2a164 jdk7u55-b11
+3cce2a49d18d93dfca2634db32368486ebbb1590 jdk7u55-b12
+8efa6e66c13a5329c312d1a521ffab75d9a330e3 jdk7u55-b13
+e041c52fe69128ec3439d26afef9b0fcba00684c jdk7u55-b30
--- a/src/share/classes/com/sun/corba/se/spi/orb/ORB.java	Tue Apr 15 23:54:24 2014 +0100
+++ b/src/share/classes/com/sun/corba/se/spi/orb/ORB.java	Wed Apr 16 19:41:04 2014 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -170,6 +170,12 @@
     // representing LogDomain and ExceptionGroup.
     private Map wrapperMap ;
 
+    static class Holder {
+        static final PresentationManager defaultPresentationManager =
+            setupPresentationManager();
+    }
+    private static final Object pmLock = new Object();
+
     private static Map staticWrapperMap = new ConcurrentHashMap();
 
     protected MonitoringManager monitoringManager;
@@ -235,13 +241,24 @@
      */
     public static PresentationManager getPresentationManager()
     {
-        AppContext ac = AppContext.getAppContext();
-        PresentationManager pm = (PresentationManager) ac.get(PresentationManager.class);
-        if (pm == null) {
-            pm = setupPresentationManager();
-            ac.put(PresentationManager.class, pm);
+        SecurityManager sm = System.getSecurityManager();
+        if (sm != null && AppContext.getAppContexts().size() > 0) {
+            AppContext ac = AppContext.getAppContext();
+            if (ac != null) {
+                synchronized (pmLock) {
+                    PresentationManager pm =
+                        (PresentationManager) ac.get(PresentationManager.class);
+                    if (pm == null) {
+                        pm = setupPresentationManager();
+                        ac.put(PresentationManager.class, pm);
+                    }
+                    return pm;
+                }
+            }
         }
-        return pm;
+
+        // No security manager or AppContext
+        return Holder.defaultPresentationManager;
     }
 
     /** Get the appropriate StubFactoryFactory.  This