changeset 2931:ecd2b7356f84

Update NEWS with missing backports and remove erroneous backport. 2013-09-02 Andrew John Hughes <gnu.andrew@redhat.com> * patches/openjdk/6893617-cnctx_always_uses_default_orb.patch: Remove patch which shouldn't have been backported to 1.11. * Makefile.am: (ICEDTEA_PATCHES): Remove 6893617. * NEWS: Add missing backport entries.
author Andrew John Hughes <gnu.andrew@redhat.com>
date Wed, 04 Sep 2013 12:25:58 +0100
parents 88ad9f715193
children 46162ab5e258
files ChangeLog Makefile.am NEWS patches/openjdk/6893617-cnctx_always_uses_default_orb.patch
diffstat 4 files changed, 13 insertions(+), 235 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Sep 04 00:13:08 2013 +0100
+++ b/ChangeLog	Wed Sep 04 12:25:58 2013 +0100
@@ -1,3 +1,11 @@
+2013-09-02  Andrew John Hughes  <gnu.andrew@redhat.com>
+
+	* patches/openjdk/6893617-cnctx_always_uses_default_orb.patch:
+	Remove patch which shouldn't have been backported to 1.11.
+	* Makefile.am:
+	(ICEDTEA_PATCHES): Remove 6893617.
+	* NEWS: Add missing backport entries.
+
 2013-09-02  Andrew John Hughes  <gnu.andrew@redhat.com>
 
 	* Makefile.am:
--- a/Makefile.am	Wed Sep 04 00:13:08 2013 +0100
+++ b/Makefile.am	Wed Sep 04 12:25:58 2013 +0100
@@ -667,7 +667,6 @@
 	patches/openjdk/7196533-timezone_bottleneck.patch \
 	patches/openjdk/6636370-appcontext_simplification.patch \
 	patches/openjdk/6636331-appcontext_concurrentmodificationexception.patch \
-	patches/openjdk/6893617-cnctx_always_uses_default_orb.patch \
 	patches/imageiojpeg_sync.patch \
 	patches/openjdk/8005194-scale_memory_leak.patch \
 	patches/openjdk/6563752-ss12_support.patch \
--- a/NEWS	Wed Sep 04 00:13:08 2013 +0100
+++ b/NEWS	Wed Sep 04 12:25:58 2013 +0100
@@ -17,6 +17,8 @@
   - S4893408: JPEGReader throws IllegalArgException when setting the destination to BYTE_GRAY
   - S6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
   - S6631559: Registration of ImageIO plugins should not cause loading of jpeg.dlli and cmm.dll
+  - S6636331: ConcurrentModificationException in AppContext code
+  - S6636370: minor corrections and simplification of code in AppContext
   - S6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
   - S6791502: IIOException "Invalid icc profile" on jpeg after update from JDK5 to JDK6
   - S6793818: JpegImageReader is too greedy creating color profiles
@@ -33,7 +35,10 @@
   - S7018912: [parfait] potential buffer overruns in imageio jpeg
   - S7022999: Can't build with FORCE_TIERED=0
   - S7038711: Fix CC_VER checks for compiler options, fix use of -Wno-clobber
+  - S7196533: TimeZone.getDefault() slow due to synchronization bottleneck
   - S8005194: [parfait] #353 sun/awt/image/jpeg/imageioJPEG.c Memory leak of pointer 'scale' allocated with calloc()
+  - S8014469: (tz) Support tzdata2013c
+  - S8020054: (tz) Support tzdata2013d
   - S8020983, RH976897: OutOfMemoryError caused by non garbage collected JPEGImageWriter Instances
 * Bug fixes
   - PR1188: ASM Interpreter and Thumb2 JIT javac miscompile modulo reminder on armel.
