[OpenJDK 2D-Dev] RFR: 8146324: Add sun.font.FontUtilities.isComplexCharCode or related method to public API

Phil Race philip.race at oracle.com
Thu Mar 24 22:22:22 UTC 2016


That is true .. although I think I have previously been convinced that IAE
is generally the better choice for such a case, I found only deriveFont
that throws IAE for null in this file.
So the question is whether to be consistent or to start picking the 
better option.
So if there were no existing IAEs or NPEs in this file, which would you 
choose now ?

-phil.

On 03/24/2016 02:37 PM, Sergey Bylokhov wrote:
> Hi, Phil.
> Should this new method throw IAE? It seems that NPE can be thrown 
> instead, At least other methods in Font.java including the newly added 
> createFonts() throw NPE.
>
> On 25.03.16 0:16, Phil Race wrote:
>> bug : https://bugs.openjdk.java.net/browse/JDK-8146324
>> fix : http://cr.openjdk.java.net/~prr/8146324/
>>
>> Developers have used an internal API to detect when TextLayout or
>> GlyphVector.layoutGlyphVectorwill be needed since that is a slower path.
>>
>> This provides a public equivalent capability.
>>
>> I have included a test which checks the assertions of the API.
>>
>> A CCC will be filed.
>>
>> -phil.
>
>




More information about the 2d-dev mailing list