Re: RFR: 8224267: JOptionPane message string with 5000+ newlines produces StackOverflowError [v3]

2022-07-11 Thread j3graham
On Mon, 11 Jul 2022 09:28:22 GMT, Prasanta Sadhukhan wrote: >> 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 StackO

Re: RFR: 8224267: JOptionPane message string with 5000+ newlines produces StackOverflowError [v3]

2022-07-11 Thread Sergey Bylokhov
On Mon, 11 Jul 2022 12:41:08 GMT, Alexey Ivanov wrote: > shall we indicate the original message is truncated? Add ... (ellipsis) to > the previous line of text? I think this is a great idea. - PR: https://git.openjdk.org/jdk/pull/9388

Integrated: 8289853: Update HarfBuzz to 4.4.1

2022-07-11 Thread Phil Race
On Thu, 7 Jul 2022 23:06:26 GMT, Phil Race wrote: > This upgrades the JDK's version of harfbuzz to 4.4.1. The current version is > 2.8.0 > Builds on all platforms. Testing looks good. > I've added an UPDATING.txt file with tips on the steps involved in these > upgrades. This pull request has n

Re: RFR: 8289853: Update HarfBuzz to 4.4.1

2022-07-11 Thread Alexander Zvegintsev
On Thu, 7 Jul 2022 23:06:26 GMT, Phil Race wrote: > This upgrades the JDK's version of harfbuzz to 4.4.1. The current version is > 2.8.0 > Builds on all platforms. Testing looks good. > I've added an UPDATING.txt file with tips on the steps involved in these > upgrades. Marked as reviewed by a

Withdrawn: 8185261: Font fallback sometimes doesn't work in Swing text components

2022-07-11 Thread duke
On Tue, 1 Feb 2022 18:38:39 GMT, Dmitry Batrak wrote: > The proposed fix makes fonts with and without fallback components > distinguishable (in terms of `equals` method), so that > font metrics cache (and other similar code) can handle them separately. This > is achieved by adding a new boolean

Re: RFR: 8272998: ImageIO.read() throws incorrect exception type

2022-07-11 Thread Damon Nguyen
On Thu, 9 Jun 2022 19:53:22 GMT, Phil Race wrote: > ImageIO.read() only documents IOException for any kind of decoding problem > and since > it is a convenience API we don't want to start requiring applications to > handle other RuntimeExceptions. > So in the unlikely case of some problem decod

Re: RFR: 8271846 a11y API lacks setSelectedIndex method [v2]

2022-07-11 Thread Artem Semenov
On Wed, 11 May 2022 12:49:34 GMT, Artem Semenov wrote: >> A11Y implementation on macOS has to directly call the >> 'JList.setSelectedIndex' method in order to request selection on an item >> (see 'CAccessibility.requestSelection'). The reason is that a11y API lacks >> appropriate method.There'

Re: RFR: 8224267: JOptionPane message string with 5000+ newlines produces StackOverflowError [v3]

2022-07-11 Thread Alexey Ivanov
On Mon, 11 Jul 2022 12:29:43 GMT, Prasanta Sadhukhan wrote: > > Hm… there could be problem: **the counter isn't reset** when the function > > is called again. It's reset only when the limit is reached. Or do I miss > > another case where the counter is reset? > > > > The easiest way could be t

Re: RFR: 8224267: JOptionPane message string with 5000+ newlines produces StackOverflowError [v3]

2022-07-11 Thread Prasanta Sadhukhan
On Mon, 11 Jul 2022 11:59:05 GMT, Alexey Ivanov wrote: > Hm… there could be problem: **the counter isn't reset** when the function is > called again. It's reset only when the limit is reached. Or do I miss another > case where the counter is reset? > > The easiest way could be to introduce a h

Re: RFR: 8289908: Skip bounds check for cases when String is constructed from entirely used byte[] [v3]

2022-07-11 Thread Сергей Цыпанов
On Mon, 11 Jul 2022 08:02:43 GMT, Сергей Цыпанов wrote: >> The new constructor looks very odd, especially when it does not have an >> explanation and doesn't describe the required preconditions for calling it. >> Is there a better way than adding a non-functional argument? >> The "unused" name

Re: RFR: 8224267: JOptionPane message string with 5000+ newlines produces StackOverflowError [v3]

