/hg/icedtea7-forest/jdk: 27 new changesets

andrew at icedtea.classpath.org andrew at icedtea.classpath.org
Mon Oct 19 07:33:33 UTC 2015


changeset 292a3c83426c in /hg/icedtea7-forest/jdk
details: http://icedtea.classpath.org/hg/icedtea7-forest/jdk?cmd=changeset;node=292a3c83426c
author: dmarkov
date: Tue Apr 14 16:33:01 2015 +0400

	8073453, PR2674: Focus doesn't move when pressing Shift + Tab keys
	Reviewed-by: alexsch, ant


changeset c53b04dd431b in /hg/icedtea7-forest/jdk
details: http://icedtea.classpath.org/hg/icedtea7-forest/jdk?cmd=changeset;node=c53b04dd431b
author: bagiras
date: Thu Feb 06 19:03:36 2014 +0400

	8020443, PR2674: Frame is not created on the specified GraphicsDevice with two monitors
	Reviewed-by: serb, azvegint, pchelko


changeset 4aa6fe242ac1 in /hg/icedtea7-forest/jdk
details: http://icedtea.classpath.org/hg/icedtea7-forest/jdk?cmd=changeset;node=4aa6fe242ac1
author: aivanov
date: Fri May 15 17:45:08 2015 +0300

	8033069, PR2674: mouse wheel scroll closes combobox popup
	Reviewed-by: serb, alexsch


changeset b7f33d5df6ca in /hg/icedtea7-forest/jdk
details: http://icedtea.classpath.org/hg/icedtea7-forest/jdk?cmd=changeset;node=b7f33d5df6ca
author: van
date: Tue May 12 14:52:24 2015 -0700

	8075609, PR2674: java.lang.IllegalArgumentException: aContainer is not a focus cycle root of aComponent
	Reviewed-by: alexsch, ant


changeset 9a77c69a0afd in /hg/icedtea7-forest/jdk
details: http://icedtea.classpath.org/hg/icedtea7-forest/jdk?cmd=changeset;node=9a77c69a0afd
author: bae
date: Fri Apr 24 19:44:15 2015 +0300

	8076455, PR2674: IME Composition Window is displayed on incorrect position
	Reviewed-by: serb, azvegint


changeset 0190d9f634ef in /hg/icedtea7-forest/jdk
details: http://icedtea.classpath.org/hg/icedtea7-forest/jdk?cmd=changeset;node=0190d9f634ef
author: ascarpino
date: Fri Aug 15 00:21:43 2014 -0700

	7107611, PR2674: sun.security.pkcs11.SessionManager is scalability blocker
	Reviewed-by: valeriep


changeset 3155cd41214d in /hg/icedtea7-forest/jdk
details: http://icedtea.classpath.org/hg/icedtea7-forest/jdk?cmd=changeset;node=3155cd41214d
author: khazra
date: Mon Jul 16 16:30:11 2012 -0700

	7177045, PR2674: Rework the TestProviderLeak.java regression test, it is too fragile to low memory errors.
	Summary: Increase Xmx to 20 MB and add mechanisms to eat up most of the JVM free memory.
	Reviewed-by: wetmore
	Contributed-by: dan.xu at oracle.com


changeset b5c8084aab9d in /hg/icedtea7-forest/jdk
details: http://icedtea.classpath.org/hg/icedtea7-forest/jdk?cmd=changeset;node=b5c8084aab9d
author: dxu
date: Fri Nov 01 14:40:03 2013 -0700

	8027624, PR2674: com/sun/crypto/provider/KeyFactory/TestProviderLeak.java unstable again
	Reviewed-by: wetmore


changeset c2de51240a2f in /hg/icedtea7-forest/jdk
details: http://icedtea.classpath.org/hg/icedtea7-forest/jdk?cmd=changeset;node=c2de51240a2f
author: coffeys
date: Fri Mar 27 19:13:47 2015 +0000

	8059588, PR2674: deadlock in java/io/PrintStream when verbose java.security.debug flags are set
	Reviewed-by: mullan


changeset 32b498cca7c9 in /hg/icedtea7-forest/jdk
details: http://icedtea.classpath.org/hg/icedtea7-forest/jdk?cmd=changeset;node=32b498cca7c9
author: ascarpino
date: Mon Sep 02 09:52:08 2013 -0700

	8009438, PR2674: sun/security/pkcs11/Secmod tests failing on Ubuntu 12.04
	Reviewed-by: vinnie


changeset 638b0faaf90d in /hg/icedtea7-forest/jdk
details: http://icedtea.classpath.org/hg/icedtea7-forest/jdk?cmd=changeset;node=638b0faaf90d
author: vinnie
date: Mon Mar 26 17:14:20 2012 +0100

	7152582, PR2674: PKCS11 tests should use the NSS libraries available in the OS
	Reviewed-by: mullan


changeset 055a3fe989a0 in /hg/icedtea7-forest/jdk
details: http://icedtea.classpath.org/hg/icedtea7-forest/jdk?cmd=changeset;node=055a3fe989a0
author: vinnie
date: Mon Oct 19 05:13:35 2015 +0100

	6880559, PR2674: Enable PKCS11 64-bit windows builds
	Reviewed-by: valeriep