--- a/patches/openjdk/6893617-cnctx_always_uses_default_orb.patch	Wed Sep 04 00:13:08 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,234 +0,0 @@
-# HG changeset patch
-# User coffeys
-# Date 1340827826 -3600
-#      Wed Jun 27 21:10:26 2012 +0100
-# Node ID 83f8283e47917f97b838257db5711e37be9b715e
-# Parent  352fad83e8447dec768064f60dc85934db32ef27
-6893617: JDK 6 CNCtx always uses the default ORB
-Reviewed-by: lancea
-
-diff --git a/src/share/classes/com/sun/jndi/cosnaming/CNCtx.java b/src/share/classes/com/sun/jndi/cosnaming/CNCtx.java
---- openjdk/jdk/src/share/classes/com/sun/jndi/cosnaming/CNCtx.java
-+++ openjdk/jdk/src/share/classes/com/sun/jndi/cosnaming/CNCtx.java
-@@ -1,5 +1,5 @@
- /*
-- * Copyright (c) 1999, 2005, Oracle and/or its affiliates. All rights reserved.
-+ * Copyright (c) 1999, 2012, 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
-@@ -59,8 +59,22 @@
- 
-     private final static boolean debug = false;
- 
-+    /*
-+     * Implement one shared ORB among all CNCtx.  However, there is a public constructor
-+     * accepting an ORB, so we need the option of using a given ORB.
-+     */
-+    private static ORB _defaultOrb;
-     ORB _orb;                   // used by ExceptionMapper and RMI/IIOP factory
-     public NamingContext _nc;   // public for accessing underlying NamingContext
-+
-+    private synchronized static ORB getDefaultOrb() {
-+        if (_defaultOrb == null) {
-+            _defaultOrb = CorbaUtils.getOrb(null, -1,
-+               new Hashtable<String, java.lang.Object>());
-+        }
-+        return _defaultOrb;
-+    }
-+
-     private NameComponent[] _name = null;
- 
-     Hashtable _env; // used by ExceptionMapper
-@@ -113,8 +127,9 @@
-         // rest is the INS name
-         // Return the parsed form to prevent subsequent lookup
-         // from parsing the string as a composite name
--        // The caller should be aware that a toString() of the name
--        // will yield its INS syntax, rather than a composite syntax
-+        // The caller should be aware that a toString() of the name,
-+        // which came from the environment will yield its INS syntax,
-+        // rather than a composite syntax
-         return new ResolveResult(ctx, parser.parse(rest));
-     }
- 
-@@ -134,10 +149,10 @@
-             if (orb == null || nctx == null)
-                 throw new ConfigurationException(
-                     "Must supply ORB or NamingContext");
--            _orb = orb;
--            orbTracker = tracker;
--            if (orbTracker != null) {
--                orbTracker.incRefCount();
-+            if (orb != null) {
-+                _orb = orb;
-+            } else {
-+                _orb = getDefaultOrb();
-             }
-             _nc = nctx;
-             _env = env;
-@@ -211,10 +226,13 @@
-         org.omg.CORBA.ORB inOrb = null;
-         String ncIor = null;
- 
--        if (env != null) {
-+        if (inOrb == null && env != null) {
-             inOrb = (org.omg.CORBA.ORB) env.get("java.naming.corba.orb");
-         }
- 
-+        if (inOrb == null)
-+            inOrb = getDefaultOrb(); // will create a default ORB if none exists
-+
-         // Extract PROVIDER_URL from environment
-         String provUrl = null;
-         if (env != null) {
-@@ -225,13 +243,6 @@
-             // Initialize the root naming context by using the IOR supplied
-             // in the PROVIDER_URL
-             ncIor = getStringifiedIor(provUrl);
--
--            if (inOrb == null) {
--
--                // no ORB instance specified; create one using env and defaults
--                inOrb = CorbaUtils.getOrb(null, -1, env);
--                orbTracker = new OrbReuseTracker(inOrb);
--            }
-             setOrbAndRootContext(inOrb, ncIor);
-         } else if (provUrl != null) {
-             // Initialize the root naming context by using the URL supplied
-@@ -257,14 +268,8 @@
-             }
-         } else {
-             // No PROVIDER_URL supplied; initialize using defaults
--            if (inOrb == null) {
--
--                // No ORB instance specified; create one using env and defaults
--                inOrb = CorbaUtils.getOrb(null, -1, env);
--                orbTracker = new OrbReuseTracker(inOrb);
--                if (debug) {
--                    System.err.println("Getting default ORB: " + inOrb + env);
--                }
-+            if (debug) {
-+                System.err.println("Getting default ORB: " + inOrb + env);
-             }
-             setOrbAndRootContext(inOrb, (String)null);
-         }
-@@ -285,6 +290,10 @@
-      */
-     private String initUsingIiopUrl(ORB defOrb, String url, Hashtable env)
-         throws NamingException {
-+
-+        if (defOrb == null)
-+            defOrb = getDefaultOrb();
-+
-         try {
-             IiopUrl parsedUrl = new IiopUrl(url);
- 
-@@ -296,19 +305,17 @@
-                 addr = (IiopUrl.Address)addrs.elementAt(i);
- 
-                 try {
--                    if (defOrb != null) {
--                        try {
--                            String tmpUrl = "corbaloc:iiop:" + addr.host
--                                + ":" + addr.port + "/NameService";
--                            if (debug) {
--                                System.err.println("Using url: " + tmpUrl);
--                            }
--                            org.omg.CORBA.Object rootCtx =
--                                defOrb.string_to_object(tmpUrl);
--                            setOrbAndRootContext(defOrb, rootCtx);
--                            return parsedUrl.getStringName();
--                        } catch (Exception e) {} // keep going
--                    }
-+                    try {
-+                        String tmpUrl = "corbaloc:iiop:" + addr.host
-+                            + ":" + addr.port + "/NameService";
-+                        if (debug) {
-+                            System.err.println("Using url: " + tmpUrl);
-+                        }
-+                        org.omg.CORBA.Object rootCtx =
-+                            defOrb.string_to_object(tmpUrl);
-+                        setOrbAndRootContext(defOrb, rootCtx);
-+                        return parsedUrl.getStringName();
-+                    } catch (Exception e) {} // keep going
- 
-                     // Get ORB
-                     if (debug) {
-@@ -316,12 +323,8 @@
-                             + " and port " + addr.port);
-                     }
- 
--                    // Get ORB
--                    ORB orb = CorbaUtils.getOrb(addr.host, addr.port, env);
--                    orbTracker = new OrbReuseTracker(orb);
--
-                     // Assign to fields
--                    setOrbAndRootContext(orb, (String)null);
-+                    setOrbAndRootContext(defOrb, (String)null);
-                     return parsedUrl.getStringName();
- 
-                 } catch (NamingException ne) {
-@@ -343,18 +346,16 @@
-      */
-     private String initUsingCorbanameUrl(ORB orb, String url, Hashtable env)
-         throws NamingException {
-+
-+        if (orb == null)
-+                orb = getDefaultOrb();
-+
-         try {
-             CorbanameUrl parsedUrl = new CorbanameUrl(url);
- 
-             String corbaloc = parsedUrl.getLocation();
-             String cosName = parsedUrl.getStringName();
- 
--            if (orb == null) {
--
--                // No ORB instance specified; create one using env and defaults
--                orb = CorbaUtils.getOrb(null, -1, env);
--                orbTracker = new OrbReuseTracker(orb);
--            }
-             setOrbAndRootContext(orb, corbaloc);
- 
-             return parsedUrl.getStringName();
-@@ -1115,9 +1116,6 @@
-     }
- 
-     synchronized public void incEnumCount() {
--        if (orbTracker == null) {
--            return;
--        }
-         enumCount++;
-         if (debug) {
-             System.out.println("incEnumCount, new count:" + enumCount);
-@@ -1126,9 +1124,6 @@
- 
-     synchronized public void decEnumCount()
-             throws NamingException {
--        if (orbTracker == null) {
--            return;
--        }
-         enumCount--;
-         if (debug) {
-             System.out.println("decEnumCount, new count:" + enumCount +
-@@ -1140,14 +1135,15 @@
-     }
- 
-     synchronized public void close() throws NamingException {
--        if (orbTracker == null) {
--            return;
--        }
-+
-         if (enumCount > 0) {
-             isCloseCalled = true;
-             return;
-         }
--        orbTracker.decRefCount();
-+
-+        // Never destroy an orb in CNCtx.
-+        // The orb we have is either the shared/default orb, or one passed in to a constructor
-+        // from elsewhere, so that orb is somebody else's reponsibility.
-     }
- 
-     protected void finalize() {