The fix looks good to me.
Thanks,
Alexandr.
On 5/20/2015 4:50 PM, Alexander Zvegintsev wrote:
Oh, I see, thanks for clarifying this,
the fix looks good to me then.
Thanks,
Alexander.
On 05/20/2015 04:33 PM, Semyon Sadetsky wrote:
Hi Alexander,
This definition is mentioned in the tutorial. I think it would be
good to make this constant public eventually because it is often used
in various the GroupLayout calls as a parameter.
--Semyon
On 5/20/2015 3:34 PM, Alexander Zvegintsev wrote:
Hi Semyon,
I think that INFINITE is a bit inaccurate name.
Personally, I think that there is no need in extra variable here.
Why just not inline MAX_VALUE / 2 (with comment about integer
overflow) into constrain()?
Thanks,
Alexander.
On 05/19/2015 05:38 PM, Semyon Sadetsky wrote:
Alexander, thanks that's true.
http://cr.openjdk.java.net/~ssadetsky/8079640/webrev.01/
On 5/19/2015 2:29 PM, Alexander Scherbatiy wrote:
The SequentialGroup.operator(int a, int b) method returns
constrain(a) + constrain(b).
If there are no any restriction to the constrain() return value
it can leads to the integer overflow.
May be Integer.MAX_VALUE / 2 can be used instead of Short.MAX_VALUE?
Thanks,
Alexandr.
On 5/18/2015 3:19 PM, Semyon Sadetsky wrote:
Sergey,
I have dug into the SCCS history. This was set initially and was
not related to any issues.
--Semyon
On 5/8/2015 4:07 PM, Sergey Bylokhov wrote:
Hi, Semyon.
It will be good to dig into the history of GroupLayout and
understand why this was constrained, note that tutorial should
be updated also.
On 08.05.15 11:47, Semyon Sadetsky wrote:
Hello,
Please review fix for JDK9:
bug: https://bugs.openjdk.java.net/browse/JDK-8079640
webrev: http://cr.openjdk.java.net/~ssadetsky/8079640/webrev.00/
*THE ROOT CAUSE
Component minimum size is limited to Short.MAX_VALUE in
GroupLayout.
JDK turtorial
https://docs.oracle.com/javase/tutorial/uiswing/layout/group.html
tells that Short.MAX_VALUE is treated as infinite.
But I did not find any reasons in JDK specs why a bigger number
cannot be used.
*SOLUTION
Remove the limitation
*TESTING
Test is added to cover the large component scenario.
Existing GroupLayout tests are passed.
--Semyon