From Alan.Bateman at oracle.com Tue Jul 1 13:58:33 2014 From: Alan.Bateman at oracle.com (Alan Bateman) Date: Tue, 01 Jul 2014 14:58:33 +0100 Subject: [9] RFR: 8038092: Re-examine Bidi reflective dependency on java.awt.font In-Reply-To: <53B19FF9.4000801@oracle.com> References: <53B19FF9.4000801@oracle.com> Message-ID: <53B2BE89.90808@oracle.com> On 30/06/2014 18:35, Naoto Sato wrote: > Hello, > > Please review the fix for the subject bug: > https://bugs.openjdk.java.net/browse/JDK-8038092 > > The proposed change is located at: > http://cr.openjdk.java.net/~naoto/8038092/webrev.0/ > Thanks for looking at this issue. One part that doesn't look right is where Bidi is used before TextAttribute or NumericShaper are initialized and then used later with one of these as an attribute. Normally with SharedSecrets then ensureClassInitialized is to used to initialize a class that is known to register the secret but in this case then you can't do that because it would create a dependency on java.awt. The simplest thing might be to keep the Class.forName in both TextAttribtueConstants and NumericShapings as that will ensure that those classes are initialized (if they are present). A minor comment is that there are probably a bunch of imports that can be removed once the bulk of the core reflection usage goes away. -Alan. From naoto.sato at oracle.com Tue Jul 1 20:09:24 2014 From: naoto.sato at oracle.com (Naoto Sato) Date: Tue, 01 Jul 2014 13:09:24 -0700 Subject: [9] RFR: 8038092: Re-examine Bidi reflective dependency on java.awt.font In-Reply-To: <53B2BE89.90808@oracle.com> References: <53B19FF9.4000801@oracle.com> <53B2BE89.90808@oracle.com> Message-ID: <53B31574.5030405@oracle.com> Thanks, Alan. Here is the revised webrev based on your suggestions: http://cr.openjdk.java.net/~naoto/8038092/webrev.1/ Please review. Naoto On 7/1/14, 6:58 AM, Alan Bateman wrote: > On 30/06/2014 18:35, Naoto Sato wrote: >> Hello, >> >> Please review the fix for the subject bug: >> https://bugs.openjdk.java.net/browse/JDK-8038092 >> >> The proposed change is located at: >> http://cr.openjdk.java.net/~naoto/8038092/webrev.0/ >> > Thanks for looking at this issue. > > One part that doesn't look right is where Bidi is used before > TextAttribute or NumericShaper are initialized and then used later with > one of these as an attribute. Normally with SharedSecrets then > ensureClassInitialized is to used to initialize a class that is known to > register the secret but in this case then you can't do that because it > would create a dependency on java.awt. The simplest thing might be to > keep the Class.forName in both TextAttribtueConstants and > NumericShapings as that will ensure that those classes are initialized > (if they are present). > > A minor comment is that there are probably a bunch of imports that can > be removed once the bulk of the core reflection usage goes away. > > -Alan. From naoto.sato at oracle.com Wed Jul 2 00:42:02 2014 From: naoto.sato at oracle.com (Naoto Sato) Date: Tue, 01 Jul 2014 17:42:02 -0700 Subject: [9] RFR: 8038092: Re-examine Bidi reflective dependency on java.awt.font In-Reply-To: <53B31574.5030405@oracle.com> References: <53B19FF9.4000801@oracle.com> <53B2BE89.90808@oracle.com> <53B31574.5030405@oracle.com> Message-ID: <53B3555A.6080700@oracle.com> I further modified the fix: - Made sure the SharedSecret is lazily evaluated. - Added the missing JavaAWTFontAccessImpl file - Added a test case http://cr.openjdk.java.net/~naoto/8038092/webrev.2/ Please review. Naoto On 7/1/14, 1:09 PM, Naoto Sato wrote: > Thanks, Alan. Here is the revised webrev based on your suggestions: > > http://cr.openjdk.java.net/~naoto/8038092/webrev.1/ > > Please review. > > Naoto > > On 7/1/14, 6:58 AM, Alan Bateman wrote: >> On 30/06/2014 18:35, Naoto Sato wrote: >>> Hello, >>> >>> Please review the fix for the subject bug: >>> https://bugs.openjdk.java.net/browse/JDK-8038092 >>> >>> The proposed change is located at: >>> http://cr.openjdk.java.net/~naoto/8038092/webrev.0/ >>> >> Thanks for looking at this issue. >> >> One part that doesn't look right is where Bidi is used before >> TextAttribute or NumericShaper are initialized and then used later with >> one of these as an attribute. Normally with SharedSecrets then >> ensureClassInitialized is to used to initialize a class that is known to >> register the secret but in this case then you can't do that because it >> would create a dependency on java.awt. The simplest thing might be to >> keep the Class.forName in both TextAttribtueConstants and >> NumericShapings as that will ensure that those classes are initialized >> (if they are present). >> >> A minor comment is that there are probably a bunch of imports that can >> be removed once the bulk of the core reflection usage goes away. >> >> -Alan. From Alan.Bateman at oracle.com Wed Jul 2 07:20:12 2014 From: Alan.Bateman at oracle.com (Alan Bateman) Date: Wed, 02 Jul 2014 08:20:12 +0100 Subject: [9] RFR: 8038092: Re-examine Bidi reflective dependency on java.awt.font In-Reply-To: <53B3555A.6080700@oracle.com> References: <53B19FF9.4000801@oracle.com> <53B2BE89.90808@oracle.com> <53B31574.5030405@oracle.com> <53B3555A.6080700@oracle.com> Message-ID: <53B3B2AC.9070205@oracle.com> On 02/07/2014 01:42, Naoto Sato wrote: > I further modified the fix: > > - Made sure the SharedSecret is lazily evaluated. > - Added the missing JavaAWTFontAccessImpl file > - Added a test case > > http://cr.openjdk.java.net/~naoto/8038092/webrev.2/ > > Please review. This looks much better. I think the only case that need detailed examination now is whether it is possible for SharedSecrets.getJavaAWTFontAccess to return null. I'm thinking about the case where 2+ threads use Bidi for the first time, or say something else initializes TextAttribute at the same time that another thread uses Bidi for the first time. Is the change to Bug7051769.java really needed? -Alan From Alan.Bateman at oracle.com Wed Jul 2 09:48:36 2014 From: Alan.Bateman at oracle.com (Alan Bateman) Date: Wed, 02 Jul 2014 10:48:36 +0100 Subject: [9] RFR: 8038092: Re-examine Bidi reflective dependency on java.awt.font In-Reply-To: <53B3B2AC.9070205@oracle.com> References: <53B19FF9.4000801@oracle.com> <53B2BE89.90808@oracle.com> <53B31574.5030405@oracle.com> <53B3555A.6080700@oracle.com> <53B3B2AC.9070205@oracle.com> Message-ID: <53B3D574.6030700@oracle.com> On 02/07/2014 08:20, Alan Bateman wrote: > : > > I think the only case that need detailed examination now is whether it > is possible for SharedSecrets.getJavaAWTFontAccess to return null. I'm > thinking about the case where 2+ threads use Bidi for the first time, > or say something else initializes TextAttribute at the same time that > another thread uses Bidi for the first time. On second look then I think this is okay because the static initializer must happen-before the use of the class. So I think the only question now is the test case and understanding why that needs to be updated. -Alan From masayoshi.okutsu at oracle.com Wed Jul 2 10:04:52 2014 From: masayoshi.okutsu at oracle.com (Masayoshi Okutsu) Date: Wed, 02 Jul 2014 19:04:52 +0900 Subject: [9] RFR: 8038092: Re-examine Bidi reflective dependency on java.awt.font In-Reply-To: <53B3555A.6080700@oracle.com> References: <53B19FF9.4000801@oracle.com> <53B2BE89.90808@oracle.com> <53B31574.5030405@oracle.com> <53B3555A.6080700@oracle.com> Message-ID: <53B3D944.7000103@oracle.com> Does JavaAWTFontAccessImpl need to use reflection for the TextAttribute constants? Masayoshi On 7/2/2014 9:42 AM, Naoto Sato wrote: > I further modified the fix: > > - Made sure the SharedSecret is lazily evaluated. > - Added the missing JavaAWTFontAccessImpl file > - Added a test case > > http://cr.openjdk.java.net/~naoto/8038092/webrev.2/ > > Please review. > > Naoto > > On 7/1/14, 1:09 PM, Naoto Sato wrote: >> Thanks, Alan. Here is the revised webrev based on your suggestions: >> >> http://cr.openjdk.java.net/~naoto/8038092/webrev.1/ >> >> Please review. >> >> Naoto >> >> On 7/1/14, 6:58 AM, Alan Bateman wrote: >>> On 30/06/2014 18:35, Naoto Sato wrote: >>>> Hello, >>>> >>>> Please review the fix for the subject bug: >>>> https://bugs.openjdk.java.net/browse/JDK-8038092 >>>> >>>> The proposed change is located at: >>>> http://cr.openjdk.java.net/~naoto/8038092/webrev.0/ >>>> >>> Thanks for looking at this issue. >>> >>> One part that doesn't look right is where Bidi is used before >>> TextAttribute or NumericShaper are initialized and then used later with >>> one of these as an attribute. Normally with SharedSecrets then >>> ensureClassInitialized is to used to initialize a class that is >>> known to >>> register the secret but in this case then you can't do that because it >>> would create a dependency on java.awt. The simplest thing might be to >>> keep the Class.forName in both TextAttribtueConstants and >>> NumericShapings as that will ensure that those classes are initialized >>> (if they are present). >>> >>> A minor comment is that there are probably a bunch of imports that can >>> be removed once the bulk of the core reflection usage goes away. >>> >>> -Alan. From sean.coffey at oracle.com Wed Jul 2 10:48:18 2014 From: sean.coffey at oracle.com (=?ISO-8859-1?Q?Se=E1n_Coffey?=) Date: Wed, 02 Jul 2014 11:48:18 +0100 Subject: RFR : 6984762 : Invalid close of file descriptor '-1' in findZoneinfoFile Message-ID: <53B3E372.7010302@oracle.com> This issue was fixed in JDK 6 and JDK 8 some time back along with : 7092679: (tz) Java getting wrong timezone/DST info on Solaris 11 for some reason, the bad fd close fix never made JDK 7 and I'm looking to fix that now. https://bugs.openjdk.java.net/browse/JDK-6984762 webrev : http://cr.openjdk.java.net/~coffeys/webrev.6984762/webrev/ regards, Sean. From masayoshi.okutsu at oracle.com Wed Jul 2 12:52:52 2014 From: masayoshi.okutsu at oracle.com (Masayoshi Okutsu) Date: Wed, 02 Jul 2014 21:52:52 +0900 Subject: RFR : 6984762 : Invalid close of file descriptor '-1' in findZoneinfoFile In-Reply-To: <53B3E372.7010302@oracle.com> References: <53B3E372.7010302@oracle.com> Message-ID: <53B400A4.2030409@oracle.com> Looks good to me. Masayoshi On 7/2/2014 7:48 PM, Se?n Coffey wrote: > This issue was fixed in JDK 6 and JDK 8 some time back along with : > > 7092679: (tz) Java getting wrong timezone/DST info on Solaris 11 > > for some reason, the bad fd close fix never made JDK 7 and I'm looking > to fix that now. > > https://bugs.openjdk.java.net/browse/JDK-6984762 > webrev : http://cr.openjdk.java.net/~coffeys/webrev.6984762/webrev/ > > regards, > Sean. > From naoto.sato at oracle.com Wed Jul 2 15:43:17 2014 From: naoto.sato at oracle.com (Naoto Sato) Date: Wed, 02 Jul 2014 08:43:17 -0700 Subject: [9] RFR: 8038092: Re-examine Bidi reflective dependency on java.awt.font In-Reply-To: <53B3D574.6030700@oracle.com> References: <53B19FF9.4000801@oracle.com> <53B2BE89.90808@oracle.com> <53B31574.5030405@oracle.com> <53B3555A.6080700@oracle.com> <53B3B2AC.9070205@oracle.com> <53B3D574.6030700@oracle.com> Message-ID: <53B42895.4020807@oracle.com> On 7/2/14, 2:48 AM, Alan Bateman wrote: > On 02/07/2014 08:20, Alan Bateman wrote: >> : >> >> I think the only case that need detailed examination now is whether it >> is possible for SharedSecrets.getJavaAWTFontAccess to return null. I'm >> thinking about the case where 2+ threads use Bidi for the first time, >> or say something else initializes TextAttribute at the same time that >> another thread uses Bidi for the first time. > On second look then I think this is okay because the static initializer > must happen-before the use of the class. Exactly. > So I think the only question > now is the test case and understanding why that needs to be updated. The test case ensures that even BidiBase class was loaded before TextAttribte/NumericShaper classes, it should work correctly. Version 1 of this fix (webrev.1) actually fails with this test case. Naoto From naoto.sato at oracle.com Wed Jul 2 15:46:14 2014 From: naoto.sato at oracle.com (Naoto Sato) Date: Wed, 02 Jul 2014 08:46:14 -0700 Subject: [9] RFR: 8038092: Re-examine Bidi reflective dependency on java.awt.font In-Reply-To: <53B3D944.7000103@oracle.com> References: <53B19FF9.4000801@oracle.com> <53B2BE89.90808@oracle.com> <53B31574.5030405@oracle.com> <53B3555A.6080700@oracle.com> <53B3D944.7000103@oracle.com> Message-ID: <53B42946.7000109@oracle.com> No, it doesn't. As they are in the same java.awt.font package. Naoto On 7/2/14, 3:04 AM, Masayoshi Okutsu wrote: > Does JavaAWTFontAccessImpl need to use reflection for the TextAttribute > constants? > > Masayoshi > > On 7/2/2014 9:42 AM, Naoto Sato wrote: >> I further modified the fix: >> >> - Made sure the SharedSecret is lazily evaluated. >> - Added the missing JavaAWTFontAccessImpl file >> - Added a test case >> >> http://cr.openjdk.java.net/~naoto/8038092/webrev.2/ >> >> Please review. >> >> Naoto >> >> On 7/1/14, 1:09 PM, Naoto Sato wrote: >>> Thanks, Alan. Here is the revised webrev based on your suggestions: >>> >>> http://cr.openjdk.java.net/~naoto/8038092/webrev.1/ >>> >>> Please review. >>> >>> Naoto >>> >>> On 7/1/14, 6:58 AM, Alan Bateman wrote: >>>> On 30/06/2014 18:35, Naoto Sato wrote: >>>>> Hello, >>>>> >>>>> Please review the fix for the subject bug: >>>>> https://bugs.openjdk.java.net/browse/JDK-8038092 >>>>> >>>>> The proposed change is located at: >>>>> http://cr.openjdk.java.net/~naoto/8038092/webrev.0/ >>>>> >>>> Thanks for looking at this issue. >>>> >>>> One part that doesn't look right is where Bidi is used before >>>> TextAttribute or NumericShaper are initialized and then used later with >>>> one of these as an attribute. Normally with SharedSecrets then >>>> ensureClassInitialized is to used to initialize a class that is >>>> known to >>>> register the secret but in this case then you can't do that because it >>>> would create a dependency on java.awt. The simplest thing might be to >>>> keep the Class.forName in both TextAttribtueConstants and >>>> NumericShapings as that will ensure that those classes are initialized >>>> (if they are present). >>>> >>>> A minor comment is that there are probably a bunch of imports that can >>>> be removed once the bulk of the core reflection usage goes away. >>>> >>>> -Alan. > From naoto.sato at oracle.com Wed Jul 2 16:32:08 2014 From: naoto.sato at oracle.com (Naoto Sato) Date: Wed, 02 Jul 2014 09:32:08 -0700 Subject: [9] RFR: 8038092: Re-examine Bidi reflective dependency on java.awt.font In-Reply-To: <53B3555A.6080700@oracle.com> References: <53B19FF9.4000801@oracle.com> <53B2BE89.90808@oracle.com> <53B31574.5030405@oracle.com> <53B3555A.6080700@oracle.com> Message-ID: <53B43408.5040702@oracle.com> Sending this to 2d-dev list as well, seeking for reviews for changes in the java.awt.font package. Naoto On 7/1/14, 5:42 PM, Naoto Sato wrote: > I further modified the fix: > > - Made sure the SharedSecret is lazily evaluated. > - Added the missing JavaAWTFontAccessImpl file > - Added a test case > > http://cr.openjdk.java.net/~naoto/8038092/webrev.2/ > > Please review. > > Naoto > > On 7/1/14, 1:09 PM, Naoto Sato wrote: >> Thanks, Alan. Here is the revised webrev based on your suggestions: >> >> http://cr.openjdk.java.net/~naoto/8038092/webrev.1/ >> >> Please review. >> >> Naoto >> >> On 7/1/14, 6:58 AM, Alan Bateman wrote: >>> On 30/06/2014 18:35, Naoto Sato wrote: >>>> Hello, >>>> >>>> Please review the fix for the subject bug: >>>> https://bugs.openjdk.java.net/browse/JDK-8038092 >>>> >>>> The proposed change is located at: >>>> http://cr.openjdk.java.net/~naoto/8038092/webrev.0/ >>>> >>> Thanks for looking at this issue. >>> >>> One part that doesn't look right is where Bidi is used before >>> TextAttribute or NumericShaper are initialized and then used later with >>> one of these as an attribute. Normally with SharedSecrets then >>> ensureClassInitialized is to used to initialize a class that is known to >>> register the secret but in this case then you can't do that because it >>> would create a dependency on java.awt. The simplest thing might be to >>> keep the Class.forName in both TextAttribtueConstants and >>> NumericShapings as that will ensure that those classes are initialized >>> (if they are present). >>> >>> A minor comment is that there are probably a bunch of imports that can >>> be removed once the bulk of the core reflection usage goes away. >>> >>> -Alan. From Alan.Bateman at oracle.com Thu Jul 3 07:35:20 2014 From: Alan.Bateman at oracle.com (Alan Bateman) Date: Thu, 03 Jul 2014 08:35:20 +0100 Subject: [9] RFR: 8038092: Re-examine Bidi reflective dependency on java.awt.font In-Reply-To: <53B42895.4020807@oracle.com> References: <53B19FF9.4000801@oracle.com> <53B2BE89.90808@oracle.com> <53B31574.5030405@oracle.com> <53B3555A.6080700@oracle.com> <53B3B2AC.9070205@oracle.com> <53B3D574.6030700@oracle.com> <53B42895.4020807@oracle.com> Message-ID: <53B507B8.2040004@oracle.com> On 02/07/2014 16:43, Naoto Sato wrote: > >> So I think the only question >> now is the test case and understanding why that needs to be updated. > > The test case ensures that even BidiBase class was loaded before > TextAttribte/NumericShaper classes, it should work correctly. Version > 1 of this fix (webrev.1) actually fails with this test case. > > Naoto Does it fail with the updated changes in webrev.2? I can't think why the test would need to be changed with the updated changes. -Alan From naoto.sato at oracle.com Thu Jul 3 16:16:03 2014 From: naoto.sato at oracle.com (Naoto Sato) Date: Thu, 03 Jul 2014 09:16:03 -0700 Subject: [9] RFR: 8038092: Re-examine Bidi reflective dependency on java.awt.font In-Reply-To: <53B507B8.2040004@oracle.com> References: <53B19FF9.4000801@oracle.com> <53B2BE89.90808@oracle.com> <53B31574.5030405@oracle.com> <53B3555A.6080700@oracle.com> <53B3B2AC.9070205@oracle.com> <53B3D574.6030700@oracle.com> <53B42895.4020807@oracle.com> <53B507B8.2040004@oracle.com> Message-ID: <53B581C3.9010709@oracle.com> With the original test case, webrev.1 and webrev.2 both succeed. With the modified test case (in webrev.2), webrev.1 fails but webrev.2 succeeds. The reason I changed the test case is to catch possible regression where someone makes changes to the SharedSecret being initialized at BidiBase class loading time (as in webrev.1). Naoto On 7/3/14, 12:35 AM, Alan Bateman wrote: > On 02/07/2014 16:43, Naoto Sato wrote: >> >>> So I think the only question >>> now is the test case and understanding why that needs to be updated. >> >> The test case ensures that even BidiBase class was loaded before >> TextAttribte/NumericShaper classes, it should work correctly. Version >> 1 of this fix (webrev.1) actually fails with this test case. >> >> Naoto > Does it fail with the updated changes in webrev.2? I can't think why the > test would need to be changed with the updated changes. > > -Alan From Alan.Bateman at oracle.com Thu Jul 3 16:37:28 2014 From: Alan.Bateman at oracle.com (Alan Bateman) Date: Thu, 03 Jul 2014 17:37:28 +0100 Subject: [9] RFR: 8038092: Re-examine Bidi reflective dependency on java.awt.font In-Reply-To: <53B581C3.9010709@oracle.com> References: <53B19FF9.4000801@oracle.com> <53B2BE89.90808@oracle.com> <53B31574.5030405@oracle.com> <53B3555A.6080700@oracle.com> <53B3B2AC.9070205@oracle.com> <53B3D574.6030700@oracle.com> <53B42895.4020807@oracle.com> <53B507B8.2040004@oracle.com> <53B581C3.9010709@oracle.com> Message-ID: <53B586C8.1020103@oracle.com> On 03/07/2014 17:16, Naoto Sato wrote: > With the original test case, webrev.1 and webrev.2 both succeed. With > the modified test case (in webrev.2), webrev.1 fails but webrev.2 > succeeds. The reason I changed the test case is to catch possible > regression where someone makes changes to the SharedSecret being > initialized at BidiBase class loading time (as in webrev.1). I'm not sure that I get this, it actually looks to me that this change to the test could mask a problem with a future change that would break the shared secrets setup. -Alan From naoto.sato at oracle.com Thu Jul 3 16:59:09 2014 From: naoto.sato at oracle.com (Naoto Sato) Date: Thu, 03 Jul 2014 09:59:09 -0700 Subject: [9] RFR: 8038092: Re-examine Bidi reflective dependency on java.awt.font In-Reply-To: <53B586C8.1020103@oracle.com> References: <53B19FF9.4000801@oracle.com> <53B2BE89.90808@oracle.com> <53B31574.5030405@oracle.com> <53B3555A.6080700@oracle.com> <53B3B2AC.9070205@oracle.com> <53B3D574.6030700@oracle.com> <53B42895.4020807@oracle.com> <53B507B8.2040004@oracle.com> <53B581C3.9010709@oracle.com> <53B586C8.1020103@oracle.com> Message-ID: <53B58BDD.2000709@oracle.com> Ok, now I think I got what you mean. So it could regress in two ways, one is what you wrote below, and the other I am seeing. So instead of modifying the existing test case, I just add a new one which basically is the same one in the previous webrev as follows: http://cr.openjdk.java.net/~naoto/8038092/webrev.3/ This way they can detect those two possible regressions. Naoto On 7/3/14, 9:37 AM, Alan Bateman wrote: > On 03/07/2014 17:16, Naoto Sato wrote: >> With the original test case, webrev.1 and webrev.2 both succeed. With >> the modified test case (in webrev.2), webrev.1 fails but webrev.2 >> succeeds. The reason I changed the test case is to catch possible >> regression where someone makes changes to the SharedSecret being >> initialized at BidiBase class loading time (as in webrev.1). > I'm not sure that I get this, it actually looks to me that this change > to the test could mask a problem with a future change that would break > the shared secrets setup. > > -Alan From Alan.Bateman at oracle.com Thu Jul 3 20:22:56 2014 From: Alan.Bateman at oracle.com (Alan Bateman) Date: Thu, 03 Jul 2014 21:22:56 +0100 Subject: [9] RFR: 8038092: Re-examine Bidi reflective dependency on java.awt.font In-Reply-To: <53B58BDD.2000709@oracle.com> References: <53B19FF9.4000801@oracle.com> <53B2BE89.90808@oracle.com> <53B31574.5030405@oracle.com> <53B3555A.6080700@oracle.com> <53B3B2AC.9070205@oracle.com> <53B3D574.6030700@oracle.com> <53B42895.4020807@oracle.com> <53B507B8.2040004@oracle.com> <53B581C3.9010709@oracle.com> <53B586C8.1020103@oracle.com> <53B58BDD.2000709@oracle.com> Message-ID: <53B5BBA0.50101@oracle.com> On 03/07/2014 17:59, Naoto Sato wrote: > Ok, now I think I got what you mean. So it could regress in two ways, > one is what you wrote below, and the other I am seeing. So instead of > modifying the existing test case, I just add a new one which basically > is the same one in the previous webrev as follows: > > http://cr.openjdk.java.net/~naoto/8038092/webrev.3/ > > This way they can detect those two possible regressions. Okay, I see where you are going. To avoid duplicating the testing then you should have the one test run twice (two @run lines). One run could be with a property set that you check in the static initializer so that you can decide whether to preload BidiBase. -Alan. From naoto.sato at oracle.com Thu Jul 3 20:42:32 2014 From: naoto.sato at oracle.com (Naoto Sato) Date: Thu, 03 Jul 2014 13:42:32 -0700 Subject: [9] RFR: 8038092: Re-examine Bidi reflective dependency on java.awt.font In-Reply-To: <53B5BBA0.50101@oracle.com> References: <53B19FF9.4000801@oracle.com> <53B2BE89.90808@oracle.com> <53B31574.5030405@oracle.com> <53B3555A.6080700@oracle.com> <53B3B2AC.9070205@oracle.com> <53B3D574.6030700@oracle.com> <53B42895.4020807@oracle.com> <53B507B8.2040004@oracle.com> <53B581C3.9010709@oracle.com> <53B586C8.1020103@oracle.com> <53B58BDD.2000709@oracle.com> <53B5BBA0.50101@oracle.com> Message-ID: <53B5C038.3080107@oracle.com> OK, hope this is the final webrev: http://cr.openjdk.java.net/~naoto/8038092/webrev.4/ Naoto On 7/3/14, 1:22 PM, Alan Bateman wrote: > On 03/07/2014 17:59, Naoto Sato wrote: >> Ok, now I think I got what you mean. So it could regress in two ways, >> one is what you wrote below, and the other I am seeing. So instead of >> modifying the existing test case, I just add a new one which basically >> is the same one in the previous webrev as follows: >> >> http://cr.openjdk.java.net/~naoto/8038092/webrev.3/ >> >> This way they can detect those two possible regressions. > Okay, I see where you are going. To avoid duplicating the testing then > you should have the one test run twice (two @run lines). One run could > be with a property set that you check in the static initializer so that > you can decide whether to preload BidiBase. > > -Alan. From philip.race at oracle.com Mon Jul 7 23:06:30 2014 From: philip.race at oracle.com (Phil Race) Date: Mon, 07 Jul 2014 16:06:30 -0700 Subject: [OpenJDK 2D-Dev] [9] RFR: 8038092: Re-examine Bidi reflective dependency on java.awt.font In-Reply-To: <53B43408.5040702@oracle.com> References: <53B19FF9.4000801@oracle.com> <53B2BE89.90808@oracle.com> <53B31574.5030405@oracle.com> <53B3555A.6080700@oracle.com> <53B43408.5040702@oracle.com> Message-ID: <53BB27F6.4050401@oracle.com> This took some getting my head around. First I had to find the first set of changes that broke the static dependency :- This in JDK 7 :- http://mail.openjdk.java.net/pipermail/i18n-dev/2009-November/000154.html changeset: 1869:eb8b08775b82 user: alanb date: Thu Nov 12 11:20:51 2009 +0000 summary: 6898124: Bidi should not require AWT to be present and this in JDK 8 :- http://mail.openjdk.java.net/pipermail/i18n-dev/2011-March/000343.html changeset: 3889:646047d77db9 parent: 3884:19567f9d6962 user: alanb date: Wed Mar 30 00:59:07 2011 +0100 summary: 7026507: Bidi initialization fails if AWT not present The premise of the 'faking' there seems to be that unless you have the client java.awt.font package present, you can't have passed in these attributes to begin with, so failing to 'match' them is all that is needed to do the right thing. I am not sure that from here :- http://cr.openjdk.java.net/~alanb/7026507/webrev/src/share/classes/sun/text/bidi/BidiBase.java.sdiff.html static final Boolean RUN_DIRECTION_LTR = (clazz == null) ? 3469 Boolean.FALSE : (Boolean)getStaticField(clazz, "RUN_DIRECTION_LTR" is really what you'd want - ie default to RTL text if you can't find the class per the code here paraLvl = (runDirection.equals(TextAttributeConstants.RUN_DIRECTION_LTR)) ? 2700 (byte)Bidi.DIRECTION_LEFT_TO_RIGHT : (byte)Bidi.DIRECTION_RIGH although it doesn't matter since runDirection will always be null. Still line 3469 should be re-examined. As for the current change it has the same effect as far as I can tell, and I am supposing it is needed since even public classes in the client module are not available to the core module, even by reflection but the trick of having the client code 'install' the accessors in the core module gets around this .. -phil. On 7/2/2014 9:32 AM, Naoto Sato wrote: > Sending this to 2d-dev list as well, seeking for reviews for changes > in the java.awt.font package. > > Naoto > > On 7/1/14, 5:42 PM, Naoto Sato wrote: >> I further modified the fix: >> >> - Made sure the SharedSecret is lazily evaluated. >> - Added the missing JavaAWTFontAccessImpl file >> - Added a test case >> >> http://cr.openjdk.java.net/~naoto/8038092/webrev.2/ >> >> Please review. >> >> Naoto >> >> On 7/1/14, 1:09 PM, Naoto Sato wrote: >>> Thanks, Alan. Here is the revised webrev based on your suggestions: >>> >>> http://cr.openjdk.java.net/~naoto/8038092/webrev.1/ >>> >>> Please review. >>> >>> Naoto >>> >>> On 7/1/14, 6:58 AM, Alan Bateman wrote: >>>> On 30/06/2014 18:35, Naoto Sato wrote: >>>>> Hello, >>>>> >>>>> Please review the fix for the subject bug: >>>>> https://bugs.openjdk.java.net/browse/JDK-8038092 >>>>> >>>>> The proposed change is located at: >>>>> http://cr.openjdk.java.net/~naoto/8038092/webrev.0/ >>>>> >>>> Thanks for looking at this issue. >>>> >>>> One part that doesn't look right is where Bidi is used before >>>> TextAttribute or NumericShaper are initialized and then used later >>>> with >>>> one of these as an attribute. Normally with SharedSecrets then >>>> ensureClassInitialized is to used to initialize a class that is >>>> known to >>>> register the secret but in this case then you can't do that because it >>>> would create a dependency on java.awt. The simplest thing might be to >>>> keep the Class.forName in both TextAttribtueConstants and >>>> NumericShapings as that will ensure that those classes are initialized >>>> (if they are present). >>>> >>>> A minor comment is that there are probably a bunch of imports that can >>>> be removed once the bulk of the core reflection usage goes away. >>>> >>>> -Alan. From naoto.sato at oracle.com Fri Jul 18 17:38:13 2014 From: naoto.sato at oracle.com (Naoto Sato) Date: Fri, 18 Jul 2014 10:38:13 -0700 Subject: [9] RFR 8038436: Re-examine the mechanism to determine available localedata and cldrdata Message-ID: <53C95B85.8040300@oracle.com> Hello, Please review the proposed fix to the subject bug: https://bugs.openjdk.java.net/browse/JDK-8038436 http://cr.openjdk.java.net/~naoto/8038436/webrev.0/ The fix is merely to remove the dependency on localedata.jar file existence. For now till we really figure out what to do with locale data modularization, simply assuming all the locale data is available should be fine. Naoto From naoto.sato at oracle.com Fri Jul 18 20:29:48 2014 From: naoto.sato at oracle.com (Naoto Sato) Date: Fri, 18 Jul 2014 13:29:48 -0700 Subject: [9] RFR 8038436: Re-examine the mechanism to determine available localedata and cldrdata In-Reply-To: <53C95B85.8040300@oracle.com> References: <53C95B85.8040300@oracle.com> Message-ID: <53C983BC.9050301@oracle.com> After some discussion, I decided to withdraw this change in order to seek for more concrete one. Sorry for the confusion. Naoto On 7/18/14, 10:38 AM, Naoto Sato wrote: > Hello, > > Please review the proposed fix to the subject bug: > > https://bugs.openjdk.java.net/browse/JDK-8038436 > http://cr.openjdk.java.net/~naoto/8038436/webrev.0/ > > The fix is merely to remove the dependency on localedata.jar file > existence. For now till we really figure out what to do with locale data > modularization, simply assuming all the locale data is available should > be fine. > > Naoto From masayoshi.okutsu at oracle.com Tue Jul 22 07:06:53 2014 From: masayoshi.okutsu at oracle.com (Masayoshi Okutsu) Date: Tue, 22 Jul 2014 16:06:53 +0900 Subject: [9] RFR: 8048123: Replace calendars.properties with another mechanism to specify a new Japanese calendar era Message-ID: <53CE0D8C.7060803@oracle.com> Hello, Please review the change for JDK-8048123. This change removes all the era definitions in ${java.home}/lib/calendars.properties. (The property file will eventually be gone later.) The major change is that any new era of the Japanese calendar should now be defined using new property "jdk.calendar.japanese.supplemental.era". https://bugs.openjdk.java.net/browse/JDK-8048123 Webrev includes some unrelated cleanups. http://cr.openjdk.java.net/~okutsu/9/8048123/webrev.00/ Thanks, Masayoshi From scolebourne at joda.org Tue Jul 22 07:52:51 2014 From: scolebourne at joda.org (Stephen Colebourne) Date: Tue, 22 Jul 2014 08:52:51 +0100 Subject: [9] RFR: 8048123: Replace calendars.properties with another mechanism to specify a new Japanese calendar era In-Reply-To: <53CE0D8C.7060803@oracle.com> References: <53CE0D8C.7060803@oracle.com> Message-ID: It seems that the system property only supports one additional era. Given that Japanese eras are based on human lifetimes, that seems an invalid assumption. Stephen On 22 July 2014 08:06, Masayoshi Okutsu wrote: > Hello, > > Please review the change for JDK-8048123. This change removes all the era > definitions in ${java.home}/lib/calendars.properties. (The property file > will eventually be gone later.) The major change is that any new era of the > Japanese calendar should now be defined using new property > "jdk.calendar.japanese.supplemental.era". > > https://bugs.openjdk.java.net/browse/JDK-8048123 > > Webrev includes some unrelated cleanups. > > http://cr.openjdk.java.net/~okutsu/9/8048123/webrev.00/ > > Thanks, > Masayoshi From masayoshi.okutsu at oracle.com Tue Jul 22 08:05:06 2014 From: masayoshi.okutsu at oracle.com (Masayoshi Okutsu) Date: Tue, 22 Jul 2014 17:05:06 +0900 Subject: [9] RFR: 8048123: Replace calendars.properties with another mechanism to specify a new Japanese calendar era In-Reply-To: References: <53CE0D8C.7060803@oracle.com> Message-ID: <53CE1B32.5070103@oracle.com> The assumption here is that it's enough to support one additional era until the era is added to the built-in eras in update releases. Masayoshi On 7/22/2014 4:52 PM, Stephen Colebourne wrote: > It seems that the system property only supports one additional era. > Given that Japanese eras are based on human lifetimes, that seems an > invalid assumption. > Stephen > > On 22 July 2014 08:06, Masayoshi Okutsu wrote: >> Hello, >> >> Please review the change for JDK-8048123. This change removes all the era >> definitions in ${java.home}/lib/calendars.properties. (The property file >> will eventually be gone later.) The major change is that any new era of the >> Japanese calendar should now be defined using new property >> "jdk.calendar.japanese.supplemental.era". >> >> https://bugs.openjdk.java.net/browse/JDK-8048123 >> >> Webrev includes some unrelated cleanups. >> >> http://cr.openjdk.java.net/~okutsu/9/8048123/webrev.00/ >> >> Thanks, >> Masayoshi From Alan.Bateman at oracle.com Tue Jul 22 12:49:25 2014 From: Alan.Bateman at oracle.com (Alan Bateman) Date: Tue, 22 Jul 2014 13:49:25 +0100 Subject: [9] RFR: 8048123: Replace calendars.properties with another mechanism to specify a new Japanese calendar era In-Reply-To: <53CE0D8C.7060803@oracle.com> References: <53CE0D8C.7060803@oracle.com> Message-ID: <53CE5DD5.5020003@oracle.com> On 22/07/2014 08:06, Masayoshi Okutsu wrote: > Hello, > > Please review the change for JDK-8048123. This change removes all the > era definitions in ${java.home}/lib/calendars.properties. (The > property file will eventually be gone later.) The major change is that > any new era of the Japanese calendar should now be defined using new > property "jdk.calendar.japanese.supplemental.era". > > https://bugs.openjdk.java.net/browse/JDK-8048123 > > Webrev includes some unrelated cleanups. > > http://cr.openjdk.java.net/~okutsu/9/8048123/webrev.00/ I've skimmed over the changes (not a detailed review) and it's good to have these properties dropped from calendars.properties. Clearly just allowing for one additional era is a limitation and hopefully that will not be an issue ever. You might want to consider
 {@code ... } 
