RFR: 8224267: JOptionPane message string with 5000+ newlines produces StackOverflowError

2022-07-06 Thread Prasanta Sadhukhan
BasicOptionPaneUI.addMessageComponents() uses recursion to split message strings at newlines, generating a StackOverflowError when the message string contains an unusually large number of newlines. Fixed by catching StackOverflow and ignoring so that application is not stuck. - Comm

Re: RFR: 8288882: JFileChooser - empty (0 bytes) file is displayed as 1 KB [v3]

2022-07-06 Thread Naoto Sato
On Wed, 6 Jul 2022 11:59:31 GMT, Abhishek Kumar wrote: >> JFileChooser - empty file size issue fixed. >> For empty file, now the size 0 bytes. >> Manual Test Case "ZeroFileSizeCheck.java" created. > > Abhishek Kumar has updated the pull request incrementally with one additional > commit since t

Re: RFR: 8288882: JFileChooser - empty (0 bytes) file is displayed as 1 KB [v3]

2022-07-06 Thread Abhishek Kumar
On Thu, 30 Jun 2022 04:05:07 GMT, Prasanta Sadhukhan wrote: >>> Also, will this code work correctly for non-English locales? >> >> It won't. >> >> It has to use `MessageFormat` and it has to add a new string to the resource >> bundle. > > Dont think this len==0 check is needed... > One can us

Re: RFR: 8288882: JFileChooser - empty (0 bytes) file is displayed as 1 KB [v3]

2022-07-06 Thread Andy Goryachev
On Wed, 6 Jul 2022 11:59:31 GMT, Abhishek Kumar wrote: >> JFileChooser - empty file size issue fixed. >> For empty file, now the size 0 bytes. >> Manual Test Case "ZeroFileSizeCheck.java" created. > > Abhishek Kumar has updated the pull request incrementally with one additional > commit since t

Re: RFR: 8288882: JFileChooser - empty (0 bytes) file is displayed as 1 KB [v3]

2022-07-06 Thread Abhishek Kumar
On Thu, 30 Jun 2022 16:31:21 GMT, Harshitha Onkar wrote: >> Abhishek Kumar has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Byte entry added to basic.properties, MessageFormat used to format file >> length > > test/jdk/javax/swing/JFileC

Re: RFR: 8288428: javax/swing/JInternalFrame/Test6505027.java fails frequently in MacOS 12 machines

2022-07-06 Thread Manukumar V S
On Fri, 17 Jun 2022 14:28:15 GMT, Manukumar V S wrote: > javax/swing/JInternalFrame/Test6505027.java seems to be unstable in MacOS > machines, especially in MacOSX 12 machines and it fails intermittently in CI > causing some noise. > It seems to be a testbug as adding some stability improvement

Integrated: 8287603: Avoid redundant HashMap.containsKey calls in NimbusDefaults.getDerivedColor

2022-07-06 Thread Andrey Turbanov
On Sat, 30 Apr 2022 09:33:38 GMT, Andrey Turbanov wrote: > The method > `javax.swing.plaf.nimbus.NimbusDefaults#getDerivedColor(String,String,float,float,float,int,boolean)` > could be improved by usage of Map.putIfAbsent instead of separate > `containsKey`/`get`/`put` calls. We known that Has

Re: RFR: 8289697: buffer overflow in MTLVertexCache.m: MTLVertexCache_AddGlyphQuad [v3]

2022-07-06 Thread Vladimir Kempik
> Please review this simple patch. When running idea on jdk17 with asan I have > found this buffer overflow. > The code checks the cache for at least one free element, while placing 6 > elements to the cache. > The fix checks the presence of 6 free elements. Vladimir Kempik has updated the pull

Re: RFR: 8287603: Avoid redundant HashMap.containsKey calls in NimbusDefaults.getDerivedColor

2022-07-06 Thread Andrey Turbanov
On Sat, 30 Apr 2022 09:33:38 GMT, Andrey Turbanov wrote: > The method > `javax.swing.plaf.nimbus.NimbusDefaults#getDerivedColor(String,String,float,float,float,int,boolean)` > could be improved by usage of Map.putIfAbsent instead of separate > `containsKey`/`get`/`put` calls. We known that Has