Merge

Fri, 28 Feb 2014 10:59:05 -0800

author
asaha
date
Fri, 28 Feb 2014 10:59:05 -0800
changeset 631
6257cf6053ac
parent 630
bbb1686ba285
parent 596
5e5c8f0c45dd
child 632
a2f7b36bfc1b

Merge

.hgtags file | annotate | diff | comparison | revisions
     1.1 --- a/.hgtags	Tue Feb 25 12:22:18 2014 -0800
     1.2 +++ b/.hgtags	Fri Feb 28 10:59:05 2014 -0800
     1.3 @@ -251,6 +251,7 @@
     1.4  b8c71dae05574f8eca7ca6d703b16b450850b033 jdk8-b127
     1.5  113e7569b49bca18846e5e5b74e644580b805902 jdk8-b128
     1.6  5c72d74c6805d1b4f6192f7a3550d126acf37005 jdk8-b129
     1.7 +0683ee308085785d0455f4153e764e062843f178 jdk8-b130
     1.8  5de8d42f9eb7ddcdc741445f3c21a63887d694b6 jdk8u5-b01
     1.9  c750098a3ef18de28a6d739666559f0333c76c78 jdk8u5-b02
    1.10  3d9b40a53134aa33031bf13581dff9fccade9048 jdk8u5-b03
     2.1 --- a/src/share/classes/com/sun/corba/se/spi/orb/ORB.java	Tue Feb 25 12:22:18 2014 -0800
     2.2 +++ b/src/share/classes/com/sun/corba/se/spi/orb/ORB.java	Fri Feb 28 10:59:05 2014 -0800
     2.3 @@ -1,5 +1,5 @@
     2.4  /*
     2.5 - * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
     2.6 + * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
     2.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     2.8   *
     2.9   * This code is free software; you can redistribute it and/or modify it
    2.10 @@ -170,6 +170,12 @@
    2.11      // representing LogDomain and ExceptionGroup.
    2.12      private Map wrapperMap ;
    2.13  
    2.14 +    static class Holder {
    2.15 +        static final PresentationManager defaultPresentationManager =
    2.16 +            setupPresentationManager();
    2.17 +    }
    2.18 +    private static final Object pmLock = new Object();
    2.19 +
    2.20      private static Map staticWrapperMap = new ConcurrentHashMap();
    2.21  
    2.22      protected MonitoringManager monitoringManager;
    2.23 @@ -235,13 +241,24 @@
    2.24       */
    2.25      public static PresentationManager getPresentationManager()
    2.26      {
    2.27 -        AppContext ac = AppContext.getAppContext();
    2.28 -        PresentationManager pm = (PresentationManager) ac.get(PresentationManager.class);
    2.29 -        if (pm == null) {
    2.30 -            pm = setupPresentationManager();
    2.31 -            ac.put(PresentationManager.class, pm);
    2.32 +        SecurityManager sm = System.getSecurityManager();
    2.33 +        if (sm != null && AppContext.getAppContexts().size() > 0) {
    2.34 +            AppContext ac = AppContext.getAppContext();
    2.35 +            if (ac != null) {
    2.36 +                synchronized (pmLock) {
    2.37 +                    PresentationManager pm =
    2.38 +                        (PresentationManager) ac.get(PresentationManager.class);
    2.39 +                    if (pm == null) {
    2.40 +                        pm = setupPresentationManager();
    2.41 +                        ac.put(PresentationManager.class, pm);
    2.42 +                    }
    2.43 +                    return pm;
    2.44 +                }
    2.45 +            }
    2.46          }
    2.47 -        return pm;
    2.48 +
    2.49 +        // No security manager or AppContext
    2.50 +        return Holder.defaultPresentationManager;
    2.51      }
    2.52  
    2.53      /** Get the appropriate StubFactoryFactory.  This

mercurial