changeset 0ea70d9d91f7 in /hg/icedtea7-forest/jdk
details: http://icedtea.classpath.org/hg/icedtea7-forest/jdk?cmd=changeset;node=0ea70d9d91f7
author: vinnie
date: Mon Oct 19 05:18:46 2015 +0100

	7190945, PR2674: pkcs11 problem loading NSS libs on Ubuntu
	Reviewed-by: xuelei, alanb


changeset c7a828995fce in /hg/icedtea7-forest/jdk
details: http://icedtea.classpath.org/hg/icedtea7-forest/jdk?cmd=changeset;node=c7a828995fce
author: ascarpino
date: Mon Oct 19 05:20:54 2015 +0100

	8012971, PR2674: PKCS11Test hiding exception failures
	Reviewed-by: vinnie, valeriep


changeset bd8fe1e15adf in /hg/icedtea7-forest/jdk
details: http://icedtea.classpath.org/hg/icedtea7-forest/jdk?cmd=changeset;node=bd8fe1e15adf
author: ascarpino
date: Mon Oct 19 05:32:51 2015 +0100

	8020424, PR2674: The NSS version should be detected before running crypto tests
	Reviewed-by: valeriep


changeset ee016a344b1a in /hg/icedtea7-forest/jdk
details: http://icedtea.classpath.org/hg/icedtea7-forest/jdk?cmd=changeset;node=ee016a344b1a
author: igerasim
date: Mon Oct 19 06:01:43 2015 +0100

	7011441, PR2674: jndi/ldap/Connection.java needs to avoid spurious wakeup
	Reviewed-by: dholmes


changeset 2a0261f09729 in /hg/icedtea7-forest/jdk
details: http://icedtea.classpath.org/hg/icedtea7-forest/jdk?cmd=changeset;node=2a0261f09729
author: robm
date: Mon Oct 19 06:31:48 2015 +0100

	8074350, PR2674: Support ISO 4217 "Current funds codes" table (A.2)
	Reviewed-by: naoto


changeset fdb3098cbe0b in /hg/icedtea7-forest/jdk
details: http://icedtea.classpath.org/hg/icedtea7-forest/jdk?cmd=changeset;node=fdb3098cbe0b
author: weijun
date: Wed Jul 09 15:10:42 2014 +0800

	7150092, PR2674: NTLM authentication fail if user specified a different realm
	Reviewed-by: michaelm


changeset 8391431d730f in /hg/icedtea7-forest/jdk
details: http://icedtea.classpath.org/hg/icedtea7-forest/jdk?cmd=changeset;node=8391431d730f
author: igerasim
date: Mon Oct 19 06:59:40 2015 +0100

	8077102, PR2674: dns_lookup_realm should be false by default
	Reviewed-by: weijun


changeset 2516b59724ee in /hg/icedtea7-forest/jdk
details: http://icedtea.classpath.org/hg/icedtea7-forest/jdk?cmd=changeset;node=2516b59724ee
author: ascarpino
date: Mon Oct 19 07:01:38 2015 +0100

	8039212, PR2674: SecretKeyBasic.sh needs to avoid NSS libnss3 and libsoftokn3 version mismatches
	Reviewed-by: vinnie


changeset 3d4cf1a1dcc9 in /hg/icedtea7-forest/jdk
details: http://icedtea.classpath.org/hg/icedtea7-forest/jdk?cmd=changeset;node=3d4cf1a1dcc9
author: xuelei
date: Mon Oct 19 07:16:10 2015 +0100

	7059542, PR2674: JNDI name operations should be locale independent
	Reviewed-by: weijun


changeset dcd82212656b in /hg/icedtea7-forest/jdk
details: http://icedtea.classpath.org/hg/icedtea7-forest/jdk?cmd=changeset;node=dcd82212656b
author: igerasim
date: Fri Jul 31 17:18:59 2015 +0300

	8005226, PR2674: java/rmi/transport/pinClientSocketFactory/PinClientSocketFactory.java fails intermittently
	Reviewed-by: rriggs, smarks


changeset e89e92ea187a in /hg/icedtea7-forest/jdk
details: http://icedtea.classpath.org/hg/icedtea7-forest/jdk?cmd=changeset;node=e89e92ea187a
author: aefimov
date: Wed Jun 10 16:47:52 2015 +0300

	7156085, PR2674: ArrayIndexOutOfBoundsException throws in UTF8Reader of SAXParser
	Summary: improve support for supplementary characters
	Reviewed-by: joehw


changeset 6d8e8389cd32 in /hg/icedtea7-forest/jdk
details: http://icedtea.classpath.org/hg/icedtea7-forest/jdk?cmd=changeset;node=6d8e8389cd32
author: weijun
date: Thu Jul 02 09:19:42 2015 +0800

	8076040, PR2674: Test com/sun/crypto/provider/KeyFactory/TestProviderLeak.java fails with -XX:+UseG1GC
	Reviewed-by: darcy


changeset b8ab3f839540 in /hg/icedtea7-forest/jdk
details: http://icedtea.classpath.org/hg/icedtea7-forest/jdk?cmd=changeset;node=b8ab3f839540
author: weijun
date: Thu Jul 02 13:20:46 2015 +0800

	8130297, PR2674: com/sun/crypto/provider/KeyFactory/TestProviderLeak.java still failing after JDK-8076040
	Reviewed-by: darcy


