Re: Possible BufferedImage.getRGB optimization

2025-08-29 Thread Jeremy Wood
Daniel, I agree BufferedImage.getRGB can be much too slow, and it looks like you already found the work-around I’ve been using for years: image.getRaster().getDataElements(..) But I’m not a reviewer for the client-libs project so I don’t think I can’t speak to your bigger question: > Does t

Re: RFR: 8366369: Add @requires linux for GTK L&F tests

2025-08-29 Thread Sergey Bylokhov
On Fri, 29 Aug 2025 08:30:21 GMT, Alexey Ivanov wrote: >The purpose of this PR is to avoid running GTK L&F specific tests on the >platforms where GTK L&F isn't available. But why not try loading it? That would help verify that the validation for missing dependencies works correctly. I think th

Re: RFR: 8366208: Unexpected exception in sun.java2d.cmm.lcms.LCMSImageLayout [v2]

2025-08-29 Thread Sergey Bylokhov
On Fri, 29 Aug 2025 08:52:43 GMT, Alexey Ivanov wrote: > Without the fix, the test throws `ClassCastException`, doesn't it? Yes, like this: `ClassCastException: CustomRaster cannot be cast to class IntegerComponentRaster ` - PR Comment: https://git.openjdk.org/jdk/pull/26994#issue

Integrated: 8366359: Test should throw SkippedException when there is no lpstat

2025-08-29 Thread SendaoYan
On Thu, 28 Aug 2025 14:24:19 GMT, SendaoYan wrote: > Hi all, > > I think test javax/print/PrintServiceLookup/CountPrintServices.java should > throw jtreg.SkippedException when there is no lpstat, rather that report test > failure. > > Only javax/print/PrintServiceLookup/CountPrintServices.jav

Re: RFR: 8366359: Test should throw SkippedException when there is no lpstat [v5]

2025-08-29 Thread SendaoYan
On Fri, 29 Aug 2025 16:43:37 GMT, Phil Race wrote: >> SendaoYan has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Remove redundant initial > > Marked as reviewed by prr (Reviewer). Thanks for your patient reviews @prrace @aivanov-jdk ---

Re: RFR: 8366208: Unexpected exception in sun.java2d.cmm.lcms.LCMSImageLayout [v2]

2025-08-29 Thread Phil Race
On Fri, 29 Aug 2025 19:21:21 GMT, Alexey Ivanov wrote: >> the java2d code uses the style that the "{" is on new line if the line was >> wrapped. That was forced by Jim, and I still follow that. > > Okay. How much common is it for the newly added code? I haven't come across > it frequently recen

Re: RFR: 8366208: Unexpected exception in sun.java2d.cmm.lcms.LCMSImageLayout [v3]

2025-08-29 Thread Phil Race
On Fri, 29 Aug 2025 19:19:22 GMT, Sergey Bylokhov wrote: >> We have a few places in the cmm code where the fast-code-path assumes that >> standard buffered images with type such as TYPE_INT_ARGB_PRE use our private >> raster implementation such as IntegerComponentRaster, which is not >> necess

Re: RFR: 8365609: Fix several potential NULL native pointer dereferences in the desktop module [v4]

2025-08-29 Thread Phil Race
On Fri, 29 Aug 2025 08:11:19 GMT, Prasanta Sadhukhan wrote: >> Artem Semenov has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fixed indentation > > src/java.desktop/share/native/libsplashscreen/splashscreen_gif.c line 286: > >> 284:

Re: RFR: 8366208: Unexpected exception in sun.java2d.cmm.lcms.LCMSImageLayout [v2]

