Skip to content

Commit 9e2bdb5

Browse files
committed
Do not call addListener in constructor of Item #2733
The method is not final, which may cause issues if a subclass overrides it because it ends up being called upon instantiation, when the object is not fully initialized Fixes #2733
1 parent d03c44e commit 9e2bdb5

File tree

1 file changed

+1
-1
lines changed
  • bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/widgets

1 file changed

+1
-1
lines changed

bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/widgets/Item.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public abstract class Item extends Widget {
7575
public Item (Widget parent, int style) {
7676
super (parent, style);
7777
text = "";
78-
this.addListener(SWT.ZoomChanged, this::handleDPIChange);
78+
this._addListener(SWT.ZoomChanged, this::handleDPIChange);
7979
}
8080

8181
/**

0 commit comments

Comments
 (0)