changeset 64e4f78f18c6 in /hg/icedtea7-forest/jdk
details: http://icedtea.classpath.org/hg/icedtea7-forest/jdk?cmd=changeset;node=64e4f78f18c6
author: mcherkas
date: Wed Jun 03 17:48:27 2015 +0300

	8077409, PR2674: Drawing deviates when validate() is invoked on java.awt.ScrollPane
	Reviewed-by: bae


changeset 10aef0978975 in /hg/icedtea7-forest/jdk
details: http://icedtea.classpath.org/hg/icedtea7-forest/jdk?cmd=changeset;node=10aef0978975
author: andrew
date: Mon Oct 19 08:01:47 2015 +0100

	Bump to icedtea-2.7.0pre04


diffstat:

 make/jdk_generic_profile.sh                                                |    2 +-
 make/sun/security/Makefile                                                 |   11 +-
 make/tools/src/build/tools/generatecurrencydata/GenerateCurrencyData.java  |   60 +-
 src/share/classes/com/sun/jndi/ldap/ClientId.java                          |   13 +-
 src/share/classes/com/sun/jndi/ldap/Connection.java                        |   22 +-
 src/share/classes/com/sun/jndi/ldap/LdapClient.java                        |   10 +-
 src/share/classes/com/sun/jndi/ldap/LdapCtx.java                           |    3 +-
 src/share/classes/com/sun/jndi/ldap/LdapName.java                          |   12 +-
 src/share/classes/com/sun/jndi/ldap/LdapPoolManager.java                   |    3 +-
 src/share/classes/com/sun/jndi/toolkit/dir/HierMemDirCtx.java              |    2 +-
 src/share/classes/com/sun/jndi/toolkit/dir/SearchFilter.java               |   15 +-
 src/share/classes/com/sun/security/ntlm/Client.java                        |   31 +-
 src/share/classes/com/sun/security/ntlm/NTLM.java                          |    4 +-
 src/share/classes/com/sun/security/ntlm/Server.java                        |   10 +-
 src/share/classes/com/sun/security/sasl/ntlm/NTLMClient.java               |   12 +-
 src/share/classes/com/sun/security/sasl/ntlm/NTLMServer.java               |    6 +-
 src/share/classes/java/awt/ContainerOrderFocusTraversalPolicy.java         |    5 +-
 src/share/classes/java/awt/ScrollPane.java                                 |    3 +-
 src/share/classes/java/security/KeyRep.java                                |    3 +-
 src/share/classes/java/security/Security.java                              |    9 +-
 src/share/classes/java/util/Currency.java                                  |   44 +-
 src/share/classes/java/util/CurrencyData.properties                        |   20 +-
 src/share/classes/javax/naming/NameImpl.java                               |   15 +-
 src/share/classes/javax/naming/directory/BasicAttributes.java              |    7 +-
 src/share/classes/javax/naming/ldap/Rdn.java                               |    9 +-
 src/share/classes/javax/swing/SortingFocusTraversalPolicy.java             |    5 +-
 src/share/classes/javax/swing/plaf/basic/BasicComboBoxUI.java              |   44 +-
 src/share/classes/javax/swing/plaf/basic/BasicComboPopup.java              |   29 +-
 src/share/classes/javax/swing/plaf/basic/BasicPopupMenuUI.java             |    4 +-
 src/share/classes/javax/swing/plaf/basic/BasicRadioButtonUI.java           |    2 +-
 src/share/classes/sun/security/jgss/krb5/Krb5NameElement.java              |    3 +-
 src/share/classes/sun/security/krb5/Config.java                            |   51 +-
 src/share/classes/sun/security/krb5/PrincipalName.java                     |    7 +-
 src/share/classes/sun/security/pkcs11/Secmod.java                          |   19 +-
 src/share/classes/sun/security/pkcs11/SessionManager.java                  |   85 +-
 src/share/classes/sun/security/pkcs12/PKCS12KeyStore.java                  |   29 +-
 src/share/classes/sun/security/provider/JavaKeyStore.java                  |    2 +-
 src/share/classes/sun/security/provider/certpath/ldap/LDAPCertStore.java   |    3 +-
 src/share/classes/sun/security/ssl/SSLSessionContextImpl.java              |    4 +-
 src/share/classes/sun/security/tools/KeyStoreUtil.java                     |    4 +-
 src/share/classes/sun/security/util/HostnameChecker.java                   |    8 +-
 src/share/classes/sun/security/x509/DNSName.java                           |    2 +-
 src/share/classes/sun/security/x509/RFC822Name.java                        |    2 +-
 src/solaris/classes/sun/awt/X11/XToolkit.java                              |   30 +-
 src/solaris/classes/sun/net/www/protocol/http/ntlm/NTLMAuthentication.java |    9 +-
 src/windows/native/sun/windows/awt_Component.cpp                           |    8 +-
 test/ProblemList.txt                                                       |    3 +
 test/com/sun/crypto/provider/KeyFactory/TestProviderLeak.java              |  111 +++-
 test/com/sun/security/sasl/ntlm/NTLMTest.java                              |   78 +--
 test/java/awt/Focus/8073453/AWTFocusTransitionTest.java                    |  115 ++++
 test/java/awt/Focus/8073453/SwingFocusTransitionTest.java                  |  131 +++++
 test/java/awt/Multiscreen/MultiScreenInsetsTest/MultiScreenInsetsTest.java |   89 +++
 test/java/awt/ScrollPane/bug8077409Test.java                               |  115 ++++
 test/java/rmi/testlibrary/TestLibrary.java                                 |   10 +
 test/java/rmi/transport/pinClientSocketFactory/PinClientSocketFactory.java |    8 +-
 test/java/util/Currency/CurrencyTest.java                                  |   40 +-
 test/java/util/Currency/PropertiesTest.java                                |   12 +-
 test/java/util/Currency/PropertiesTest.sh                                  |   24 +-
 test/java/util/Currency/ValidateISO4217.java                               |    3 +-
 test/java/util/Currency/currency.properties                                |   17 +-
 test/java/util/Currency/tablea1.txt                                        |    5 +-
 test/javax/naming/ldap/LdapName/CompareToEqualsTests.java                  |   87 ++-
 test/javax/swing/JComboBox/8033069/bug8033069NoScrollBar.java              |  182 +++++++
 test/javax/swing/JComboBox/8033069/bug8033069ScrollBar.java                |   52 ++
 test/javax/swing/JRadioButton/8075609/bug8075609.java                      |  115 ++++
 test/javax/xml/jaxp/testng/parse/jdk7156085/UTF8ReaderBug.java             |   64 ++
 test/sun/security/krb5/ConfPlusProp.java                                   |   33 +-
 test/sun/security/krb5/DnsFallback.java                                    |   48 +-
 test/sun/security/krb5/config/DNS.java                                     |   12 +-
 test/sun/security/krb5/confplusprop.conf                                   |    2 +-
 test/sun/security/krb5/confplusprop2.conf                                  |    2 +-
 test/sun/security/pkcs11/KeyStore/SecretKeysBasic.java                     |   30 +-
 test/sun/security/pkcs11/PKCS11Test.java                                   |  232 ++++++++-
 test/sun/security/pkcs11/README                                            |   22 +
 test/sun/security/pkcs11/SecmodTest.java                                   |    1 +
 test/sun/security/pkcs11/ec/ReadCertificates.java                          |   16 +-
 test/sun/security/pkcs11/ec/TestCurves.java                                |   33 +-
 test/sun/security/pkcs11/ec/TestECDH.java                                  |    8 +-
 test/sun/security/pkcs11/ec/TestECDH2.java                                 |    9 +-
 test/sun/security/pkcs11/ec/TestECDSA.java                                 |   24 +-
 test/sun/security/pkcs11/ec/TestECDSA2.java                                |    9 +-
 test/sun/security/pkcs11/ec/TestECGenSpec.java                             |   19 +-
 test/sun/security/pkcs11/ec/TestKeyFactory.java                            |   14 +-
 test/sun/security/tools/keytool/autotest.sh                                |    8 +-
 84 files changed, 1960 insertions(+), 504 deletions(-)

