On Thu, 5 Mar 2026 01:17:05 GMT, Prasanta Sadhukhan <[email protected]> wrote:
> The behavior of getNormallBounds() is not as per spec when - "JInternalFrame > is not in maximized state" > As per JinternalFrame.getNormalBounds > [spec](https://docs.oracle.com/en/java/javase/25/docs/api/java.desktop/javax/swing/JInternalFrame.html#getNormalBounds()) > >> If the JInternalFrame is not in maximized state, getNormalBounds() returns >> getBounds() > > but it seems in certain cases it can return cached normal bounds value and > not getBounds() value. > Fix is made to check if internalFrame is unmaximized, the normalBounds is > reset so that it can return getBounds() value in all cases > https://github.com/openjdk/jdk/blob/ff8b0ac048f6a6f75d1ad738d3354890d76d8128/src/java.desktop/share/classes/javax/swing/JInternalFrame.java#L1336-L1347 > > An existing test is also rectified to honour this spec test/jdk/javax/swing/JInternalFrame/NormalBoundsTest.java line 2: > 1: /* > 2: * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. Copyright year to be updated. test/jdk/javax/swing/JInternalFrame/NormalBoundsTest.java line 269: > 267: @Override > 268: public void run() { > 269: if (!internalFrame.getNormalBounds() Any reason for updating this test in this PR ? Is it related to the fix ? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/30065#discussion_r2910413712 PR Review Comment: https://git.openjdk.org/jdk/pull/30065#discussion_r2910428448
