svn commit: r316529 - in head/java/openjdk6: . files files/icedtea files/icedtea/openjdk files/icedtea/security/20130201 files/icedtea/security/20130416
Jung-uk Kim
jkim at FreeBSD.org
Thu Apr 25 20:03:57 UTC 2013
Author: jkim
Date: Thu Apr 25 20:03:56 2013
New Revision: 316529
URL: http://svnweb.freebsd.org/changeset/ports/316529
Log:
Add multiple security patches from IcedTea6 1.12.5.
http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2013-April/022985.html
Obtained from: IcedTea Project
Added:
head/java/openjdk6/files/icedtea/jaxp.patch (contents, props changed)
head/java/openjdk6/files/icedtea/jaxws.patch (contents, props changed)
head/java/openjdk6/files/icedtea/openjdk/
head/java/openjdk6/files/icedtea/openjdk/5102804-memory_leak.patch (contents, props changed)
head/java/openjdk6/files/icedtea/openjdk/6501644-icu_sync.patch (contents, props changed)
head/java/openjdk6/files/icedtea/openjdk/6669869-queries_per_appcontext.patch (contents, props changed)
head/java/openjdk6/files/icedtea/openjdk/6886358-layout_update.patch (contents, props changed)
head/java/openjdk6/files/icedtea/openjdk/6963811-deadlock_fix.patch (contents, props changed)
head/java/openjdk6/files/icedtea/openjdk/7017324-kerning_crash.patch (contents, props changed)
- copied unchanged from r316483, head/java/openjdk6/files/icedtea/7032388-work_without_cmov_instruction.patch
head/java/openjdk6/files/icedtea/openjdk/7036559-concurrenthashmap_improvements.patch (contents, props changed)
head/java/openjdk6/files/icedtea/openjdk/7064279-fixup.patch (contents, props changed)
head/java/openjdk6/files/icedtea/openjdk/7064279-resource_release.patch (contents, props changed)
head/java/openjdk6/files/icedtea/openjdk/7133220-factory_finder_parser_transform_useBSClassLoader.patch (contents, props changed)
head/java/openjdk6/files/icedtea/openjdk/8004302-soap_test_failure.patch (contents, props changed)
head/java/openjdk6/files/icedtea/security/20130416/
head/java/openjdk6/files/icedtea/security/20130416/6657673-factory_finder.patch (contents, props changed)
head/java/openjdk6/files/icedtea/security/20130416/6657673-fixup.patch (contents, props changed)
head/java/openjdk6/files/icedtea/security/20130416/6657673.patch (contents, props changed)
head/java/openjdk6/files/icedtea/security/20130416/7200507.patch (contents, props changed)
head/java/openjdk6/files/icedtea/security/20130416/8000724.patch (contents, props changed)
head/java/openjdk6/files/icedtea/security/20130416/8001031.patch (contents, props changed)
head/java/openjdk6/files/icedtea/security/20130416/8001040.patch (contents, props changed)
head/java/openjdk6/files/icedtea/security/20130416/8001322.patch (contents, props changed)
head/java/openjdk6/files/icedtea/security/20130416/8001329.patch (contents, props changed)
head/java/openjdk6/files/icedtea/security/20130416/8003335.patch (contents, props changed)
head/java/openjdk6/files/icedtea/security/20130416/8003445.patch (contents, props changed)
head/java/openjdk6/files/icedtea/security/20130416/8003543.patch (contents, props changed)
head/java/openjdk6/files/icedtea/security/20130416/8004261.patch (contents, props changed)
head/java/openjdk6/files/icedtea/security/20130416/8004336.patch (contents, props changed)
head/java/openjdk6/files/icedtea/security/20130416/8004986.patch (contents, props changed)
head/java/openjdk6/files/icedtea/security/20130416/8005432.patch (contents, props changed)
head/java/openjdk6/files/icedtea/security/20130416/8005943.patch (contents, props changed)
head/java/openjdk6/files/icedtea/security/20130416/8006309.patch (contents, props changed)
head/java/openjdk6/files/icedtea/security/20130416/8006435.patch (contents, props changed)
head/java/openjdk6/files/icedtea/security/20130416/8006790.patch (contents, props changed)
head/java/openjdk6/files/icedtea/security/20130416/8006795.patch (contents, props changed)
head/java/openjdk6/files/icedtea/security/20130416/8007406.patch (contents, props changed)
head/java/openjdk6/files/icedtea/security/20130416/8007617.patch (contents, props changed)
head/java/openjdk6/files/icedtea/security/20130416/8007667.patch (contents, props changed)
head/java/openjdk6/files/icedtea/security/20130416/8007918.patch (contents, props changed)
head/java/openjdk6/files/icedtea/security/20130416/8009063.patch (contents, props changed)
head/java/openjdk6/files/icedtea/security/20130416/8009305.patch (contents, props changed)
head/java/openjdk6/files/icedtea/security/20130416/8009699.patch (contents, props changed)
head/java/openjdk6/files/icedtea/security/20130416/8009814.patch (contents, props changed)
head/java/openjdk6/files/icedtea/security/20130416/8009857.patch (contents, props changed)
Directory Properties:
head/java/openjdk6/files/icedtea/openjdk/7032388-work_without_cmov_instruction.patch (props changed)
Deleted:
head/java/openjdk6/files/icedtea/7032388-work_without_cmov_instruction.patch
head/java/openjdk6/files/icedtea/security/20130201/8001235.patch
Modified:
head/java/openjdk6/Makefile
head/java/openjdk6/distinfo
head/java/openjdk6/files/patch-set
Directory Properties:
head/java/openjdk6/files/icedtea/applet_hole.patch (props changed)
head/java/openjdk6/files/icedtea/jpegclasses.patch (props changed)
Modified: head/java/openjdk6/Makefile
==============================================================================
--- head/java/openjdk6/Makefile Thu Apr 25 19:44:59 2013 (r316528)
+++ head/java/openjdk6/Makefile Thu Apr 25 20:03:56 2013 (r316529)
@@ -3,7 +3,7 @@
PORTNAME= openjdk6
PORTVERSION= b27
-PORTREVISION?= 2
+PORTREVISION?= 3
CATEGORIES= java devel
MASTER_SITES= http://download.java.net/openjdk/jdk6/promoted/${PORTVERSION}/ \
http://download.java.net/jaxp/openjdk/jdk6/:jaxp \
@@ -39,7 +39,9 @@ RUN_DEPENDS= javavm:${PORTSDIR}/java/jav
OPENJDK_BUILDDATE= 26_oct_2012
-EXTRA_PATCHES= ${FILESDIR}/icedtea/security/20120830/7182135-impossible_to_use_some_editors_directly.patch \
+EXTRA_PATCHES= ${FILESDIR}/icedtea/jaxp.patch \
+ ${FILESDIR}/icedtea/jaxws.patch \
+ ${FILESDIR}/icedtea/security/20120830/7182135-impossible_to_use_some_editors_directly.patch \
${FILESDIR}/icedtea/security/20130201/7201068.patch \
${FILESDIR}/icedtea/security/20130201/6563318.patch \
${FILESDIR}/icedtea/security/20130201/6664509.patch \
@@ -68,12 +70,52 @@ EXTRA_PATCHES= ${FILESDIR}/icedtea/secur
${FILESDIR}/icedtea/security/20130201/8001307.patch \
${FILESDIR}/icedtea/security/20130201/8001972.patch \
${FILESDIR}/icedtea/security/20130201/8002325.patch \
- ${FILESDIR}/icedtea/security/20130201/8001235.patch \
${FILESDIR}/icedtea/security/20130219/8006446.patch \
${FILESDIR}/icedtea/security/20130219/8006777.patch \
${FILESDIR}/icedtea/security/20130219/8007688.patch \
${FILESDIR}/icedtea/security/20130304/8007014.patch \
- ${FILESDIR}/icedtea/security/20130304/8007675.patch
+ ${FILESDIR}/icedtea/security/20130304/8007675.patch \
+ ${FILESDIR}/icedtea/openjdk/7036559-concurrenthashmap_improvements.patch \
+ ${FILESDIR}/icedtea/security/20130416/8009063.patch \
+ ${FILESDIR}/icedtea/openjdk/8004302-soap_test_failure.patch \
+ ${FILESDIR}/icedtea/security/20130416/6657673.patch \
+ ${FILESDIR}/icedtea/security/20130416/6657673-fixup.patch \
+ ${FILESDIR}/icedtea/openjdk/7133220-factory_finder_parser_transform_useBSClassLoader.patch \
+ ${FILESDIR}/icedtea/security/20130416/6657673-factory_finder.patch \
+ ${FILESDIR}/icedtea/openjdk/6669869-queries_per_appcontext.patch \
+ ${FILESDIR}/icedtea/openjdk/5102804-memory_leak.patch \
+ ${FILESDIR}/icedtea/openjdk/6963811-deadlock_fix.patch \
+ ${FILESDIR}/icedtea/openjdk/7064279-resource_release.patch \
+ ${FILESDIR}/icedtea/openjdk/7064279-fixup.patch \
+ ${FILESDIR}/icedtea/security/20130416/7200507.patch \
+ ${FILESDIR}/icedtea/security/20130416/8000724.patch \
+ ${FILESDIR}/icedtea/security/20130416/8004986.patch \
+ ${FILESDIR}/icedtea/openjdk/6501644-icu_sync.patch \
+ ${FILESDIR}/icedtea/openjdk/6886358-layout_update.patch \
+ ${FILESDIR}/icedtea/security/20130416/8001031.patch \
+ ${FILESDIR}/icedtea/openjdk/7017324-kerning_crash.patch \
+ ${FILESDIR}/icedtea/security/20130416/8001040.patch \
+ ${FILESDIR}/icedtea/security/20130416/8001322.patch \
+ ${FILESDIR}/icedtea/security/20130416/8001329.patch \
+ ${FILESDIR}/icedtea/security/20130416/8003335.patch \
+ ${FILESDIR}/icedtea/security/20130416/8003445.patch \
+ ${FILESDIR}/icedtea/security/20130416/8003543.patch \
+ ${FILESDIR}/icedtea/security/20130416/8004261.patch \
+ ${FILESDIR}/icedtea/security/20130416/8004336.patch \
+ ${FILESDIR}/icedtea/security/20130416/8005432.patch \
+ ${FILESDIR}/icedtea/security/20130416/8005943.patch \
+ ${FILESDIR}/icedtea/security/20130416/8006309.patch \
+ ${FILESDIR}/icedtea/security/20130416/8006435.patch \
+ ${FILESDIR}/icedtea/security/20130416/8006790.patch \
+ ${FILESDIR}/icedtea/security/20130416/8006795.patch \
+ ${FILESDIR}/icedtea/security/20130416/8007406.patch \
+ ${FILESDIR}/icedtea/security/20130416/8007617.patch \
+ ${FILESDIR}/icedtea/security/20130416/8007667.patch \
+ ${FILESDIR}/icedtea/security/20130416/8007918.patch \
+ ${FILESDIR}/icedtea/security/20130416/8009305.patch \
+ ${FILESDIR}/icedtea/security/20130416/8009699.patch \
+ ${FILESDIR}/icedtea/security/20130416/8009814.patch \
+ ${FILESDIR}/icedtea/security/20130416/8009857.patch
OPTIONS_DEFINE= ICEDTEA IPV6 POLICY SOUND TZUPDATE
OPTIONS_DEFAULT=ICEDTEA IPV6 TZUPDATE
@@ -98,7 +140,7 @@ USE_GMAKE= yes
USE_MOTIF= yes
USE_XORG= x11 xext xi xt xtst
-JAXP_BUILD= 144_04
+JAXP_BUILD= 144_05
JAXPFILE= jaxp${JAXP_BUILD}.zip
JAXWS_BUILD= 2_1_6-2011_06_13
JAXWSFILE= jdk6-jaxws${JAXWS_BUILD}.zip
@@ -148,6 +190,7 @@ BOOTSTRAPJDKDIR?= ${LOCALBASE}/bootstrap
BUILD_DEPENDS+= ${BOOTSTRAPJDKDIR}/bin/javac:${PORTSDIR}/java/bootstrap-openjdk
.endif
+FETCH_ARGS= -Fpr
MAKE_ENV= LANG=C LC_ALL=C OS= \
ALT_JDK_IMPORT_PATH=${BOOTSTRAPJDKDIR} \
ALT_BOOTDIR=${BOOTSTRAPJDKDIR} \
@@ -198,7 +241,7 @@ MAKE_ENV+= SKIP_FASTDEBUG_BUILD=true
.endif
.if ${PORT_OPTIONS:MICEDTEA}
-EXTRA_PATCHES+= ${FILESDIR}/icedtea/7032388-work_without_cmov_instruction.patch \
+EXTRA_PATCHES+= ${FILESDIR}/icedtea/openjdk/7032388-work_without_cmov_instruction.patch \
${FILESDIR}/icedtea/applet_hole.patch \
${FILESDIR}/icedtea/jpegclasses.patch
.endif
Modified: head/java/openjdk6/distinfo
==============================================================================
--- head/java/openjdk6/distinfo Thu Apr 25 19:44:59 2013 (r316528)
+++ head/java/openjdk6/distinfo Thu Apr 25 20:03:56 2013 (r316529)
@@ -1,7 +1,7 @@
SHA256 (openjdk-6-src-b27-26_oct_2012.tar.gz) = 044c3877b15940ff04f8aa817337f2878a00cc89674854557f1a02f15b1802a0
SIZE (openjdk-6-src-b27-26_oct_2012.tar.gz) = 45789350
-SHA256 (jaxp144_04.zip) = 490f696218c1fed9cb180680af883fe309b414fec232e9cec19645e12ad0b43c
-SIZE (jaxp144_04.zip) = 5976385
+SHA256 (jaxp144_05.zip) = c1a8a5a219fa55ecbf2ad43b66514335a3e96ccad40bd2ec9165a821343b2bff
+SIZE (jaxp144_05.zip) = 5976387
SHA256 (jdk6-jaxws2_1_6-2011_06_13.zip) = 229040544e791f44906e8e7b6f6faf503c730a5d854275135f3925490d5c3be3
SIZE (jdk6-jaxws2_1_6-2011_06_13.zip) = 5512710
SHA256 (jdk6-jaf-b20.zip) = 78c7b5c9d6271e88ee46abadd018a61f1e9645f8936cc8df1617e5f4f5074012
Added: head/java/openjdk6/files/icedtea/jaxp.patch
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/java/openjdk6/files/icedtea/jaxp.patch Thu Apr 25 20:03:56 2013 (r316529)
@@ -0,0 +1,15 @@
+--- jaxp/build.properties.orig 2012-10-26 14:23:11.000000000 -0400
++++ jaxp/build.properties 2013-04-25 14:25:15.000000000 -0400
+@@ -77,6 +77,12 @@
+ # Where patches to drop bundle sources live
+ patches.dir=patches
+
++# Patches to apply
++jaxp_src.patch.list=6657673.patch \
++ 6657673-fixup.patch \
++ 7133220-factory_finder_parser_transform_useBSClassLoader.patch \
++ 6657673-factory_finder.patch
++
+ # Sanity information
+ sanity.info= Sanity Settings:${line.separator}\
+ ant.home=${ant.home}${line.separator}\
Added: head/java/openjdk6/files/icedtea/jaxws.patch
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/java/openjdk6/files/icedtea/jaxws.patch Thu Apr 25 20:03:56 2013 (r316529)
@@ -0,0 +1,13 @@
+--- jaxws/build.properties.orig 2012-10-26 14:23:24.000000000 -0400
++++ jaxws/build.properties 2013-04-25 15:06:29.000000000 -0400
+@@ -77,6 +77,10 @@
+ # Where patches to drop bundle sources live
+ patches.dir=patches
+
++# Patches to apply
++jaxws_src.patch.list=8003543.patch \
++ 8005432.patch
++
+ # Sanity information
+ sanity.info= Sanity Settings:${line.separator}\
+ ant.home=${ant.home}${line.separator}\
Added: head/java/openjdk6/files/icedtea/openjdk/5102804-memory_leak.patch
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/java/openjdk6/files/icedtea/openjdk/5102804-memory_leak.patch Thu Apr 25 20:03:56 2013 (r316529)
@@ -0,0 +1,429 @@
+# HG changeset patch
+# User andrew
+# Date 1365704033 -3600
+# Node ID 06255d9f82761abc74c30f31fda00968ffef4bc3
+# Parent a939f541de9af5ccb78225c27cd46cd7dc6bcf87
+5102804: Memory leak in Introspector.getBeanInfo(Class) for custom BeanInfo: Class param (includes WeakCache from 6397609)
+Reviewed-by: peterz
+
+diff --git a/src/share/classes/com/sun/beans/WeakCache.java b/src/share/classes/com/sun/beans/WeakCache.java
+new file mode 100644
+--- /dev/null
++++ jdk/src/share/classes/com/sun/beans/WeakCache.java
+@@ -0,0 +1,91 @@
++/*
++ * Copyright 2008 Sun Microsystems, Inc. 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
++ * under the terms of the GNU General Public License version 2 only, as
++ * published by the Free Software Foundation. Sun designates this
++ * particular file as subject to the "Classpath" exception as provided
++ * by Sun in the LICENSE file that accompanied this code.
++ *
++ * This code is distributed in the hope that it will be useful, but WITHOUT
++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
++ * version 2 for more details (a copy is included in the LICENSE file that
++ * accompanied this code).
++ *
++ * You should have received a copy of the GNU General Public License version
++ * 2 along with this work; if not, write to the Free Software Foundation,
++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
++ *
++ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
++ * CA 95054 USA or visit www.sun.com if you need additional information or
++ * have any questions.
++ */
++package com.sun.beans;
++
++import java.lang.ref.Reference;
++import java.lang.ref.WeakReference;
++
++import java.util.Map;
++import java.util.WeakHashMap;
++
++/**
++ * A hashtable-based cache with weak keys and weak values.
++ * An entry in the map will be automatically removed
++ * when its key is no longer in the ordinary use.
++ * A value will be automatically removed as well
++ * when it is no longer in the ordinary use.
++ *
++ * @since 1.7
++ *
++ * @author Sergey A. Malenkov
++ */
++public final class WeakCache<K, V> {
++ private final Map<K, Reference<V>> map = new WeakHashMap<K, Reference<V>>();
++
++ /**
++ * Returns a value to which the specified {@code key} is mapped,
++ * or {@code null} if this map contains no mapping for the {@code key}.
++ *
++ * @param key the key whose associated value is returned
++ * @return a value to which the specified {@code key} is mapped
++ */
++ public V get(K key) {
++ Reference<V> reference = this.map.get(key);
++ if (reference == null) {
++ return null;
++ }
++ V value = reference.get();
++ if (value == null) {
++ this.map.remove(key);
++ }
++ return value;
++ }
++
++ /**
++ * Associates the specified {@code value} with the specified {@code key}.
++ * Removes the mapping for the specified {@code key} from this cache
++ * if it is present and the specified {@code value} is {@code null}.
++ * If the cache previously contained a mapping for the {@code key},
++ * the old value is replaced by the specified {@code value}.
++ *
++ * @param key the key with which the specified value is associated
++ * @param value the value to be associated with the specified key
++ */
++ public void put(K key, V value) {
++ if (value != null) {
++ this.map.put(key, new WeakReference<V>(value));
++ }
++ else {
++ this.map.remove(key);
++ }
++ }
++
++ /**
++ * Removes all of the mappings from this cache.
++ */
++ public void clear() {
++ this.map.clear();
++ }
++}
+diff --git a/src/share/classes/java/beans/Introspector.java b/src/share/classes/java/beans/Introspector.java
+--- jdk/src/share/classes/java/beans/Introspector.java
++++ jdk/src/share/classes/java/beans/Introspector.java
+@@ -25,25 +25,18 @@
+
+ package java.beans;
+
++import com.sun.beans.WeakCache;
+ import com.sun.beans.finder.ClassFinder;
+
+-import java.lang.ref.Reference;
+-import java.lang.ref.SoftReference;
+-
+ import java.lang.reflect.Method;
+ import java.lang.reflect.Modifier;
+
+-import java.security.AccessController;
+-import java.security.PrivilegedAction;
+-
+-import java.util.Collections;
+ import java.util.Map;
+ import java.util.ArrayList;
+ import java.util.HashMap;
+ import java.util.Iterator;
+ import java.util.EventListener;
+ import java.util.List;
+-import java.util.WeakHashMap;
+ import java.util.TreeMap;
+ import sun.awt.AppContext;
+ import sun.reflect.misc.ReflectUtil;
+@@ -110,8 +103,8 @@
+ public final static int IGNORE_ALL_BEANINFO = 3;
+
+ // Static Caches to speed up introspection.
+- private static Map declaredMethodCache =
+- Collections.synchronizedMap(new WeakHashMap());
++ private static WeakCache<Class<?>, Method[]> declaredMethodCache =
++ new WeakCache<Class<?>, Method[]>();
+
+ private static final Object BEANINFO_CACHE = new Object();
+
+@@ -177,20 +170,21 @@
+ if (!ReflectUtil.isPackageAccessible(beanClass)) {
+ return (new Introspector(beanClass, null, USE_ALL_BEANINFO)).getBeanInfo();
+ }
+- Map<Class<?>, BeanInfo> map;
+ synchronized (BEANINFO_CACHE) {
+- map = (Map<Class<?>, BeanInfo>) AppContext.getAppContext().get(BEANINFO_CACHE);
+- if (map == null) {
+- map = Collections.synchronizedMap(new WeakHashMap<Class<?>, BeanInfo>());
+- AppContext.getAppContext().put(BEANINFO_CACHE, map);
++ WeakCache<Class<?>, BeanInfo> beanInfoCache =
++ (WeakCache<Class<?>, BeanInfo>) AppContext.getAppContext().get(BEANINFO_CACHE);
++
++ if (beanInfoCache == null) {
++ beanInfoCache = new WeakCache<Class<?>, BeanInfo>();
++ AppContext.getAppContext().put(BEANINFO_CACHE, beanInfoCache);
+ }
++ BeanInfo beanInfo = beanInfoCache.get(beanClass);
++ if (beanInfo == null) {
++ beanInfo = (new Introspector(beanClass, null, USE_ALL_BEANINFO)).getBeanInfo();
++ beanInfoCache.put(beanClass, beanInfo);
++ }
++ return beanInfo;
+ }
+- BeanInfo bi = map.get(beanClass);
+- if (bi == null) {
+- bi = (new Introspector(beanClass, null, USE_ALL_BEANINFO)).getBeanInfo();
+- map.put(beanClass, bi);
+- }
+- return bi;
+ }
+
+ /**
+@@ -337,11 +331,13 @@
+ */
+
+ public static void flushCaches() {
+- Map map = (Map) AppContext.getAppContext().get(BEANINFO_CACHE);
+- if (map != null) {
+- map.clear();
++ synchronized (BEANINFO_CACHE) {
++ WeakCache beanInfoCache = (WeakCache) AppContext.getAppContext().get(BEANINFO_CACHE);
++ if (beanInfoCache != null) {
++ beanInfoCache.clear();
++ }
++ declaredMethodCache.clear();
+ }
+- declaredMethodCache.clear();
+ }
+
+ /**
+@@ -363,11 +359,13 @@
+ if (clz == null) {
+ throw new NullPointerException();
+ }
+- Map map = (Map) AppContext.getAppContext().get(BEANINFO_CACHE);
+- if (map != null) {
+- map.remove(clz);
++ synchronized (BEANINFO_CACHE) {
++ WeakCache beanInfoCache = (WeakCache) AppContext.getAppContext().get(BEANINFO_CACHE);
++ if (beanInfoCache != null) {
++ beanInfoCache.put(clz, null);
++ }
++ declaredMethodCache.put(clz, null);
+ }
+- declaredMethodCache.remove(clz);
+ }
+
+ //======================================================================
+@@ -1306,41 +1304,26 @@
+ /*
+ * Internal method to return *public* methods within a class.
+ */
+- private static synchronized Method[] getPublicDeclaredMethods(Class clz) {
++ private static Method[] getPublicDeclaredMethods(Class clz) {
+ // Looking up Class.getDeclaredMethods is relatively expensive,
+ // so we cache the results.
+- Method[] result = null;
+ if (!ReflectUtil.isPackageAccessible(clz)) {
+ return new Method[0];
+ }
+- final Class fclz = clz;
+- Reference ref = (Reference)declaredMethodCache.get(fclz);
+- if (ref != null) {
+- result = (Method[])ref.get();
+- if (result != null) {
+- return result;
++ synchronized (BEANINFO_CACHE) {
++ Method[] result = declaredMethodCache.get(clz);
++ if (result == null) {
++ result = clz.getMethods();
++ for (int i = 0; i < result.length; i++) {
++ Method method = result[i];
++ if (!method.getDeclaringClass().equals(clz)) {
++ result[i] = null;
++ }
++ }
++ declaredMethodCache.put(clz, result);
+ }
++ return result;
+ }
+-
+- // We have to raise privilege for getDeclaredMethods
+- result = (Method[]) AccessController.doPrivileged(new PrivilegedAction() {
+- public Object run() {
+- return fclz.getDeclaredMethods();
+- }
+- });
+-
+-
+- // Null out any non-public methods.
+- for (int i = 0; i < result.length; i++) {
+- Method method = result[i];
+- int mods = method.getModifiers();
+- if (!Modifier.isPublic(mods)) {
+- result[i] = null;
+- }
+- }
+- // Add it to the cache.
+- declaredMethodCache.put(fclz, new SoftReference(result));
+- return result;
+ }
+
+ //======================================================================
+diff --git a/test/java/beans/Introspector/Test5102804.java b/test/java/beans/Introspector/Test5102804.java
+new file mode 100644
+--- /dev/null
++++ jdk/test/java/beans/Introspector/Test5102804.java
+@@ -0,0 +1,155 @@
++/*
++ * Copyright 2009 Sun Microsystems, Inc. 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
++ * under the terms of the GNU General Public License version 2 only, as
++ * published by the Free Software Foundation.
++ *
++ * This code is distributed in the hope that it will be useful, but WITHOUT
++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
++ * version 2 for more details (a copy is included in the LICENSE file that
++ * accompanied this code).
++ *
++ * You should have received a copy of the GNU General Public License version
++ * 2 along with this work; if not, write to the Free Software Foundation,
++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
++ *
++ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
++ * CA 95054 USA or visit www.sun.com if you need additional information or
++ * have any questions.
++ */
++
++/*
++ * @test
++ * @bug 5102804
++ * @summary Tests memory leak
++ * @author Sergey Malenkov
++ */
++
++import java.beans.BeanInfo;
++import java.beans.IntrospectionException;
++import java.beans.Introspector;
++import java.beans.PropertyDescriptor;
++import java.beans.SimpleBeanInfo;
++import java.lang.ref.Reference;
++import java.lang.ref.WeakReference;
++import java.net.URL;
++import java.net.URLClassLoader;
++
++public class Test5102804 {
++ private static final String BEAN_NAME = "Test5102804$Example";
++ private static final String BEAN_INFO_NAME = BEAN_NAME + "BeanInfo";
++
++ public static void main(String[] args) {
++ if (!isCollectible(getReference()))
++ throw new Error("Reference is not collected");
++ }
++
++ private static Reference getReference() {
++ try {
++ ClassLoader loader = new Loader();
++ Class type = Class.forName(BEAN_NAME, true, loader);
++ if (!type.getClassLoader().equals(loader)) {
++ throw new Error("Wrong class loader");
++ }
++ BeanInfo info = Introspector.getBeanInfo(type);
++ if (0 != info.getDefaultPropertyIndex()) {
++ throw new Error("Wrong bean info found");
++ }
++ return new WeakReference<Class>(type);
++ }
++ catch (IntrospectionException exception) {
++ throw new Error("Introspection Error", exception);
++ }
++ catch (ClassNotFoundException exception) {
++ throw new Error("Class Not Found", exception);
++ }
++ }
++
++ private static boolean isCollectible(Reference reference) {
++ int[] array = new int[10];
++ while (true) {
++ try {
++ array = new int[array.length + array.length / 3];
++ }
++ catch (OutOfMemoryError error) {
++ return null == reference.get();
++ }
++ }
++ }
++
++ /**
++ * Custom class loader to load the Example class by itself.
++ * Could also load it from a different code source, but this is easier to set up.
++ */
++ private static final class Loader extends URLClassLoader {
++ Loader() {
++ super(new URL[] {
++ Test5102804.class.getProtectionDomain().getCodeSource().getLocation()
++ });
++ }
++
++ @Override
++ protected Class loadClass(String name, boolean resolve) throws ClassNotFoundException {
++ Class c = findLoadedClass(name);
++ if (c == null) {
++ if (BEAN_NAME.equals(name) || BEAN_INFO_NAME.equals(name)) {
++ c = findClass(name);
++ }
++ else try {
++ c = getParent().loadClass(name);
++ }
++ catch (ClassNotFoundException exception) {
++ c = findClass(name);
++ }
++ }
++ if (resolve) {
++ resolveClass(c);
++ }
++ return c;
++ }
++ }
++
++ /**
++ * A simple bean to load from the Loader class, not main class loader.
++ */
++ public static final class Example {
++ private int value;
++
++ public int getValue() {
++ return value;
++ }
++
++ public void setValue(int value) {
++ this.value = value;
++ }
++ }
++
++ /**
++ * The BeanInfo for the Example class.
++ * It is also loaded from the Loader class.
++ */
++ public static final class ExampleBeanInfo extends SimpleBeanInfo {
++ @Override
++ public int getDefaultPropertyIndex() {
++ return 0;
++ }
++
++ @Override
++ public PropertyDescriptor[] getPropertyDescriptors() {
++ try {
++ return new PropertyDescriptor[] {
++ new PropertyDescriptor("value", Class.forName(BEAN_NAME))
++ };
++ }
++ catch (ClassNotFoundException exception) {
++ return null;
++ }
++ catch (IntrospectionException exception) {
++ return null;
++ }
++ }
++ }
++}
Added: head/java/openjdk6/files/icedtea/openjdk/6501644-icu_sync.patch
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/java/openjdk6/files/icedtea/openjdk/6501644-icu_sync.patch Thu Apr 25 20:03:56 2013 (r316529)
@@ -0,0 +1,8066 @@
+# HG changeset patch
+# User andrew
+# Date 1365739093 -3600
+# Node ID e8ed86062291305172267be90dcec2acef7c15a8
+# Parent c7ddbf756d7f35d6e782eb91b86ce2938de44fb8
+6501644: sync LayoutEngine *code* structure to match ICU
+Reviewed-by: prr
+
+diff --git a/make/sun/font/Makefile b/make/sun/font/Makefile
+--- jdk/make/sun/font/Makefile
++++ jdk/make/sun/font/Makefile
+@@ -209,3 +209,7 @@
+ -I$(PLATFORM_SRC)/native/sun/java2d/d3d
+ endif
+
++# Make the Layout Engine build standalone
++CPPFLAGS += -DLE_STANDALONE
++
++
+diff --git a/src/share/native/sun/font/layout/AlternateSubstSubtables.cpp b/src/share/native/sun/font/layout/AlternateSubstSubtables.cpp
+--- jdk/src/share/native/sun/font/layout/AlternateSubstSubtables.cpp
++++ jdk/src/share/native/sun/font/layout/AlternateSubstSubtables.cpp
+@@ -37,6 +37,8 @@
+ #include "GlyphIterator.h"
+ #include "LESwaps.h"
+
++U_NAMESPACE_BEGIN
++
+ le_uint32 AlternateSubstitutionSubtable::process(GlyphIterator *glyphIterator, const LEGlyphFilter *filter) const
+ {
+ // NOTE: For now, we'll just pick the first alternative...
+@@ -64,3 +66,5 @@
+
+ return 0;
+ }
++
++U_NAMESPACE_END
+diff --git a/src/share/native/sun/font/layout/AlternateSubstSubtables.h b/src/share/native/sun/font/layout/AlternateSubstSubtables.h
+--- jdk/src/share/native/sun/font/layout/AlternateSubstSubtables.h
++++ jdk/src/share/native/sun/font/layout/AlternateSubstSubtables.h
+@@ -32,12 +32,19 @@
+ #ifndef __ALTERNATESUBSTITUTIONSUBTABLES_H
+ #define __ALTERNATESUBSTITUTIONSUBTABLES_H
+
++/**
++ * \file
++ * \internal
++ */
++
+ #include "LETypes.h"
+ #include "LEGlyphFilter.h"
+ #include "OpenTypeTables.h"
+ #include "GlyphSubstitutionTables.h"
+ #include "GlyphIterator.h"
+
++U_NAMESPACE_BEGIN
++
+ struct AlternateSetTable
+ {
+ le_uint16 glyphCount;
+@@ -52,4 +59,5 @@
+ le_uint32 process(GlyphIterator *glyphIterator, const LEGlyphFilter *filter = NULL) const;
+ };
+
++U_NAMESPACE_END
+ #endif
+diff --git a/src/share/native/sun/font/layout/AnchorTables.cpp b/src/share/native/sun/font/layout/AnchorTables.cpp
+--- jdk/src/share/native/sun/font/layout/AnchorTables.cpp
++++ jdk/src/share/native/sun/font/layout/AnchorTables.cpp
+@@ -35,6 +35,8 @@
+ #include "AnchorTables.h"
+ #include "LESwaps.h"
+
++U_NAMESPACE_BEGIN
++
+ void AnchorTable::getAnchor(LEGlyphID glyphID, const LEFontInstance *fontInstance,
+ LEPoint &anchor) const
+ {
+@@ -124,3 +126,6 @@
+
+ fontInstance->pixelsToUnits(pixels, anchor);
+ }
++
++U_NAMESPACE_END
++
+diff --git a/src/share/native/sun/font/layout/AnchorTables.h b/src/share/native/sun/font/layout/AnchorTables.h
+--- jdk/src/share/native/sun/font/layout/AnchorTables.h
++++ jdk/src/share/native/sun/font/layout/AnchorTables.h
+@@ -32,10 +32,17 @@
+ #ifndef __ANCHORTABLES_H
+ #define __ANCHORTABLES_H
+
++/**
++ * \file
++ * \internal
++ */
++
+ #include "LETypes.h"
+ #include "LEFontInstance.h"
+ #include "OpenTypeTables.h"
+
++U_NAMESPACE_BEGIN
++
+ struct AnchorTable
+ {
+ le_uint16 anchorFormat;
+@@ -66,5 +73,7 @@
+ void getAnchor(const LEFontInstance *fontInstance, LEPoint &anchor) const;
+ };
+
++U_NAMESPACE_END
++#endif
+
+-#endif
++
+diff --git a/src/share/native/sun/font/layout/ArabicLayoutEngine.cpp b/src/share/native/sun/font/layout/ArabicLayoutEngine.cpp
+--- jdk/src/share/native/sun/font/layout/ArabicLayoutEngine.cpp
++++ jdk/src/share/native/sun/font/layout/ArabicLayoutEngine.cpp
+@@ -49,23 +49,25 @@
+ #include "ArabicShaping.h"
+ #include "CanonShaping.h"
+
++U_NAMESPACE_BEGIN
++
+ le_bool CharSubstitutionFilter::accept(LEGlyphID glyph) const
+ {
+ return fFontInstance->canDisplay((LEUnicode) glyph);
+ }
+
+-ArabicOpenTypeLayoutEngine::ArabicOpenTypeLayoutEngine(
+- const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
+- le_int32 typoFlags, const GlyphSubstitutionTableHeader *gsubTable)
++UOBJECT_DEFINE_RTTI_IMPLEMENTATION(ArabicOpenTypeLayoutEngine)
++
++ArabicOpenTypeLayoutEngine::ArabicOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
++ le_int32 typoFlags, const GlyphSubstitutionTableHeader *gsubTable)
+ : OpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, gsubTable)
+ {
+ fFeatureMap = ArabicShaping::getFeatureMap(fFeatureMapCount);
+ fFeatureOrder = TRUE;
+ }
+
+-ArabicOpenTypeLayoutEngine::ArabicOpenTypeLayoutEngine(
+- const LEFontInstance *fontInstance,
+- le_int32 scriptCode, le_int32 languageCode, le_int32 typoFlags)
++ArabicOpenTypeLayoutEngine::ArabicOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
++ le_int32 typoFlags)
+ : OpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags)
+ {
+ fFeatureMap = ArabicShaping::getFeatureMap(fFeatureMapCount);
+@@ -86,9 +88,8 @@
+ // Input: characters
+ // Output: characters, char indices, tags
+ // Returns: output character count
+-le_int32 ArabicOpenTypeLayoutEngine::characterProcessing(const LEUnicode chars[],
+- le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
+- LEUnicode *&outChars, LEGlyphStorage &glyphStorage, LEErrorCode &success)
++le_int32 ArabicOpenTypeLayoutEngine::characterProcessing(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
++ LEUnicode *&outChars, LEGlyphStorage &glyphStorage, LEErrorCode &success)
+ {
+ if (LE_FAILURE(success)) {
+ return 0;
+@@ -124,8 +125,8 @@
+ return count;
+ }
+
+-void ArabicOpenTypeLayoutEngine::adjustGlyphPositions(const LEUnicode chars[], le_int32 offset,
+- le_int32 count, le_bool reverse, LEGlyphStorage &glyphStorage, LEErrorCode &success)
++void ArabicOpenTypeLayoutEngine::adjustGlyphPositions(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool reverse,
++ LEGlyphStorage &glyphStorage, LEErrorCode &success)
+ {
+ if (LE_FAILURE(success)) {
+ return;
+@@ -137,24 +138,20 @@
+ }
+
+ if (fGPOSTable != NULL) {
+- OpenTypeLayoutEngine::adjustGlyphPositions(chars, offset, count,
+- reverse, glyphStorage, success);
++ OpenTypeLayoutEngine::adjustGlyphPositions(chars, offset, count, reverse, glyphStorage, success);
+ } else if (fGDEFTable != NULL) {
+ GDEFMarkFilter filter(fGDEFTable);
+
+ adjustMarkGlyphs(glyphStorage, &filter, success);
+ } else {
+- GlyphDefinitionTableHeader *gdefTable =
+- (GlyphDefinitionTableHeader *) CanonShaping::glyphDefinitionTable;
++ GlyphDefinitionTableHeader *gdefTable = (GlyphDefinitionTableHeader *) CanonShaping::glyphDefinitionTable;
+ GDEFMarkFilter filter(gdefTable);
+
+ adjustMarkGlyphs(&chars[offset], count, reverse, glyphStorage, &filter, success);
+ }
+ }
+
+-UnicodeArabicOpenTypeLayoutEngine::UnicodeArabicOpenTypeLayoutEngine(
+- const LEFontInstance *fontInstance,
+- le_int32 scriptCode, le_int32 languageCode, le_int32 typoFlags)
++UnicodeArabicOpenTypeLayoutEngine::UnicodeArabicOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, le_int32 typoFlags)
+ : ArabicOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags | LE_CHAR_FILTER_FEATURE_FLAG)
+ {
+ fGSUBTable = (const GlyphSubstitutionTableHeader *) CanonShaping::glyphSubstitutionTable;
+@@ -168,8 +165,7 @@
+ }
+
+ // "glyphs", "indices" -> glyphs, indices
+-le_int32 UnicodeArabicOpenTypeLayoutEngine::glyphPostProcessing(
+- LEGlyphStorage &tempGlyphStorage, LEGlyphStorage &glyphStorage, LEErrorCode &success)
++le_int32 UnicodeArabicOpenTypeLayoutEngine::glyphPostProcessing(LEGlyphStorage &tempGlyphStorage, LEGlyphStorage &glyphStorage, LEErrorCode &success)
+ {
+ if (LE_FAILURE(success)) {
+ return 0;
+@@ -192,17 +188,14 @@
+
+ glyphStorage.adoptCharIndicesArray(tempGlyphStorage);
+
+- ArabicOpenTypeLayoutEngine::mapCharsToGlyphs(tempChars, 0, tempGlyphCount, FALSE,
+- TRUE, glyphStorage, success);
++ ArabicOpenTypeLayoutEngine::mapCharsToGlyphs(tempChars, 0, tempGlyphCount, FALSE, TRUE, glyphStorage, success);
+
+ LE_DELETE_ARRAY(tempChars);
+
+ return tempGlyphCount;
+ }
+
+-void UnicodeArabicOpenTypeLayoutEngine::mapCharsToGlyphs(const LEUnicode chars[],
+- le_int32 offset, le_int32 count, le_bool reverse, le_bool /*mirror*/,
+- LEGlyphStorage &glyphStorage, LEErrorCode &success)
++void UnicodeArabicOpenTypeLayoutEngine::mapCharsToGlyphs(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool reverse, le_bool /*mirror*/, LEGlyphStorage &glyphStorage, LEErrorCode &success)
+ {
+ if (LE_FAILURE(success)) {
+ return;
+@@ -227,9 +220,8 @@
+ }
+ }
+
+-void UnicodeArabicOpenTypeLayoutEngine::adjustGlyphPositions(const LEUnicode chars[],
+- le_int32 offset, le_int32 count, le_bool reverse,
+- LEGlyphStorage &glyphStorage, LEErrorCode &success)
++void UnicodeArabicOpenTypeLayoutEngine::adjustGlyphPositions(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool reverse,
++ LEGlyphStorage &glyphStorage, LEErrorCode &success)
+ {
+ if (LE_FAILURE(success)) {
+ return;
+@@ -244,3 +236,6 @@
+
+ adjustMarkGlyphs(&chars[offset], count, reverse, glyphStorage, &filter, success);
+ }
++
++U_NAMESPACE_END
++
+diff --git a/src/share/native/sun/font/layout/ArabicLayoutEngine.h b/src/share/native/sun/font/layout/ArabicLayoutEngine.h
+--- jdk/src/share/native/sun/font/layout/ArabicLayoutEngine.h
++++ jdk/src/share/native/sun/font/layout/ArabicLayoutEngine.h
+@@ -43,6 +43,8 @@
+ #include "GlyphDefinitionTables.h"
+ #include "GlyphPositioningTables.h"
+
++U_NAMESPACE_BEGIN
++
+ /**
+ * This class implements OpenType layout for Arabic fonts. It overrides
+ * the characerProcessing method to assign the correct OpenType feature
+@@ -71,8 +73,8 @@
+ *
+ * @internal
+ */
+- ArabicOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode,
+- le_int32 languageCode, le_int32 typoFlags, const GlyphSubstitutionTableHeader *gsubTable);
++ ArabicOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
++ le_int32 typoFlags, const GlyphSubstitutionTableHeader *gsubTable);
+
+ /**
+ * This constructor is used when the font requires a "canned" GSUB table which can't be known
+@@ -87,8 +89,8 @@
+ *
+ * @internal
+ */
+- ArabicOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode,
+- le_int32 languageCode, le_int32 typoFlags);
++ ArabicOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
++ le_int32 typoFlags);
+
+ /**
+ * The destructor, virtual for correct polymorphic invocation.
+@@ -97,6 +99,20 @@
+ */
+ virtual ~ArabicOpenTypeLayoutEngine();
+
++ /**
++ * ICU "poor man's RTTI", returns a UClassID for the actual class.
++ *
++ * @stable ICU 2.8
++ */
++ virtual UClassID getDynamicClassID() const;
++
++ /**
++ * ICU "poor man's RTTI", returns a UClassID for this class.
++ *
++ * @stable ICU 2.8
++ */
++ static UClassID getStaticClassID();
++
+ protected:
+
+ /**
+@@ -108,8 +124,7 @@
+ * @param offset - the index of the first character to process
+ * @param count - the number of characters to process
+ * @param max - the number of characters in the input context
+- * @param rightToLeft - <code>TRUE</code> if the characters are in a
+- * right to left directional run
++ * @param rightToLeft - <code>TRUE</code> if the characters are in a right to left directional run
+ *
+ * Output parameters:
+ * @param outChars - the output character arrayt
+@@ -121,9 +136,8 @@
+ *
+ * @internal
+ */
+- virtual le_int32 characterProcessing(const LEUnicode chars[], le_int32 offset,
+- le_int32 count, le_int32 max, le_bool rightToLeft,
+- LEUnicode *&outChars, LEGlyphStorage &glyphStorage, LEErrorCode &success);
++ virtual le_int32 characterProcessing(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
++ LEUnicode *&outChars, LEGlyphStorage &glyphStorage, LEErrorCode &success);
+
+ /**
+ * This method applies the GPOS table if it is present, otherwise it ensures that all vowel
+@@ -142,11 +156,9 @@
+ *
+ * @internal
+ */
+- virtual void adjustGlyphPositions(const LEUnicode chars[], le_int32 offset,
+- le_int32 count, le_bool reverse, LEGlyphStorage &glyphStorage, LEErrorCode &success);
++ virtual void adjustGlyphPositions(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool reverse, LEGlyphStorage &glyphStorage, LEErrorCode &success);
+
+- // static void adjustMarkGlyphs(const LEUnicode chars[], le_int32 offset, le_int32 count,
+- // le_bool rightToLeft, LEGlyphStorage &glyphStorage, LEErrorCode &success);
++ // static void adjustMarkGlyphs(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool rightToLeft, LEGlyphStorage &glyphStorage, LEErrorCode &success);
+
+ };
+
+@@ -178,8 +190,8 @@
+ *
+ * @internal
+ */
+- UnicodeArabicOpenTypeLayoutEngine(const LEFontInstance *fontInstance,
+- le_int32 scriptCode, le_int32 languageCode, le_int32 typoFlags);
++ UnicodeArabicOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
++ le_int32 typoFlags);
+
+ /**
+ * The destructor, virtual for correct polymorphic invocation.
+@@ -208,8 +220,7 @@
+ *
+ * @internal
+ */
+- virtual le_int32 glyphPostProcessing(LEGlyphStorage &tempGlyphStorage,
+- LEGlyphStorage &glyphStorage, LEErrorCode &success);
++ virtual le_int32 glyphPostProcessing(LEGlyphStorage &tempGlyphStorage, LEGlyphStorage &glyphStorage, LEErrorCode &success);
+
+ /**
+ * This method copies the input characters into the output glyph index array,
+@@ -227,8 +238,7 @@
+ *
+ * @internal
+ */
+- virtual void mapCharsToGlyphs(const LEUnicode chars[], le_int32 offset,
+- le_int32 count, le_bool reverse, le_bool mirror,
++ virtual void mapCharsToGlyphs(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool reverse, le_bool mirror,
+ LEGlyphStorage &glyphStorage, LEErrorCode &success);
+
+ /**
+@@ -245,8 +255,9 @@
+ *
+ * @internal
+ */
+- virtual void adjustGlyphPositions(const LEUnicode chars[], le_int32 offset,
+- le_int32 count, le_bool reverse, LEGlyphStorage &glyphStorage, LEErrorCode &success);
++ virtual void adjustGlyphPositions(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool reverse, LEGlyphStorage &glyphStorage, LEErrorCode &success);
+ };
+
++U_NAMESPACE_END
+ #endif
++
+diff --git a/src/share/native/sun/font/layout/ArabicShaping.cpp b/src/share/native/sun/font/layout/ArabicShaping.cpp
+--- jdk/src/share/native/sun/font/layout/ArabicShaping.cpp
++++ jdk/src/share/native/sun/font/layout/ArabicShaping.cpp
+@@ -35,6 +35,8 @@
+ #include "LEGlyphStorage.h"
+ #include "ClassDefinitionTables.h"
+
++U_NAMESPACE_BEGIN
++
+ // This table maps Unicode joining types to
+ // ShapeTypes.
+ const ArabicShaping::ShapeType ArabicShaping::shapeTypes[] =
+@@ -102,9 +104,7 @@
+ #define markFeatureMask 0x00040000UL
+ #define mkmkFeatureMask 0x00020000UL
+
+-#define ISOL_FEATURES (isolFeatureMask | ligaFeatureMask | msetFeatureMask | \
+- markFeatureMask | ccmpFeatureMask | rligFeatureMask | caltFeatureMask | \
+- dligFeatureMask | cswhFeatureMask | cursFeatureMask | kernFeatureMask | mkmkFeatureMask)
++#define ISOL_FEATURES (isolFeatureMask | ligaFeatureMask | msetFeatureMask | markFeatureMask | ccmpFeatureMask | rligFeatureMask | caltFeatureMask | dligFeatureMask | cswhFeatureMask | cursFeatureMask | kernFeatureMask | mkmkFeatureMask)
+
+ #define SHAPE_MASK 0xF0000000UL
+
+@@ -226,3 +226,5 @@
+ adjustTags(erout, 2, glyphStorage);
+ }
+ }
++
++U_NAMESPACE_END
+diff --git a/src/share/native/sun/font/layout/ArabicShaping.h b/src/share/native/sun/font/layout/ArabicShaping.h
+--- jdk/src/share/native/sun/font/layout/ArabicShaping.h
++++ jdk/src/share/native/sun/font/layout/ArabicShaping.h
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-ports-head
mailing list