2022-07-11 Thread Alexey Ivanov
On Mon, 11 Jul 2022 09:28:22 GMT, Prasanta Sadhukhan wrote: >> 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 StackO

Re: RFR: 8224267: JOptionPane message string with 5000+ newlines produces StackOverflowError [v3]

2022-07-11 Thread Alexey Ivanov
On Mon, 11 Jul 2022 11:34:49 GMT, Prasanta Sadhukhan wrote: > I guess if it's not successive, it will not exercise this condition so it > will not recurse as much > > ``` > if (nl >= 0) { > // break up newlines > if (nl == 0) { > ``` In that sense? I thought ab

Re: RFR: 8289908: Skip bounds check for cases when String is constructed from entirely used byte[] [v3]

2022-07-11 Thread Сергей Цыпанов
> We can skip bounds check and null check for Charset in case we use the array > entirely and the Charset is either default one or proven to be non-null. > > Benchmark results: > > before > > Benchmark Mode Cnt Score > Error Units > StringC

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

2022-07-11 Thread Prasanta Sadhukhan
On Wed, 6 Jul 2022 05:57:00 GMT, Prasanta Sadhukhan wrote: > 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 StackOverfl

Re: RFR: 8224267: JOptionPane message string with 5000+ newlines produces StackOverflowError [v3]

2022-07-11 Thread Prasanta Sadhukhan
On Mon, 11 Jul 2022 09:28:22 GMT, Prasanta Sadhukhan wrote: >> 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 StackO

Re: RFR: 8224267: JOptionPane message string with 5000+ newlines produces StackOverflowError [v3]

2022-07-11 Thread Alexey Ivanov
On Mon, 11 Jul 2022 09:28:22 GMT, Prasanta Sadhukhan wrote: >> 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 StackO

Re: RFR: 8289208: Test DrawRotatedStringUsingRotatedFont.java occasionally crashes on MacOS

2022-07-11 Thread Maxim Kartashev
On Fri, 8 Jul 2022 22:58:08 GMT, Phil Race wrote: > The code that disposes on the rendering thread is invoked from a dispose() > method that was on the Disposer thread. It then waits for that to finish. At that time the Disposer thread is blocked so not doing anything and the render thread is fr

Re: RFR: 8224267: JOptionPane message string with 5000+ newlines produces StackOverflowError [v3]

2022-07-11 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. Prasanta Sa

Re: RFR: 8224267: JOptionPane message string with 5000+ newlines produces StackOverflowError [v2]

2022-07-11 Thread Prasanta Sadhukhan
On Fri, 8 Jul 2022 14:07:57 GMT, Alexey Ivanov wrote: > > > Maybe we should rather limit the number of recursive calls? You caught > > > `StackOverflowError`, at this stage there's not much space left on the > > > stack. It may cause another `StackOverflowError`. > > > > > > I thought that bu

Re: RFR: 8224267: JOptionPane message string with 5000+ newlines produces StackOverflowError [v2]

2022-07-11 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. Prasanta Sa

Re: RFR: 6391806: JLabel and AbstractButton's imageUpdate method should be better specified [v5]

2022-07-11 Thread Abhishek Kumar
On Thu, 7 Jul 2022 21:03:04 GMT, Phil Race wrote: > The bug suggests returns true if one of this JLabel's icon or disabled icon > is derived from ImageIcon and it's Image is equal to the image passed in; > false otherwise. > > But looking at the code .. I don't think that is quite right either

Re: RFR: 8289908: Skip bounds check for cases when String is constructed from entirely used byte[] [v2]

2022-07-11 Thread Сергей Цыпанов
On Fri, 8 Jul 2022 14:04:14 GMT, Roger Riggs wrote: >> But if I roll back the added constructor I'll go through existing public one >> `public String(byte[] bytes, int offset, int length, Charset charset)` doing >> bounds check twice, won't I? > > The new constructor looks very odd, especially

Re: RFR: 8289908: Skip bounds check for cases when String is constructed from entirely used byte[] [v2]

2022-07-11 Thread Сергей Цыпанов
> We can skip bounds check and null check for Charset in case we use the array > entirely and the Charset is either default one or proven to be non-null. > > Benchmark results: > > before > > Benchmark Mode Cnt Score > Error Units > StringC