diffs (truncated from 4428 to 500 lines):

diff -r e215e6dd96e7 -r 10aef0978975 make/jdk_generic_profile.sh
--- a/make/jdk_generic_profile.sh	Fri May 29 11:05:52 2015 +0200
+++ b/make/jdk_generic_profile.sh	Mon Oct 19 08:01:47 2015 +0100
@@ -671,7 +671,7 @@
 
 # IcedTea versioning
 export ICEDTEA_NAME="IcedTea"
-export PACKAGE_VERSION="2.7.0pre03"
+export PACKAGE_VERSION="2.7.0pre04"
 export DERIVATIVE_ID="${ICEDTEA_NAME} ${PACKAGE_VERSION}"
 echo "Building ${DERIVATIVE_ID}"
 
diff -r e215e6dd96e7 -r 10aef0978975 make/sun/security/Makefile
--- a/make/sun/security/Makefile	Fri May 29 11:05:52 2015 +0200
+++ b/make/sun/security/Makefile	Mon Oct 19 08:01:47 2015 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
 # Copyright (c) 2013 Red Hat, Inc. and/or its affiliates.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
@@ -43,15 +43,8 @@
     JGSS_WRAPPER = jgss/wrapper
 endif
 
-# Build PKCS#11 on all platforms except 64-bit Windows.
-# We exclude windows-amd64 because we don't have any
-# 64-bit PKCS#11 implementations to test with on that platform.
+# Build PKCS#11 on all platforms
 PKCS11 = pkcs11
-ifeq ($(ARCH_DATA_MODEL), 64)
-  ifeq ($(PLATFORM), windows)
-    PKCS11 =
-  endif
-endif
 
 # Build krb5/internal/ccache only on Linux and Solaris platforms.
 KRB5_CCACHE =
diff -r e215e6dd96e7 -r 10aef0978975 make/tools/src/build/tools/generatecurrencydata/GenerateCurrencyData.java
--- a/make/tools/src/build/tools/generatecurrencydata/GenerateCurrencyData.java	Fri May 29 11:05:52 2015 +0200
+++ b/make/tools/src/build/tools/generatecurrencydata/GenerateCurrencyData.java	Mon Oct 19 08:01:47 2015 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2015, 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
@@ -72,10 +72,6 @@
     private static String formatVersion;
     private static String dataVersion;
     private static String validCurrencyCodes;
-    private static String currenciesWith0MinorUnitDecimals;
-    private static String currenciesWith1MinorUnitDecimal;
-    private static String currenciesWith3MinorUnitDecimal;
-    private static String currenciesWithMinorUnitsUndefined;
 
     // handy constants - must match definitions in java.util.Currency
     // magic number
@@ -83,29 +79,31 @@
     // number of characters from A to Z
     private static final int A_TO_Z = ('Z' - 'A') + 1;
     // entry for invalid country codes
