Skip to content

Commit bcd1e38

Browse files
committed
Correct contract of Window#getShell()
Currently, Window#getShell() only states to return null if the shell has not been created yet. It will, however, also return null if the Window has been closed. The contract of Window#close() only states that the shell will be disposed, but not that #getShell() will return null afterwards as well. This change improves the explicit contract with this information. It has been part of the implicit contract anyway, since it is the behavior ever since the class and method exist.
1 parent c777660 commit bcd1e38

File tree

1 file changed

+2
-2
lines changed
  • bundles/org.eclipse.jface/src/org/eclipse/jface/window

1 file changed

+2
-2
lines changed

bundles/org.eclipse.jface/src/org/eclipse/jface/window/Window.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -655,8 +655,8 @@ public int getReturnCode() {
655655
/**
656656
* Returns this window's shell.
657657
*
658-
* @return this window's shell, or <code>null</code> if this window's
659-
* shell has not been created yet
658+
* @return this window's shell, or <code>null</code> if this window's shell has
659+
* not been created yet or if this window has been closed
660660
*/
661661
@Override
662662
public Shell getShell() {

0 commit comments

Comments
 (0)