Re: RFR: 8286270: [java.desktop] Replace color search in XColors with a switch statement

2022-05-08 Thread ExE Boss
On Sun, 8 May 2022 02:44:24 GMT, Phil Race wrote: > > The current implementation creates ~750 new objects on load > > Whereas yours creates an un-bounded number .. and changes that two lookups > for the same name will return the same "==" object. That’s not what happens, since `XColors::lookup

Re: RFR: 8280035: Use Class.isInstance instead of Class.isAssignableFrom where applicable

2022-04-15 Thread ExE Boss
On Mon, 21 Feb 2022 12:16:53 GMT, Andrey Turbanov wrote: >> I've stared at the javadoc for Class.isAssignableFrom and Class.isInstance >> and if a non-null instance is used to get a non-null class they are PROBABLY >> the same but it is far from clear. The implementations of both are at least

Re: RFR: 8280035: Use Class.isInstance instead of Class.isAssignableFrom where applicable

2022-03-21 Thread ExE Boss
On Mon, 21 Feb 2022 12:16:53 GMT, Andrey Turbanov wrote: > Method `isAssignableFrom` is opposite: it brings unnecessary complexity in > the code. And it's easy to confuse orders of parameters. Even JBS confirms > that: Maybe we should add `Class::isSubclassOf(Class that)` that performs `that.

Re: RFR: 8274735: javax.imageio.IIOException: Unsupported Image Type while processing a valid JPEG image

2022-03-18 Thread ExE Boss
On Thu, 17 Mar 2022 03:23:49 GMT, Phil Race wrote: > The JDK's built-in Image I/O JPEG plugin decodes JPEGs which are YCbCr and > RGb and Grayscale but rejects CMYK and YCCK JPEGs. > These would correspond to JFIF encapsulated JPEGs. > > This was a reasonable decision to limit support to what w