-    private static final int INVALID_COUNTRY_ENTRY = 0x007F;
+    private static final int INVALID_COUNTRY_ENTRY = 0x0000007F;
     // entry for countries without currency
-    private static final int COUNTRY_WITHOUT_CURRENCY_ENTRY = 0x0080;
+    private static final int COUNTRY_WITHOUT_CURRENCY_ENTRY = 0x00000200;
     // mask for simple case country entries
-    private static final int SIMPLE_CASE_COUNTRY_MASK = 0x0000;
+    private static final int SIMPLE_CASE_COUNTRY_MASK = 0x00000000;
     // mask for simple case country entry final character
-    private static final int SIMPLE_CASE_COUNTRY_FINAL_CHAR_MASK = 0x001F;
+    private static final int SIMPLE_CASE_COUNTRY_FINAL_CHAR_MASK = 0x0000001F;
     // mask for simple case country entry default currency digits
-    private static final int SIMPLE_CASE_COUNTRY_DEFAULT_DIGITS_MASK = 0x0060;
+    private static final int SIMPLE_CASE_COUNTRY_DEFAULT_DIGITS_MASK = 0x000001E0;
     // shift count for simple case country entry default currency digits
     private static final int SIMPLE_CASE_COUNTRY_DEFAULT_DIGITS_SHIFT = 5;
+    // maximum number for simple case country entry default currency digits
+    private static final int SIMPLE_CASE_COUNTRY_MAX_DEFAULT_DIGITS = 9;
     // mask for special case country entries
-    private static final int SPECIAL_CASE_COUNTRY_MASK = 0x0080;
+    private static final int SPECIAL_CASE_COUNTRY_MASK = 0x00000200;
     // mask for special case country index
-    private static final int SPECIAL_CASE_COUNTRY_INDEX_MASK = 0x001F;
+    private static final int SPECIAL_CASE_COUNTRY_INDEX_MASK = 0x0000001F;
     // delta from entry index component in main table to index into special case tables
     private static final int SPECIAL_CASE_COUNTRY_INDEX_DELTA = 1;
     // mask for distinguishing simple and special case countries
     private static final int COUNTRY_TYPE_MASK = SIMPLE_CASE_COUNTRY_MASK | SPECIAL_CASE_COUNTRY_MASK;
     // mask for the numeric code of the currency
-    private static final int NUMERIC_CODE_MASK = 0x0003FF00;
+    private static final int NUMERIC_CODE_MASK = 0x000FFC00;
     // shift count for the numeric code of the currency
-    private static final int NUMERIC_CODE_SHIFT = 8;
+    private static final int NUMERIC_CODE_SHIFT = 10;
 
     // generated data
     private static int[] mainTable = new int[A_TO_Z * A_TO_Z];
@@ -120,7 +118,7 @@
     private static int[] specialCaseOldCurrenciesNumericCode = new int[maxSpecialCases];
     private static int[] specialCaseNewCurrenciesNumericCode = new int[maxSpecialCases];
 
-    private static final int maxOtherCurrencies = 70;
+    private static final int maxOtherCurrencies = 128;
     private static int otherCurrenciesCount = 0;
     private static StringBuffer otherCurrencies = new StringBuffer();
     private static int[] otherCurrenciesDefaultFractionDigits = new int[maxOtherCurrencies];
@@ -129,6 +127,11 @@
     // date format for parsing cut-over times
     private static SimpleDateFormat format;
 
