Re: [OpenJDK 2D-Dev] RFR: 8244113 : [TESTBUG] java/awt/font/Rotate/RotatedSyntheticBoldTest.java test comments interpreted as args.

2020-04-30 Thread Philip Race
Updated with a couple of stability fixes : 1) to use invokeAndWait() instead of invokeLater() 2) To skip fonts that don't support the text we are testing. http://cr.openjdk.java.net/~prr/8244113.1 -phil On 4/29/20, 11:56 AM, Philip Race wrote: bug :

Re: [OpenJDK 2D-Dev] RFR: 8221305: java/awt/FontMetrics/MaxAdvanceIsMax.java fails on MacOS + Solaris

2020-04-30 Thread Philip Race
This test is called MaxAdvance *is max*. My emphasis. Not "all values returned by getWidths() are less than or equal to max advance. The latter is simply the inadequate implementation to partially test the assertion and which was already proving to be too much. The only way to make that test

Re: [OpenJDK 2D-Dev] RFR: 8221305: java/awt/FontMetrics/MaxAdvanceIsMax.java fails on MacOS + Solaris

2020-04-30 Thread Sergey Bylokhov
On 4/29/20 3:58 pm, Philip Race wrote: the advance of 'm' is a commonly used proxy for the design width of a latin font. But I agree it is also not really a great estimate once you consider any international text. Anyway I am not sure where you are headed with that and the discussion of

Re: [OpenJDK 2D-Dev] [15] RFR JDK-8242557: Add length limit for strings in PNGImageWriter

2020-04-30 Thread Prasanta Sadhukhan
OK. Thanks for the clarification. +1 Regards Prasanta On 30-Apr-20 4:47 PM, Jayathirth D v wrote: Hi Prasanta, Thats why I pointed to JDK-8195841  where PNGImageReader.readNullTerminatedString() is changed. Second argument that is getting

Re: [OpenJDK 2D-Dev] [15] RFR JDK-8242557: Add length limit for strings in PNGImageWriter

2020-04-30 Thread Jayathirth D v
Hi Prasanta, Thats why I pointed to JDK-8195841 where PNGImageReader.readNullTerminatedString() is changed. Second argument that is getting passed to readNullTerminatedString() is maximum length including null termination. While reading the

Re: [OpenJDK 2D-Dev] [15] RFR JDK-8242557: Add length limit for strings in PNGImageWriter

2020-04-30 Thread Prasanta Sadhukhan
Hi Jay, >> we will throw exception in case of reader also But in the fix, only PNGWriter is changed. I did not see in existing PNGReader any exception being thrown for > 79 bytes. I see in reader, we have private void parse_iCCP_chunk(int chunkLength) throws IOException {     String

Re: [OpenJDK 2D-Dev] [15] RFR JDK-8242557: Add length limit for strings in PNGImageWriter

2020-04-30 Thread Jayathirth D v
Hi Prasanta, I didnt say reader will decode more than 79 bytes but user might expect more than 79 bytes since we allowed more than 79 bytes write. While reading non-standard PNG chunks(having greater than 79 bytes null terminated string) we will throw exception in case of reader also. Its a

Re: [OpenJDK 2D-Dev] [15] RFR JDK-8242557: Add length limit for strings in PNGImageWriter

2020-04-30 Thread Prasanta Sadhukhan
Hi Jay, But why reader will read more than 79 bytes from the chunk..It should also limit it's reading to 1st 79 bytes (if the chunks we get from non-oracle non-standard PNG writer is more than 79bytes) as per spec, no? Regards Prasanta On 30-Apr-20 2:01 PM, Jayathirth D v wrote: Hi

Re: [OpenJDK 2D-Dev] [15] RFR JDK-8242557: Add length limit for strings in PNGImageWriter

2020-04-30 Thread Jayathirth D v
Hi Prasanta, Thanks for the review. If we consume only 79 bytes and continue writing the image, it will lead to unexpected behaviour when user tries to read the image expecting longer than 79 string data. Our reader is also tightly spec compliant for null terminated strings after JDK-8195841