Skip to content

Commit d91d2a3

Browse files
committed
remove 'removeDisplay' method
1 parent cfdd71f commit d91d2a3

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

bundles/org.eclipse.rap.rwt/src/org/eclipse/swt/internal/widgets/DisplaysHolder.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@
2020

2121

2222
public final class DisplaysHolder {
23+
2324
private final Map<Thread, WeakReference<Display>> displays;
24-
25+
2526
public DisplaysHolder() {
2627
displays = Collections.synchronizedMap( new WeakHashMap<>() );
2728
}
@@ -32,12 +33,10 @@ public void addDisplay( Thread tread, Display display ) {
3233

3334
public Display getDisplay( Thread thread ) {
3435
WeakReference<Display> wr = displays.get( thread );
35-
if ( wr != null )
36+
if ( wr != null ) {
3637
return wr.get();
38+
}
3739
return null;
3840
}
3941

40-
public void removeDisplay( Thread thread ) {
41-
displays.remove( thread );
42-
}
4342
}

bundles/org.eclipse.rap.rwt/src/org/eclipse/swt/widgets/Display.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2215,7 +2215,7 @@ private void register() {
22152215
}
22162216

22172217
private void deregister() {
2218-
removeDisplay();
2218+
22192219
}
22202220

22212221
private static Display getDisplay( Thread thread ) {
@@ -2226,10 +2226,6 @@ private void addDisplay( Display display ) {
22262226
getApplicationContext().getDisplaysHolder().addDisplay( thread, display );
22272227
}
22282228

2229-
private void removeDisplay() {
2230-
ContextProvider.getApplicationContext().getDisplaysHolder().removeDisplay( thread );
2231-
}
2232-
22332229
/////////////////////
22342230
// Consistency checks
22352231

0 commit comments

Comments
 (0)