Mercurial > hg > release > icedtea6-1.12
view patches/openjdk/8013196-TimeZone_getDefault_throws_exception.patch @ 3018:7d370df4beac
Add dependencies of 8013196 and remove SharedSecrets fragment of 8013196 which causes a TCK regression.
2013-08-05 Andrew John Hughes <gnu.andrew@redhat.com>
* Makefile.am:
(ICEDTEA_PATCHES): Add new patches.
* patches/openjdk/6636331-appcontext_concurrentmodificationexception.patch,
* patches/openjdk/6636370-appcontext_simplification.patch,
* patches/openjdk/7196533-timezone_bottleneck.patch:
Backport additional patches which relate to changes in 8013196.
* patches/openjdk/8013196-TimeZone_getDefault_throws_exception.patch:
Drop SharedSecrets changes which cause a TCK regression.
author | Andrew John Hughes <gnu.andrew@redhat.com> |
---|---|
date | Thu, 29 Aug 2013 16:14:55 +0100 |
parents | ce5dbd04cea5 |
children |
line wrap: on
line source
# HG changeset patch # User coffeys # Date 1367438524 -3600 # Node ID 0f93d6b18a16bf893b152a46df0e22e32666f7ce # Parent 55eaa0da2a8f6d9fe4966d3d9940258a1b0d4399 8013196: TimeZone.getDefault() throws NPE due to sun.awt.AppContext.getAppContext() Reviewed-by: mchung, okutsu --- openjdk/jdk/src/share/classes/sun/awt/AppContext.java +++ openjdk/jdk/src/share/classes/sun/awt/AppContext.java @@ -813,16 +813,24 @@ static { sun.misc.SharedSecrets.setJavaAWTAccess(new sun.misc.JavaAWTAccess() { public Object get(Object key) { - return getAppContext().get(key); + AppContext ac = getAppContext(); + return (ac == null) ? null : ac.get(key); } public void put(Object key, Object value) { - getAppContext().put(key, value); + AppContext ac = getAppContext(); + if (ac != null) { + ac.put(key, value); + } } public void remove(Object key) { - getAppContext().remove(key); + AppContext ac = getAppContext(); + if (ac != null) { + ac.remove(key); + } } public boolean isDisposed() { - return getAppContext().isDisposed(); + AppContext ac = getAppContext(); + return (ac == null) ? true : ac.isDisposed(); } public boolean isMainAppContext() { return (numAppContexts.get() == 1 && mainAppContext != null);