2025-08-29 Thread Alexey Ivanov
On Fri, 29 Aug 2025 19:16:09 GMT, Sergey Bylokhov wrote: >> test/jdk/sun/java2d/cmm/ColorConvertOp/FilterSemiCustomImages.java line 87: >> >>> 85: private static void test(int fromIndex, int toIndex, int type) >>> 86: throws Exception >>> 87: { >> >> Suggestion: >> >> p

Re: RFR: 8366208: Unexpected exception in sun.java2d.cmm.lcms.LCMSImageLayout [v3]

2025-08-29 Thread Alexey Ivanov
On Fri, 29 Aug 2025 19:19:22 GMT, Sergey Bylokhov wrote: >> We have a few places in the cmm code where the fast-code-path assumes that >> standard buffered images with type such as TYPE_INT_ARGB_PRE use our private >> raster implementation such as IntegerComponentRaster, which is not >> necess

Re: RFR: 8366208: Unexpected exception in sun.java2d.cmm.lcms.LCMSImageLayout [v2]

2025-08-29 Thread Sergey Bylokhov
On Fri, 29 Aug 2025 08:45:41 GMT, Alexey Ivanov wrote: >> Sergey Bylokhov has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Update FilterSemiCustomImages.java > > test/jdk/sun/java2d/cmm/ColorConvertOp/FilterSemiCustomImages.java line 87:

Re: RFR: 8366208: Unexpected exception in sun.java2d.cmm.lcms.LCMSImageLayout [v3]

2025-08-29 Thread Sergey Bylokhov
> We have a few places in the cmm code where the fast-code-path assumes that > standard buffered images with type such as TYPE_INT_ARGB_PRE use our private > raster implementation such as IntegerComponentRaster, which is not > necessarily true. Casting to these private raster types can result in

Re: RFR: 8260555: Change the default TIMEOUT_FACTOR from 4 to 1 [v7]

2025-08-29 Thread Leo Korinth
> This changes the timeout factor from 4 to 1. Most of the changes add timeouts > to individual test cases so that I am able to run them with a timeout factor > of 0.7 (some margin to the checked in factor of one) > > In addition to changing the timeout factor, I am also using a library call to

Re: RFR: 8366359: Test should throw SkippedException when there is no lpstat [v5]

2025-08-29 Thread Phil Race
On Fri, 29 Aug 2025 13:06:45 GMT, SendaoYan wrote: >> Hi all, >> >> I think test javax/print/PrintServiceLookup/CountPrintServices.java should >> throw jtreg.SkippedException when there is no lpstat, rather that report >> test failure. >> >> Only javax/print/PrintServiceLookup/CountPrintServi

Re: RFR: 8365609: Fix several potential NULL native pointer dereferences in the desktop module [v4]

2025-08-29 Thread Phil Race
On Thu, 28 Aug 2025 13:19:02 GMT, Artem Semenov wrote: >> The defect has been detected and confirmed in the function >> OGLBlitToSurfaceViaTexture() located in the file >> src/java.desktop/share/native/common/java2d/opengl/OGLBlitLoops.c with >> static code analysis. This defect can potentiall

Re: RFR: 8365609: Fix several potential NULL native pointer dereferences in the desktop module [v4]

2025-08-29 Thread Phil Race
On Fri, 29 Aug 2025 16:15:43 GMT, Phil Race wrote: >> src/java.desktop/share/native/common/java2d/opengl/OGLBlitLoops.c line 412: >> >>> 410: // in case pixel stride is not a multiple of scanline stride the >>> copy >>> 411: // has to be done line by line (see 6207877) >>> 412: if (

Re: RFR: 8365609: Fix several potential NULL native pointer dereferences in the desktop module [v4]

2025-08-29 Thread Phil Race
On Fri, 29 Aug 2025 08:02:30 GMT, Prasanta Sadhukhan wrote: >> Artem Semenov has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fixed indentation > > src/java.desktop/share/native/common/java2d/opengl/OGLBlitLoops.c line 412: > >> 410:

Re: RFR: 8260555: Change the default TIMEOUT_FACTOR from 4 to 1 [v6]

2025-08-29 Thread Leo Korinth
On Tue, 26 Aug 2025 17:06:08 GMT, Matthew Donovan wrote: >> Leo Korinth has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - revert added timeout, it is not needed >> - feedback from Mark Sheppard > > test/jdk/sun/security/krb5/name/Constr

Re: RFR: 8366359: Test should throw SkippedException when there is no lpstat [v5]

2025-08-29 Thread Alexey Ivanov
On Fri, 29 Aug 2025 13:06:45 GMT, SendaoYan wrote: >> Hi all, >> >> I think test javax/print/PrintServiceLookup/CountPrintServices.java should >> throw jtreg.SkippedException when there is no lpstat, rather that report >> test failure. >> >> Only javax/print/PrintServiceLookup/CountPrintServi

Re: RFR: 8365886: JSplitPane loses track of the left component when the component orientation is changed [v3]

2025-08-29 Thread Alan Snyder
Could layoutContainer() call updateComponents()?

Re: RFR: 8366359: Test should throw SkippedException when there is no lpstat [v5]

2025-08-29 Thread SendaoYan
> Hi all, > > I think test javax/print/PrintServiceLookup/CountPrintServices.java should > throw jtreg.SkippedException when there is no lpstat, rather that report test > failure. > > Only javax/print/PrintServiceLookup/CountPrintServices.java invokes lpstat > explicitly. > > Change has been

Re: RFR: 8366359: Test should throw SkippedException when there is no lpstat [v4]

2025-08-29 Thread SendaoYan
On Fri, 29 Aug 2025 12:51:43 GMT, Alexey Ivanov wrote: >> SendaoYan has updated the pull request incrementally with one additional >> commit since the last revision: >> >> 1. add import java.io.IOException; 2. Re-throw the IOException if do not >> throw SkippeException > > test/jdk/javax/pri

Re: RFR: 8366359: Test should throw SkippedException when there is no lpstat [v4]

2025-08-29 Thread Alexey Ivanov
On Fri, 29 Aug 2025 10:29:58 GMT, SendaoYan wrote: >> Hi all, >> >> I think test javax/print/PrintServiceLookup/CountPrintServices.java should >> throw jtreg.SkippedException when there is no lpstat, rather that report >> test failure. >> >> Only javax/print/PrintServiceLookup/CountPrintServi

Re: RFR: 8366359: Test should throw SkippedException when there is no lpstat [v3]

2025-08-29 Thread SendaoYan
On Fri, 29 Aug 2025 09:27:38 GMT, Alexey Ivanov wrote: >> SendaoYan has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Remove unnecessary whitespace > > test/jdk/javax/print/PrintServiceLookup/CountPrintServices.java line 57: > >> 55:

Re: RFR: 8366359: Test should throw SkippedException when there is no lpstat [v3]

2025-08-29 Thread SendaoYan
On Fri, 29 Aug 2025 09:25:41 GMT, Alexey Ivanov wrote: >> SendaoYan has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Remove unnecessary whitespace > > test/jdk/javax/print/PrintServiceLookup/CountPrintServices.java line 52: > >> 50:

Re: RFR: 8366359: Test should throw SkippedException when there is no lpstat [v4]

2025-08-29 Thread SendaoYan
> Hi all, > > I think test javax/print/PrintServiceLookup/CountPrintServices.java should > throw jtreg.SkippedException when there is no lpstat, rather that report test > failure. > > Only javax/print/PrintServiceLookup/CountPrintServices.java invokes lpstat > explicitly. > > Change has been

Re: RFR: 8365609: Fix several potential NULL native pointer dereferences in the desktop module [v4]

2025-08-29 Thread Prasanta Sadhukhan
On Thu, 28 Aug 2025 13:19:02 GMT, Artem Semenov wrote: >> The defect has been detected and confirmed in the function >> OGLBlitToSurfaceViaTexture() located in the file >> src/java.desktop/share/native/common/java2d/opengl/OGLBlitLoops.c with >> static code analysis. This defect can potentiall

Re: Unwanted artifacts on my JButton

2025-08-29 Thread Alexey Ivanov
Hi David, It is a known issue because of fractional scale. Unfortunately, it's not so easy to fix. The artifact that you see is the result of rounding: the button should've painted more pixels, but it didn't, therefore you see garbage left in the back buffer. What is the default / recommende

Re: RFR: 8366359: Test should throw SkippedException when there is no lpstat [v3]

2025-08-29 Thread Alexey Ivanov
On Fri, 29 Aug 2025 09:15:49 GMT, SendaoYan wrote: >> Hi all, >> >> I think test javax/print/PrintServiceLookup/CountPrintServices.java should >> throw jtreg.SkippedException when there is no lpstat, rather that report >> test failure. >> >> Only javax/print/PrintServiceLookup/CountPrintServi

Re: RFR: 8366359: Test should throw SkippedException when there is no lpstat [v3]

2025-08-29 Thread SendaoYan
> Hi all, > > I think test javax/print/PrintServiceLookup/CountPrintServices.java should > throw jtreg.SkippedException when there is no lpstat, rather that report test > failure. > > Only javax/print/PrintServiceLookup/CountPrintServices.java invokes lpstat > explicitly. > > Change has been

Re: RFR: 8366359: Test should throw SkippedException when there is no lpstat [v2]

2025-08-29 Thread SendaoYan
On Fri, 29 Aug 2025 08:41:11 GMT, Alexey Ivanov wrote: >> SendaoYan has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Use "@requires (os.family == "linux")" instead of check OS type in code > > test/jdk/javax/print/PrintServiceLookup/Count

Re: RFR: 8366208: Unexpected exception in sun.java2d.cmm.lcms.LCMSImageLayout [v2]

2025-08-29 Thread Alexey Ivanov
On Fri, 29 Aug 2025 06:53:29 GMT, Sergey Bylokhov wrote: >> We have a few places in the cmm code where the fast-code-path assumes that >> standard buffered images with type such as TYPE_INT_ARGB_PRE use our private >> raster implementation such as IntegerComponentRaster, which is not >> necess

Re: RFR: 8366359: Test should throw SkippedException when there is no lpstat [v2]

2025-08-29 Thread Alexey Ivanov
On Fri, 29 Aug 2025 02:48:35 GMT, SendaoYan wrote: >> Hi all, >> >> I think test javax/print/PrintServiceLookup/CountPrintServices.java should >> throw jtreg.SkippedException when there is no lpstat, rather that report >> test failure. >> >> Only javax/print/PrintServiceLookup/CountPrintServi

Re: RFR: 8366369: Add @requires linux for GTK L&F tests

2025-08-29 Thread Alexey Ivanov
On Fri, 29 Aug 2025 02:30:36 GMT, Prasanta Sadhukhan wrote: >> * Add `@requires os.family == "linux"` to prevent GTK L&F tests from running >> on other OS but Linux. >> * Let any exceptions from `UIManager.setLookAndFeel` propagate. >> * Remove `@author` tag. >> * Expand imports in `test/jdk/co

Re: RFR: 8366369: Add @requires linux for GTK L&F tests

2025-08-29 Thread Alexey Ivanov
On Thu, 28 Aug 2025 21:32:05 GMT, Phil Race wrote: >> * Add `@requires os.family == "linux"` to prevent GTK L&F tests from running >> on other OS but Linux. >> * Let any exceptions from `UIManager.setLookAndFeel` propagate. >> * Remove `@author` tag. >> * Expand imports in `test/jdk/com/sun/java

Re: RFR: 8365609: Fix several potential NULL native pointer dereferences in the desktop module [v4]

2025-08-29 Thread Prasanta Sadhukhan
On Thu, 28 Aug 2025 13:19:02 GMT, Artem Semenov wrote: >> The defect has been detected and confirmed in the function >> OGLBlitToSurfaceViaTexture() located in the file >> src/java.desktop/share/native/common/java2d/opengl/OGLBlitLoops.c with >> static code analysis. This defect can potentiall

Re: RFR: 8364135: JPEGImageReader.getImageTypes() should throw exception for negative image index [v5]

2025-08-29 Thread Alexey Ivanov
On Fri, 29 Aug 2025 06:52:49 GMT, Jayathirth D V wrote: > Current state of test, i feel is more readable. So will keep it as it is. Either you like streams or you don't. It took a long while for me to appreciate this functional style. What I don't particularly like about the current version is

Re: RFR: 8364135: JPEGImageReader.getImageTypes() should throw exception for negative image index [v6]

2025-08-29 Thread Alexey Ivanov
On Fri, 29 Aug 2025 06:56:31 GMT, Jayathirth D V wrote: >> We need to throw appropriate exception when we pass invalid image index >> values to ImageReader.getImageTypes(). >> We throw IOOBE in all other plugins except JPEG, Added appropriate check to >> throw IOOBE when JpegImageReader has inv

Re: RFR: 8364135: JPEGImageReader.getImageTypes() should throw exception for negative image index [v5]

2025-08-29 Thread Jayathirth D V
On Thu, 28 Aug 2025 12:49:37 GMT, Alexey Ivanov wrote: >> Jayathirth D V has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Keep verifyImageIndex in try block > > test/jdk/javax/imageio/plugins/jpeg/JpegNegativeImageIndexTest.java line 67:

Re: RFR: 8364135: JPEGImageReader.getImageTypes() should throw exception for negative image index [v5]

2025-08-29 Thread Jayathirth D V
On Thu, 28 Aug 2025 13:04:53 GMT, Alexey Ivanov wrote: >> test/jdk/javax/imageio/plugins/jpeg/JpegNegativeImageIndexTest.java line 52: >> >>> 50: >>> 51: private static void testMethod(String methodName, >>> 52:RunnableWithException method) { >> >> The `

Re: RFR: 8366208: Unexpected exception in sun.java2d.cmm.lcms.LCMSImageLayout [v2]

2025-08-29 Thread Sergey Bylokhov
> We have a few places in the cmm code where the fast-code-path assumes that > standard buffered images with type such as TYPE_INT_ARGB_PRE use our private > raster implementation such as IntegerComponentRaster, which is not > necessarily true. Casting to these private raster types can result in