+    // Minor Units
+    private static String[] currenciesWithDefinedMinorUnitDecimals =
+        new String[SIMPLE_CASE_COUNTRY_MAX_DEFAULT_DIGITS + 1];
+    private static String currenciesWithMinorUnitsUndefined;
+
     public static void main(String[] args) {
 
         // Look for "-o outputfilename" option
@@ -171,16 +174,14 @@
         formatVersion = (String) currencyData.get("formatVersion");
         dataVersion = (String) currencyData.get("dataVersion");
         validCurrencyCodes = (String) currencyData.get("all");
-        currenciesWith0MinorUnitDecimals  = (String) currencyData.get("minor0");
-        currenciesWith1MinorUnitDecimal  = (String) currencyData.get("minor1");
-        currenciesWith3MinorUnitDecimal  = (String) currencyData.get("minor3");
+        for (int i = 0; i <= SIMPLE_CASE_COUNTRY_MAX_DEFAULT_DIGITS; i++) {
+            currenciesWithDefinedMinorUnitDecimals[i]
+                = (String) currencyData.get("minor"+i);
+        }
         currenciesWithMinorUnitsUndefined  = (String) currencyData.get("minorUndefined");
         if (formatVersion == null ||
                 dataVersion == null ||
                 validCurrencyCodes == null ||
-                currenciesWith0MinorUnitDecimals == null ||
-                currenciesWith1MinorUnitDecimal == null ||
-                currenciesWith3MinorUnitDecimal == null ||
                 currenciesWithMinorUnitsUndefined == null) {
             throw new NullPointerException("not all required data is defined in input");
         }
@@ -207,7 +208,7 @@
                         if (currencyInfo.charAt(0) == firstChar && currencyInfo.charAt(1) == secondChar) {
                             checkCurrencyCode(currencyInfo);
                             int digits = getDefaultFractionDigits(currencyInfo);
-                            if (digits < 0 || digits > 3) {
+                            if (digits < 0 || digits > SIMPLE_CASE_COUNTRY_MAX_DEFAULT_DIGITS) {
                                 throw new RuntimeException("fraction digits out of range for " + currencyInfo);
                             }
                             int numericCode= getNumericCode(currencyInfo);
@@ -231,13 +232,14 @@
     }
 
     private static int getDefaultFractionDigits(String currencyCode) {
-        if (currenciesWith0MinorUnitDecimals.indexOf(currencyCode) != -1) {
-            return 0;
-        } else if (currenciesWith1MinorUnitDecimal.indexOf(currencyCode) != -1) {
-            return 1;
-        } else if (currenciesWith3MinorUnitDecimal.indexOf(currencyCode) != -1) {
-            return 3;
-        } else if (currenciesWithMinorUnitsUndefined.indexOf(currencyCode) != -1) {
+        for (int i = 0; i <= SIMPLE_CASE_COUNTRY_MAX_DEFAULT_DIGITS; i++) {
+            if (currenciesWithDefinedMinorUnitDecimals[i] != null &&
+                currenciesWithDefinedMinorUnitDecimals[i].indexOf(currencyCode) != -1) {
+                return i;
+            }
+        }
+
+        if (currenciesWithMinorUnitsUndefined.indexOf(currencyCode) != -1) {
             return -1;
         } else {
             return 2;
diff -r e215e6dd96e7 -r 10aef0978975 src/share/classes/com/sun/jndi/ldap/ClientId.java
--- a/src/share/classes/com/sun/jndi/ldap/ClientId.java	Fri May 29 11:05:52 2015 +0200
+++ b/src/share/classes/com/sun/jndi/ldap/ClientId.java	Mon Oct 19 08:01:47 2015 +0100
@@ -25,6 +25,7 @@
 
 package com.sun.jndi.ldap;
 
+import java.util.Locale;
 import java.util.Arrays; // JDK 1.2
 import java.io.OutputStream;
 import javax.naming.ldap.Control;
@@ -71,7 +72,7 @@
     ClientId(int version, String hostname, int port, String protocol,
             Control[] bindCtls, OutputStream trace, String socketFactory) {
         this.version = version;
-        this.hostname = hostname.toLowerCase();  // ignore case
+        this.hostname = hostname.toLowerCase(Locale.ENGLISH);  // ignore case
         this.port = port;
         this.protocol = protocol;
         this.bindCtls = (bindCtls != null ? (Control[]) bindCtls.clone() : null);
@@ -83,13 +84,15 @@
         if ((socketFactory != null) &&
              !socketFactory.equals(LdapCtx.DEFAULT_SSL_FACTORY)) {
             try {
-                Class socketFactoryClass = Obj.helper.loadClass(socketFactory);
+                Class<?> socketFactoryClass =
+                        Obj.helper.loadClass(socketFactory);
                 Class objClass = Class.forName("java.lang.Object");
                 this.sockComparator = socketFactoryClass.getMethod(
                                 "compare", new Class[]{objClass, objClass});
-                Method getDefault =
-                    socketFactoryClass.getMethod("getDefault", new Class[]{});
-                this.factory = (SocketFactory) getDefault.invoke(null, new Object[]{});
+                Method getDefault = socketFactoryClass.getMethod(
+                                            "getDefault", new Class<?>[]{});
+                this.factory =
+                        (SocketFactory)getDefault.invoke(null, new Object[]{});
             } catch (Exception e) {
                 // Ignore it here, the same exceptions are/will be handled by
                 // LdapPoolManager and Connection classes.
diff -r e215e6dd96e7 -r 10aef0978975 src/share/classes/com/sun/jndi/ldap/Connection.java
--- a/src/share/classes/com/sun/jndi/ldap/Connection.java	Fri May 29 11:05:52 2015 +0200
+++ b/src/share/classes/com/sun/jndi/ldap/Connection.java	Mon Oct 19 08:01:47 2015 +0100
@@ -444,9 +444,14 @@
     BerDecoder readReply(LdapRequest ldr)
             throws IOException, NamingException {
         BerDecoder rber;
-        boolean waited = false;
 
-        while (((rber = ldr.getReplyBer()) == null) && !waited) {
+        // Track down elapsed time to workaround spurious wakeups
+        long elapsedMilli = 0;
+        long elapsedNano = 0;
+
+        while (((rber = ldr.getReplyBer()) == null) &&
+                (readTimeout <= 0 || elapsedMilli < readTimeout))
+        {
             try {
                 // If socket closed, don't even try
                 synchronized (this) {
@@ -460,10 +465,15 @@
                     rber = ldr.getReplyBer();
                     if (rber == null) {
                         if (readTimeout > 0) {  // Socket read timeout is specified
-                            // will be woken up before readTimeout only if reply is
+                            long beginNano = System.nanoTime();
+
+                            // will be woken up before readTimeout if reply is
                             // available
-                            ldr.wait(readTimeout);
-                            waited = true;
+                            ldr.wait(readTimeout - elapsedMilli);
+                            elapsedNano += (System.nanoTime() - beginNano);
+                            elapsedMilli += elapsedNano / 1000_000;
+                            elapsedNano %= 1000_000;
+
                         } else {
                             // no timeout is set so we wait infinitely until
                             // a response is received
@@ -480,7 +490,7 @@
             }
         }
 
-        if ((rber == null) && waited) {
+        if ((rber == null) && (elapsedMilli >= readTimeout)) {
             abandonRequest(ldr, null);
             throw new NamingException("LDAP response read timed out, timeout used:"
                             + readTimeout + "ms." );
diff -r e215e6dd96e7 -r 10aef0978975 src/share/classes/com/sun/jndi/ldap/LdapClient.java
--- a/src/share/classes/com/sun/jndi/ldap/LdapClient.java	Fri May 29 11:05:52 2015 +0200
+++ b/src/share/classes/com/sun/jndi/ldap/LdapClient.java	Mon Oct 19 08:01:47 2015 +0100
@@ -27,6 +27,7 @@
 
 import java.net.*;
 import java.io.*;
+import java.util.Locale;
 import java.util.Vector;
 import java.util.Hashtable;
 
@@ -745,13 +746,14 @@
         if (hasBinaryValues) {
             la.add(ber.parseOctetString(ber.peekByte(), len));
         } else {
-            la.add(ber.parseStringWithTag(Ber.ASN_SIMPLE_STRING, isLdapv3, len));
+            la.add(ber.parseStringWithTag(
+                                    Ber.ASN_SIMPLE_STRING, isLdapv3, len));
         }
         return len[0];
     }
 
     private boolean isBinaryValued(String attrid, Hashtable binaryAttrs) {
-        String id = attrid.toLowerCase();
+        String id = attrid.toLowerCase(Locale.ENGLISH);
 
         return ((id.indexOf(";binary") != -1) ||
             defaultBinaryAttrs.containsKey(id) ||
@@ -759,8 +761,8 @@
     }
 
     // package entry point; used by Connection
-    static void parseResult(BerDecoder replyBer, LdapResult res, boolean isLdapv3)
-        throws IOException {
+    static void parseResult(BerDecoder replyBer, LdapResult res,
+            boolean isLdapv3) throws IOException {
 
         res.status = replyBer.parseEnumeration();
         res.matchedDN = replyBer.parseString(isLdapv3);
diff -r e215e6dd96e7 -r 10aef0978975 src/share/classes/com/sun/jndi/ldap/LdapCtx.java
--- a/src/share/classes/com/sun/jndi/ldap/LdapCtx.java	Fri May 29 11:05:52 2015 +0200
+++ b/src/share/classes/com/sun/jndi/ldap/LdapCtx.java	Mon Oct 19 08:01:47 2015 +0100
@@ -33,6 +33,7 @@
 import javax.naming.ldap.LdapName;
 import javax.naming.ldap.Rdn;
 
+import java.util.Locale;
 import java.util.Vector;
 import java.util.Hashtable;
 import java.util.List;
@@ -2551,7 +2552,7 @@
         } else {
             binaryAttrs = new Hashtable(11, 0.75f);
             StringTokenizer tokens =
-                new StringTokenizer(attrIds.toLowerCase(), " ");
+                new StringTokenizer(attrIds.toLowerCase(Locale.ENGLISH), " ");
 
             while (tokens.hasMoreTokens()) {
                 binaryAttrs.put(tokens.nextToken(), Boolean.TRUE);
diff -r e215e6dd96e7 -r 10aef0978975 src/share/classes/com/sun/jndi/ldap/LdapName.java
--- a/src/share/classes/com/sun/jndi/ldap/LdapName.java	Fri May 29 11:05:52 2015 +0200
+++ b/src/share/classes/com/sun/jndi/ldap/LdapName.java	Mon Oct 19 08:01:47 2015 +0100
@@ -28,6 +28,7 @@
 
 import java.util.Enumeration;
 import java.util.Vector;
+import java.util.Locale;
 
 import javax.naming.*;
 import javax.naming.directory.Attributes;
@@ -706,7 +707,7 @@
 
             TypeAndValue that = (TypeAndValue)obj;
 
-            int diff = type.toUpperCase().compareTo(that.type.toUpperCase());
+            int diff = type.compareToIgnoreCase(that.type);
             if (diff != 0) {
                 return diff;
             }
@@ -729,7 +730,7 @@
 
         public int hashCode() {
             // If two objects are equal, their hash codes must match.
-            return (type.toUpperCase().hashCode() +
+            return (type.toUpperCase(Locale.ENGLISH).hashCode() +
                     getValueComparable().hashCode());
         }
 
@@ -763,11 +764,12 @@
 
             // cache result
             if (binary) {
-                comparable = value.toUpperCase();
+                comparable = value.toUpperCase(Locale.ENGLISH);
             } else {
                 comparable = (String)unescapeValue(value);
                 if (!valueCaseSensitive) {
-                    comparable = comparable.toUpperCase(); // ignore case
+                    // ignore case
+                    comparable = comparable.toUpperCase(Locale.ENGLISH);
                 }
             }
             return comparable;
@@ -835,7 +837,7 @@
                 buf.append(Character.forDigit(0xF & b, 16));
             }
 
-            return (new String(buf)).toUpperCase();
+            return (new String(buf)).toUpperCase(Locale.ENGLISH);
         }
 
         /*
diff -r e215e6dd96e7 -r 10aef0978975 src/share/classes/com/sun/jndi/ldap/LdapPoolManager.java
--- a/src/share/classes/com/sun/jndi/ldap/LdapPoolManager.java	Fri May 29 11:05:52 2015 +0200
+++ b/src/share/classes/com/sun/jndi/ldap/LdapPoolManager.java	Mon Oct 19 08:01:47 2015 +0100
@@ -28,6 +28,7 @@
 import java.io.PrintStream;
 import java.io.OutputStream;
 import java.util.Hashtable;
+import java.util.Locale;
 import java.util.StringTokenizer;
 
 import javax.naming.ldap.Control;
@@ -133,7 +134,7 @@
         String mech;
         int p;
         for (int i = 0; i < count; i++) {
-            mech = parser.nextToken().toLowerCase();
+            mech = parser.nextToken().toLowerCase(Locale.ENGLISH);
             if (mech.equals("anonymous")) {
                 mech = "none";
             }
diff -r e215e6dd96e7 -r 10aef0978975 src/share/classes/com/sun/jndi/toolkit/dir/HierMemDirCtx.java
--- a/src/share/classes/com/sun/jndi/toolkit/dir/HierMemDirCtx.java	Fri May 29 11:05:52 2015 +0200
+++ b/src/share/classes/com/sun/jndi/toolkit/dir/HierMemDirCtx.java	Mon Oct 19 08:01:47 2015 +0100
@@ -891,7 +891,7 @@
     public int hashCode() {
         if (hashValue == -1) {
 
-            String name = toString().toUpperCase();
+            String name = toString().toUpperCase(Locale.ENGLISH);
             int len = name.length();
             int off = 0;
             char val[] = new char[len];
diff -r e215e6dd96e7 -r 10aef0978975 src/share/classes/com/sun/jndi/toolkit/dir/SearchFilter.java
--- a/src/share/classes/com/sun/jndi/toolkit/dir/SearchFilter.java	Fri May 29 11:05:52 2015 +0200
+++ b/src/share/classes/com/sun/jndi/toolkit/dir/SearchFilter.java	Mon Oct 19 08:01:47 2015 +0100
@@ -29,6 +29,7 @@
 import java.util.Enumeration;
 import java.util.StringTokenizer;
 import java.util.Vector;
+import java.util.Locale;
 
 /**
   * A class for parsing LDAP search filters (defined in RFC 1960, 2254)
@@ -395,19 +396,21 @@
 
             // do we need to begin with the first token?
             if(proto.charAt(0) != WILDCARD_TOKEN &&
-               !value.toString().toLowerCase().startsWith(
-                      subStrs.nextToken().toLowerCase())) {
-                if(debug) {System.out.println("faild initial test");}
+                    !value.toString().toLowerCase(Locale.ENGLISH).startsWith(
+                        subStrs.nextToken().toLowerCase(Locale.ENGLISH))) {
+                if(debug) {
+                    System.out.println("faild initial test");
+                }
                 return false;
             }
 
-
             while(subStrs.hasMoreTokens()) {
                 String currentStr = subStrs.nextToken();
                 if (debug) {System.out.println("looking for \"" +
                                                currentStr +"\"");}
-                currentPos = value.toLowerCase().indexOf(
-                       currentStr.toLowerCase(), currentPos);
+                currentPos = value.toLowerCase(Locale.ENGLISH).indexOf(
+                       currentStr.toLowerCase(Locale.ENGLISH), currentPos);
+
                 if(currentPos == -1) {
                     return false;
                 }
diff -r e215e6dd96e7 -r 10aef0978975 src/share/classes/com/sun/security/ntlm/Client.java
--- a/src/share/classes/com/sun/security/ntlm/Client.java	Fri May 29 11:05:52 2015 +0200
+++ b/src/share/classes/com/sun/security/ntlm/Client.java	Mon Oct 19 08:01:47 2015 +0100
@@ -46,7 +46,7 @@
     final private String hostname;
     final private String username;
 
-    private String domain;    // might be updated by Type 2 msg
+    private String domain;
     private byte[] pw1, pw2;
 
     /**
@@ -82,7 +82,7 @@
         }
         this.hostname = hostname;
         this.username = username;
-        this.domain = domain;
+        this.domain = domain == null ? "" : domain;
         this.pw1 = getP1(password);
         this.pw2 = getP2(password);
         debug("NTLM Client: (h,u,t,version(v)) = (%s,%s,%s,%s(%s))\n",
@@ -95,19 +95,13 @@
      */
     public byte[] type1() {
         Writer p = new Writer(1, 32);
-        int flags = 0x8203;
-        if (hostname != null) {
-            flags |= 0x2000;
-        }
-        if (domain != null) {
-            flags |= 0x1000;
-        }
+        // Negotiate always sign, Negotiate NTLM,
+        // Request Target, Negotiate OEM, Negotiate unicode
+        int flags = 0x8207;
         if (v != Version.NTLM) {
             flags |= 0x80000;
         }
         p.writeInt(12, flags);
-        p.writeSecurityBuffer(24, hostname, false);
-        p.writeSecurityBuffer(16, domain, false);
         debug("NTLM Client: Type 1 created\n");
         debug(p.getBytes());
         return p.getBytes();
@@ -133,13 +127,10 @@
         byte[] challenge = r.readBytes(24, 8);
         int inputFlags = r.readInt(20);
         boolean unicode = (inputFlags & 1) == 1;
-        String domainFromServer = r.readSecurityBuffer(12, unicode);
-        if (domainFromServer != null) {
-            domain = domainFromServer;
-        }
-        if (domain == null) {
-            domain = "";
-        }


More information about the distro-pkg-dev mailing list