instead of the tag. Alternatively it could be tables (although they might be harder to maintain). There are a couple of @SuppressWarnings values that I don't recognize, are these warnings that javac emits? Other minor comments in passing. The changes to LocalGregorianCalendar.parseEraEntry highlight that it is still using StringTokenizer, there might an opportunity to use String split here instead. In getLocalGregorianCalendar you could use a lambda as has been done in a few other places. -Alan. From masayoshi.okutsu at oracle.com Tue Jul 22 13:06:41 2014 From: masayoshi.okutsu at oracle.com (Masayoshi Okutsu) Date: Tue, 22 Jul 2014 22:06:41 +0900 Subject: [9] RFR: 8048123: Replace calendars.properties with another mechanism to specify a new Japanese calendar era In-Reply-To: <53CE5DD5.5020003@oracle.com> References: <53CE0D8C.7060803@oracle.com> <53CE5DD5.5020003@oracle.com> Message-ID: <53CE61E1.2000500@oracle.com> On 7/22/2014 9:49 PM, Alan Bateman wrote: > There are a couple of @SuppressWarnings values that I don't recognize, > are these warnings that javac emits? These are what netbeans complained and suggested. So I assume that these warnings are all from javac. > Other minor comments in passing. The changes to > LocalGregorianCalendar.parseEraEntry highlight that it is still using > StringTokenizer, there might an opportunity to use String split here > instead. In getLocalGregorianCalendar you could use a lambda as has > been done in a few other places. But split() uses regex, which I think is too expensive for this simple parsing. The parser wouldn't be used too often, though. This time I didn't change things netbeans didn't complain. Thanks, Masayoshi From Alan.Bateman at oracle.com Tue Jul 22 13:32:18 2014 From: Alan.Bateman at oracle.com (Alan Bateman) Date: Tue, 22 Jul 2014 14:32:18 +0100 Subject: [9] RFR: 8048123: Replace calendars.properties with another mechanism to specify a new Japanese calendar era In-Reply-To: <53CE61E1.2000500@oracle.com> References: <53CE0D8C.7060803@oracle.com> <53CE5DD5.5020003@oracle.com> <53CE61E1.2000500@oracle.com> Message-ID: <53CE67E2.90708@oracle.com> On 22/07/2014 14:06, Masayoshi Okutsu wrote: > : > >> Other minor comments in passing. The changes to >> LocalGregorianCalendar.parseEraEntry highlight that it is still using >> StringTokenizer, there might an opportunity to use String split here >> instead. > > But split() uses regex, which I think is too expensive for this simple > parsing. The parser wouldn't be used too often, though. String.split has a fast-path for simple usages like this. It's not core to what you are doing here of course, I only mentioned it because StringTokener is legacy. -Alan From scolebourne at joda.org Tue Jul 22 13:33:59 2014 From: scolebourne at joda.org (Stephen Colebourne) Date: Tue, 22 Jul 2014 14:33:59 +0100 Subject: [9] RFR: 8048123: Replace calendars.properties with another mechanism to specify a new Japanese calendar era In-Reply-To: <53CE1B32.5070103@oracle.com> References: <53CE0D8C.7060803@oracle.com> <53CE1B32.5070103@oracle.com> Message-ID: A Japanese Emperor might only reign for one day or one week, which is far less time than a JDK update. It seems to me that one additional era is quite a risk to be baking into the JDK. Stephen On 22 July 2014 09:05, Masayoshi Okutsu wrote: > The assumption here is that it's enough to support one additional era until > the era is added to the built-in eras in update releases. > > Masayoshi > > > On 7/22/2014 4:52 PM, Stephen Colebourne wrote: >> >> It seems that the system property only supports one additional era. >> Given that Japanese eras are based on human lifetimes, that seems an >> invalid assumption. >> Stephen >> >> On 22 July 2014 08:06, Masayoshi Okutsu >> wrote: >>> >>> Hello, >>> >>> Please review the change for JDK-8048123. This change removes all the era >>> definitions in ${java.home}/lib/calendars.properties. (The property file >>> will eventually be gone later.) The major change is that any new era of >>> the >>> Japanese calendar should now be defined using new property >>> "jdk.calendar.japanese.supplemental.era". >>> >>> https://bugs.openjdk.java.net/browse/JDK-8048123 >>> >>> Webrev includes some unrelated cleanups. >>> >>> http://cr.openjdk.java.net/~okutsu/9/8048123/webrev.00/ >>> >>> Thanks, >>> Masayoshi > > From masayoshi.okutsu at oracle.com Tue Jul 22 16:14:49 2014 From: masayoshi.okutsu at oracle.com (Masayoshi Okutsu) Date: Wed, 23 Jul 2014 01:14:49 +0900 Subject: [9] RFR: 8048123: Replace calendars.properties with another mechanism to specify a new Japanese calendar era In-Reply-To: References: <53CE0D8C.7060803@oracle.com> <53CE1B32.5070103@oracle.com> Message-ID: <53CE8DF9.6080008@oracle.com> You are right. Those could happen in theory. As far as I checked, there are two eras which are shorter than one year, ?? in 686 (Julius) and ???? in 749 (Julius). Both have only a few months. So I wouldn't say it's quite a risk, especially under the current rule, one era per emperor. One issue is that the current Japanese calendar implementation isn't ready for such extreme cases, like a one-day year which breaks some assumptions. Currently, java.time uses the j.u.JapaneseImperialCalendar implementation. So java.time has the same restrictions. You may want to implement the perfect Japanese calendar which supports all the past eras (with all the different transition rules) and all the possible future era transitions. Masayoshi On 7/22/2014 10:33 PM, Stephen Colebourne wrote: > A Japanese Emperor might only reign for one day or one week, which is > far less time than a JDK update. It seems to me that one additional > era is quite a risk to be baking into the JDK. > > Stephen > > > > > On 22 July 2014 09:05, Masayoshi Okutsu wrote: >> The assumption here is that it's enough to support one additional era until >> the era is added to the built-in eras in update releases. >> >> Masayoshi >> >> >> On 7/22/2014 4:52 PM, Stephen Colebourne wrote: >>> It seems that the system property only supports one additional era. >>> Given that Japanese eras are based on human lifetimes, that seems an >>> invalid assumption. >>> Stephen >>> >>> On 22 July 2014 08:06, Masayoshi Okutsu >>> wrote: >>>> Hello, >>>> >>>> Please review the change for JDK-8048123. This change removes all the era >>>> definitions in ${java.home}/lib/calendars.properties. (The property file >>>> will eventually be gone later.) The major change is that any new era of >>>> the >>>> Japanese calendar should now be defined using new property >>>> "jdk.calendar.japanese.supplemental.era". >>>> >>>> https://bugs.openjdk.java.net/browse/JDK-8048123 >>>> >>>> Webrev includes some unrelated cleanups. >>>> >>>> http://cr.openjdk.java.net/~okutsu/9/8048123/webrev.00/ >>>> >>>> Thanks, >>>> Masayoshi >> From naoto.sato at oracle.com Tue Jul 22 18:44:18 2014 From: naoto.sato at oracle.com (Naoto Sato) Date: Tue, 22 Jul 2014 11:44:18 -0700 Subject: [9] RFR: 8048123: Replace calendars.properties with another mechanism to specify a new Japanese calendar era In-Reply-To: <53CE0D8C.7060803@oracle.com> References: <53CE0D8C.7060803@oracle.com> Message-ID: <53CEB102.3000705@oracle.com> Okutsu-san, I have one question. It looks like if the user specifies the additional era syntactically incorrect, it throws a RuntimeException. Should it just be ignored, as the spec reads "If the given era is invalid, such as the since value before the beginning of the last predefined era, the given era will be ignored"? Naoto On 7/22/14, 12:06 AM, Masayoshi Okutsu wrote: > Hello, > > Please review the change for JDK-8048123. This change removes all the > era definitions in ${java.home}/lib/calendars.properties. (The property > file will eventually be gone later.) The major change is that any new > era of the Japanese calendar should now be defined using new property > "jdk.calendar.japanese.supplemental.era". > > https://bugs.openjdk.java.net/browse/JDK-8048123 > > Webrev includes some unrelated cleanups. > > http://cr.openjdk.java.net/~okutsu/9/8048123/webrev.00/ > > Thanks, > Masayoshi From aleksej.efimov at oracle.com Tue Jul 22 19:21:23 2014 From: aleksej.efimov at oracle.com (Aleksej Efimov) Date: Tue, 22 Jul 2014 23:21:23 +0400 Subject: RFR: 8049343: (tz) Support tzdata2014e Message-ID: <53CEB9B3.50307@oracle.com> Hi, Please review the tzdata2014e [1] integration fix to JDK9: http://cr.openjdk.java.net/~aefimov/8049343/9/webrev.00/ Two issues with JSR310 implementation were discovered during integration process: First issue is related to the internal representation of the '24:00' value. The JSR310 implementation treats this value as a next day 00:00 time. The workaround already exists in the code for similar entries and this failure was resolved in similar way [2]. For the second issue JDK-8051641 [3] was filled and 'sun/util/calendar/zi/TestZoneInfo310.java' test is the only one that fails with this tzdata. Other time zone related test passes without failures. Thank you, Aleksej [1] https://bugs.openjdk.java.net/browse/JDK-8049343 [2] http://cr.openjdk.java.net/~aefimov/8049343/9/webrev.00/src/share/classes/sun/util/calendar/ZoneInfoFile.java.patch [3] https://bugs.openjdk.java.net/browse/JDK-8051641 From masayoshi.okutsu at oracle.com Tue Jul 22 23:12:19 2014 From: masayoshi.okutsu at oracle.com (Masayoshi Okutsu) Date: Wed, 23 Jul 2014 08:12:19 +0900 Subject: [9] RFR: 8048123: Replace calendars.properties with another mechanism to specify a new Japanese calendar era In-Reply-To: <53CEB102.3000705@oracle.com> References: <53CE0D8C.7060803@oracle.com> <53CEB102.3000705@oracle.com> Message-ID: <53CEEFD3.8070106@oracle.com> Thank you for catching it! I forgot to restore "return null;". Masayoshi On 7/23/2014 3:44 AM, Naoto Sato wrote: > Okutsu-san, > > I have one question. It looks like if the user specifies the > additional era syntactically incorrect, it throws a RuntimeException. > Should it just be ignored, as the spec reads "If the given era is > invalid, such as the since value before the beginning of the last > predefined era, the given era will be ignored"? > > Naoto > > On 7/22/14, 12:06 AM, Masayoshi Okutsu wrote: >> Hello, >> >> Please review the change for JDK-8048123. This change removes all the >> era definitions in ${java.home}/lib/calendars.properties. (The property >> file will eventually be gone later.) The major change is that any new >> era of the Japanese calendar should now be defined using new property >> "jdk.calendar.japanese.supplemental.era". >> >> https://bugs.openjdk.java.net/browse/JDK-8048123 >> >> Webrev includes some unrelated cleanups. >> >> http://cr.openjdk.java.net/~okutsu/9/8048123/webrev.00/ >> >> Thanks, >> Masayoshi From masayoshi.okutsu at oracle.com Wed Jul 23 08:46:32 2014 From: masayoshi.okutsu at oracle.com (Masayoshi Okutsu) Date: Wed, 23 Jul 2014 17:46:32 +0900 Subject: [9] RFR: 8048123: Replace calendars.properties with another mechanism to specify a new Japanese calendar era In-Reply-To: <53CEEFD3.8070106@oracle.com> References: <53CE0D8C.7060803@oracle.com> <53CEB102.3000705@oracle.com> <53CEEFD3.8070106@oracle.com> Message-ID: <53CF7668.4070104@oracle.com> Revised the webrev: http://cr.openjdk.java.net/~okutsu/9/8048123/webrev.01 The changes from the previous one are: - Changed
 (originally 
) to 
{@code
- Replaced StringTokenizer with String.split()
- Eliminated RuntimeException

Thanks,
Masayoshi

On 7/23/2014 8:12 AM, Masayoshi Okutsu wrote:
> Thank you for catching it! I forgot to restore "return null;".
>
> Masayoshi
>
> On 7/23/2014 3:44 AM, Naoto Sato wrote:
>> Okutsu-san,
>>
>> I have one question. It looks like if the user specifies the 
>> additional era syntactically incorrect, it throws a RuntimeException. 
>> Should it just be ignored, as the spec reads "If the given era is 
>> invalid, such as the since value before the beginning of the last 
>> predefined era, the given era will be ignored"?
>>
>> Naoto
>>
>> On 7/22/14, 12:06 AM, Masayoshi Okutsu wrote:
>>> Hello,
>>>
>>> Please review the change for JDK-8048123. This change removes all the
>>> era definitions in ${java.home}/lib/calendars.properties. (The property
>>> file will eventually be gone later.) The major change is that any new
>>> era of the Japanese calendar should now be defined using new property
>>> "jdk.calendar.japanese.supplemental.era".
>>>
>>> https://bugs.openjdk.java.net/browse/JDK-8048123
>>>
>>> Webrev includes some unrelated cleanups.
>>>
>>> http://cr.openjdk.java.net/~okutsu/9/8048123/webrev.00/
>>>
>>> Thanks,
>>> Masayoshi
>


From Alan.Bateman at oracle.com  Wed Jul 23 13:23:11 2014
From: Alan.Bateman at oracle.com (Alan Bateman)
Date: Wed, 23 Jul 2014 14:23:11 +0100
Subject:  [9] RFR: 8048123: Replace calendars.properties with
 another mechanism to specify a new Japanese calendar era
In-Reply-To: <53CF7668.4070104@oracle.com>
References: <53CE0D8C.7060803@oracle.com>
	<53CEB102.3000705@oracle.com>	<53CEEFD3.8070106@oracle.com>
	<53CF7668.4070104@oracle.com>
Message-ID: <53CFB73F.7080507@oracle.com>

On 23/07/2014 09:46, Masayoshi Okutsu wrote:
> Revised the webrev:
> http://cr.openjdk.java.net/~okutsu/9/8048123/webrev.01
>
> The changes from the previous one are:
> - Changed 
 (originally 
) to 
{@code
> - Replaced StringTokenizer with String.split()
> - Eliminated RuntimeException
The use of {@code ..} and replacing the usage of StringTokenizer look 
good me.

I'm not so sure about silently ignoring errors in the property value, 
mostly because it would lead to incorrect behavior that is likely to be 
very difficult to track down. If there area used logging then there 
might be some hope of finding it but this isn't the case.

-Alan

From naoto.sato at oracle.com  Wed Jul 23 16:44:00 2014
From: naoto.sato at oracle.com (Naoto Sato)
Date: Wed, 23 Jul 2014 09:44:00 -0700
Subject:  [9] RFR: 8048123: Replace calendars.properties with
 another mechanism to specify a new Japanese calendar era
In-Reply-To: <53CFB73F.7080507@oracle.com>
References: <53CE0D8C.7060803@oracle.com>	<53CEB102.3000705@oracle.com>	<53CEEFD3.8070106@oracle.com>	<53CF7668.4070104@oracle.com>
	<53CFB73F.7080507@oracle.com>
Message-ID: <53CFE650.20605@oracle.com>

Although I believe the incorrect behavior would be very obvious ("era" 
specified in the property would simply be not used), I would agree the 
failed property be better logged.

Naoto

On 7/23/14, 6:23 AM, Alan Bateman wrote:
> On 23/07/2014 09:46, Masayoshi Okutsu wrote:
>> Revised the webrev:
>> http://cr.openjdk.java.net/~okutsu/9/8048123/webrev.01
>>
>> The changes from the previous one are:
>> - Changed 
 (originally 
) to 
{@code
>> - Replaced StringTokenizer with String.split()
>> - Eliminated RuntimeException
> The use of {@code ..} and replacing the usage of StringTokenizer look
> good me.
>
> I'm not so sure about silently ignoring errors in the property value,
> mostly because it would lead to incorrect behavior that is likely to be
> very difficult to track down. If there area used logging then there
> might be some hope of finding it but this isn't the case.
>
> -Alan

From masayoshi.okutsu at oracle.com  Thu Jul 24 00:35:27 2014
From: masayoshi.okutsu at oracle.com (Masayoshi Okutsu)
Date: Thu, 24 Jul 2014 09:35:27 +0900
Subject:  [9] RFR: 8048123: Replace calendars.properties with
 another mechanism to specify a new Japanese calendar era
In-Reply-To: <53CFE650.20605@oracle.com>
References: <53CE0D8C.7060803@oracle.com>	<53CEB102.3000705@oracle.com>	<53CEEFD3.8070106@oracle.com>	<53CF7668.4070104@oracle.com>	<53CFB73F.7080507@oracle.com>
	<53CFE650.20605@oracle.com>
Message-ID: <53D054CF.5010309@oracle.com>

The expected property usage, which hasn't changed from the properties 
file, is that we will provide the correct property value of any new era 
probably with a test program which will verify the given values. For JDK 
6 to 8, the updated property file will need to be provided by us with a 
test program. I don't expect that users regularly and randomly define 
their own eras. The Japanese government defines eras by decrees [1][2].

I could change the spec, which requires another CCC cycle, and add error 
logging. But I believe that's overkill for the functionality and its 
usage (basically only once every several ten years for the limited 
number of users). In addition, the syntax isn't complicated at all. And 
if any wrong values are given, such as a typo in the given name, there 
will be no way to detect it in the API anyway.

BTW, I tend to avoid use of logging (and some other APIs) in the 
date-time API. It could create inter dependencies leading to an infinite 
loop to use some APIs from the date-time API. IIRC Sherman and I have 
worked on such bug reports. It's far more difficult to diagnose inter 
dependencies than syntax errors of the simple property value.

If it's necessary to report any syntax errors, I think throwing an 
exception should be a solution. So, should I start over from the spec?

Thanks,
Masayoshi

[1] http://law.e-gov.go.jp/htmldata/S64/S64SE001.html
[2] http://www.mext.go.jp/b_menu/hakusho/nc/k19890107001/k19890107001.html

On 7/24/2014 1:44 AM, Naoto Sato wrote:
> Although I believe the incorrect behavior would be very obvious ("era" 
> specified in the property would simply be not used), I would agree the 
> failed property be better logged.
>
> Naoto
>
> On 7/23/14, 6:23 AM, Alan Bateman wrote:
>> On 23/07/2014 09:46, Masayoshi Okutsu wrote:
>>> Revised the webrev:
>>> http://cr.openjdk.java.net/~okutsu/9/8048123/webrev.01
>>>
>>> The changes from the previous one are:
>>> - Changed 
 (originally 
) to 
{@code
>>> - Replaced StringTokenizer with String.split()
>>> - Eliminated RuntimeException
>> The use of {@code ..} and replacing the usage of StringTokenizer look
>> good me.
>>
>> I'm not so sure about silently ignoring errors in the property value,
>> mostly because it would lead to incorrect behavior that is likely to be
>> very difficult to track down. If there area used logging then there
>> might be some hope of finding it but this isn't the case.
>>
>> -Alan


From naoto.sato at oracle.com  Tue Jul 29 17:17:12 2014
From: naoto.sato at oracle.com (Naoto Sato)
Date: Tue, 29 Jul 2014 10:17:12 -0700
Subject:  [9] RFR: JDK-8048515: Read outside array bounds in
	jdk/src/solaris/native/java/lang/java_props_md.c
Message-ID: <53D7D718.8000303@oracle.com>

Okutsu-san,

Please approve this retroactive fix on this open alias, in order for 
backporting the fix into 8u release. Changeset is here and is already 
integrated per the previous review.

http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/2b7bf1d63a9c

Naoto

From masayoshi.okutsu at oracle.com  Tue Jul 29 22:54:43 2014
From: masayoshi.okutsu at oracle.com (Masayoshi Okutsu)
Date: Wed, 30 Jul 2014 07:54:43 +0900
Subject:  [9] RFR: JDK-8048515: Read outside array bounds in
	jdk/src/solaris/native/java/lang/java_props_md.c
In-Reply-To: <53D7D718.8000303@oracle.com>
References: <53D7D718.8000303@oracle.com>
Message-ID: <53D82633.1040003@oracle.com>

Approved.

Masayoshi

On 7/30/2014 2:17 AM, Naoto Sato wrote:
> Okutsu-san,
>
> Please approve this retroactive fix on this open alias, in order for 
> backporting the fix into 8u release. Changeset is here and is already 
> integrated per the previous review.
>
> http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/2b7bf1d63a9c
>
> Naoto


From masayoshi.okutsu at oracle.com  Thu Jul 31 14:16:37 2014
From: masayoshi.okutsu at oracle.com (Masayoshi Okutsu)
Date: Thu, 31 Jul 2014 23:16:37 +0900
Subject:  [9] RFR: 8048123: Replace calendars.properties with
 another mechanism to specify a new Japanese calendar era
In-Reply-To: <53D054CF.5010309@oracle.com>
References: <53CE0D8C.7060803@oracle.com>	<53CEB102.3000705@oracle.com>	<53CEEFD3.8070106@oracle.com>	<53CF7668.4070104@oracle.com>	<53CFB73F.7080507@oracle.com>	<53CFE650.20605@oracle.com>
	<53D054CF.5010309@oracle.com>
Message-ID: <53DA4FC5.4070700@oracle.com>

I've decided to follow the current spec -- ignoring any invalid property 
values. This way applications can still run without removing the 
property even after installing a fixed update release.

Thanks,
Masayoshi

On 7/24/2014 9:35 AM, Masayoshi Okutsu wrote:
> The expected property usage, which hasn't changed from the properties 
> file, is that we will provide the correct property value of any new 
> era probably with a test program which will verify the given values. 
> For JDK 6 to 8, the updated property file will need to be provided by 
> us with a test program. I don't expect that users regularly and 
> randomly define their own eras. The Japanese government defines eras 
> by decrees [1][2].
>
> I could change the spec, which requires another CCC cycle, and add 
> error logging. But I believe that's overkill for the functionality and 
> its usage (basically only once every several ten years for the limited 
> number of users). In addition, the syntax isn't complicated at all. 
> And if any wrong values are given, such as a typo in the given name, 
> there will be no way to detect it in the API anyway.
>
> BTW, I tend to avoid use of logging (and some other APIs) in the 
> date-time API. It could create inter dependencies leading to an 
> infinite loop to use some APIs from the date-time API. IIRC Sherman 
> and I have worked on such bug reports. It's far more difficult to 
> diagnose inter dependencies than syntax errors of the simple property 
> value.
>
> If it's necessary to report any syntax errors, I think throwing an 
> exception should be a solution. So, should I start over from the spec?
>
> Thanks,
> Masayoshi
>
> [1] http://law.e-gov.go.jp/htmldata/S64/S64SE001.html
> [2] 
> http://www.mext.go.jp/b_menu/hakusho/nc/k19890107001/k19890107001.html
>
> On 7/24/2014 1:44 AM, Naoto Sato wrote:
>> Although I believe the incorrect behavior would be very obvious 
>> ("era" specified in the property would simply be not used), I would 
>> agree the failed property be better logged.
>>
>> Naoto
>>
>> On 7/23/14, 6:23 AM, Alan Bateman wrote:
>>> On 23/07/2014 09:46, Masayoshi Okutsu wrote:
>>>> Revised the webrev:
>>>> http://cr.openjdk.java.net/~okutsu/9/8048123/webrev.01
>>>>
>>>> The changes from the previous one are:
>>>> - Changed 
 (originally 
) to 
{@code
>>>> - Replaced StringTokenizer with String.split()
>>>> - Eliminated RuntimeException
>>> The use of {@code ..} and replacing the usage of StringTokenizer look
>>> good me.
>>>
>>> I'm not so sure about silently ignoring errors in the property value,
>>> mostly because it would lead to incorrect behavior that is likely to be
>>> very difficult to track down. If there area used logging then there
>>> might be some hope of finding it but this isn't the case.
>>>
>>> -Alan
>


From tanin47 at yahoo.com  Fri Jul 11 21:25:53 2014
From: tanin47 at yahoo.com (Tanin Na Nakorn)
Date: Fri, 11 Jul 2014 21:25:53 -0000
Subject:  How is thai_dict generated?
Message-ID: <1405113951.82017.YahooMailNeo@web140303.mail.bf1.yahoo.com>

Hi All,

I would like to understand how BreakIterator for Thai language works and am stuck at the file thai_dict.

I would like to learn how it is generated. Here is the file:?https://github.com/openjdk-mirror/jdk7u-jdk/blob/master/src/share/classes/sun/text/resources/thai_dict

Also, where is the code that generates this file? Where is the original data source for it?

Please help me.

Thank you,
Tanin Na Nakorn